Reducing font size of TOC

3,791 views
Skip to first unread message

Ashish Revar

unread,
Dec 27, 2010, 9:09:37 AM12/27/10
to latexus...@googlegroups.com
Hello there,

I was preparing beamer template for my University. In which I need to show table of contents at the begining of every section and sub section.
But there is overflow of text in TOC.

I've used the command below,

\renewcommand{\tableofcontents}{\fontsize{3mm}{3mm}\selectfont}

but it's not working,
is there any way to deal with this?

--
Thanks and Regards,
Ashish Revar,
Nirma University,
ashis...@gmail.com
9909298846


Peter Flynn

unread,
Dec 27, 2010, 4:53:24 PM12/27/10
to latexus...@googlegroups.com
On Mon, Dec 27, 2010 at 2:09 PM, Ashish Revar <ashis...@gmail.com> wrote:
Hello there,

I was preparing beamer template for my University. In which I need to show table of contents at the begining of every section and sub section.
But there is overflow of text in TOC.

I've used the command below,

\renewcommand{\tableofcontents}{\fontsize{3mm}{3mm}\selectfont}

but it's not working,
is there any way to deal with this?

What this does is replaces the \tableofcontents command with a definition that selects the font size for nothing, and does not produce any table of contents at all.

The real \tableofcontents command reads the \jobname.toc file and processes all the commands in it. If Beamer is working like normal LaTeX,each of them probably sets its own font size, so if you wanted to reduce the size of them all you would need to redefine all of them individually.

You have several choices:
  • Reduce the number of sections and subsections in your presentation.
  • Set the tocdepth counter to a smaller value so that it only produces entries for sections, not for subsections as well.
  • Redefine the \beamer@sectionintoc and \beamer@subsectionintoc commands to use a smaller font and smaller inter-line spacing
  • Try enclosing the \tableofcontents command in a \vbox and applying the \scalebox command from the graphicx package (I have no idea if this will work), eg \scalebox{0.8}{\vbox{\tableofcontents}}
  • Try enclosing the \tableofcontents command in a font-sizing group, eg {\tiny\tableofcontents}
  • If the ToC has short entries, maybe try putting it into columns, eg \begin{multicols}{2}\tableofcontents\end{multicols}
///Peter

Reply all
Reply to author
Forward
0 new messages