LyX ⇒ Changing the font of chapter headings
Changing the font of chapter headings
(I do not want to use any other document class because I prefer the output of "book" over KOMA script and Memoir.)
How do I do this?
Thanks a lot in advance!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Changing the font of chapter headings
Regards,
sridhar
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Re: Changing the font of chapter headings
I have added the package "titlesec" to the document preamble, but then I have found that I would have to define all the attributes of the font all over again. (Also, three blank pages were inserted after the TOC, for reasons I cannot fathom.)
Is there no way to keep all the attributes of the document class "book" but just change the font the way I want?
Of course, there is a workaround:
1) creating two copies of the same document, one serif, one sans-serif
2) in the serif-document, change all chapter headings to sans serif, print to pdf
3) print the sans-serif document to pdf
4) open the pdf from the sans-serif document (with serif headings), and replace the TOC with the one from the sans-serif version
Obviously, this would be a bit tedious, but it would have been quicker than fiddling around with the LaTeX preamble for over an hour.

Changing the font of chapter headings

Code: Select all
\documentclass[11pt]{report}
%
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{sectsty}
\sectionfont{\sffamily\Large}
\subsectionfont{\sffamily}
\usepackage[Bjornstrup]{fncychap}
\ChTitleVar{\raggedleft\LARGE\sffamily\bfseries}
\begin{document}
\blinddocument
\end{document}
Regards,
sridhar
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Changing the font of chapter headings
Code: Select all
\documentclass[11pt,a4paper,english]{book}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{sectsty}
\usepackage{blindtext}
% Headings setup (sectsty)
\allsectionsfont{\sffamily}
\begin{document}
\Blinddocument
\end{document}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10