LyXChange table of content font in lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
mkbh10
Posts: 17
Joined: Thu Jun 12, 2014 1:14 pm

Change table of content font in lyx

Post by mkbh10 »

I have attached two images. Image 1 at the bottom shows an example table of content and I want a similar one for myself. Image 2 at the top shows what I get when I insert TOC for my report in LYX. I am using the report document class and I also have the following commands in the preamble but it does not reduce the size.

\usepackage{tocloft}
\renewcommand\cftchapfont{\fontsize{14}{16}\selectfont}
\renewcommand\textnormal\cftsecfont{\fontsize{6}{7}\selectfont}
\renewcommand\textnormal\cftsubsecfont{\fontsize{6}{7}\selectfont}

How to get the porper font size ?
Attachments
My TOC
My TOC
2.jpg (33.14 KiB) Viewed 6031 times
Example TOC
Example TOC
1.jpg (27.5 KiB) Viewed 6031 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Change table of content font in lyx

Post by scottkosty »

mkbh10, you have been asked several times to be careful with cross-posting. Can you please take some time to think about how you can be respectful to those who spend their free time to help you? cross-post for this one: http://tex.stackexchange.com/questions/ ... toc-in-lyx and here are some of your previous cross-posts: http://latex-community.org/forum/viewto ... 458#p94458 http://latex-community.org/forum/viewto ... 449#p94449 (second post in different subforum) http://tex.stackexchange.com/questions/ ... put-in-lyx

Here is a useful article you could read: http://latex-community.org/home/latex-c ... crossposts
mkbh10
Posts: 17
Joined: Thu Jun 12, 2014 1:14 pm

Re: Change table of content font in lyx

Post by mkbh10 »

It's just that I have been struggling with that and got impatient so posted here too.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: Change table of content font in lyx

Post by scottkosty »

Thanks for explaining. Sorry for the frustration.

Did you read the link that I recommended to you? Do you have any questions about it?

I actually did not intend for you to delete the tex.stackexchange question. The main thing to understand is why it is important for you to reference all of the places that you asked the same question. If those spending time to help can see where else you asked the question, they can see what progress has been made so far.

Further, if someone has the same question as you and finds one of your questions from google, maybe in that forum there was no answer but if you linked to your other questions they can follow that link and find an answer that way.
mkbh10
Posts: 17
Joined: Thu Jun 12, 2014 1:14 pm

Re: Change table of content font in lyx

Post by mkbh10 »

Thanks for the explanation but I am still waiting for someone to reply. I do not have a latex background so it gets crazy when stuck.
PhilipPirrip
Posts: 10
Joined: Sat Sep 10, 2011 10:59 pm

Change table of content font in lyx

Post by PhilipPirrip »

You'll have to play with the commands like

Code: Select all

\renewcommand{\cftsecfont}{\normalfont\small}
\setlength{\cftbeforechapskip}{0.1em}
for

Code: Select all

\cftchapfont, \cftsubsecfont, \cftbeforechapskip, \cftbeforesecskip
These are some sub-normal font sizes:

Code: Select all

\small, \footnotesize, \scriptsize
.

Code: Select all

\cftbefore...skip
lengths can be -0.2mm, 4pt, 3em, -2ex, you choose.

And here's the documentation for the package tocloft: http://ctan.math.utah.edu/ctan/tex-arch ... ocloft.pdf
Post Reply