0

Can I typeset: table of contents, bibliography, list of figures and indexes using sans serif font and body text using serif fonts?

SOLUTION (?)

\documentclass[mpinclude=true]{scrbook}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{graphicx}

\usepackage[titles]{tocloft}
\renewcommand{\cftchapfont}{\normalsize\sffamily}
\renewcommand{\cftsecfont}{\normalsize\sffamily}

\renewcommand{\cftchappagefont}{\bfseries \sffamily}


\renewcommand\cftfigfont{\normalsize\sffamily} 

\renewcommand{\cftsecpagefont}{ \sffamily}
\renewcommand{\cftsubsecpagefont}{ \sffamily}  
\renewcommand{\cftsubsubsecpagefont}{ \sffamily}
\renewcommand{\cftfigpagefont}{ \sffamily}

\title{Your Paper}
\author{You}

\begin{document}

\section{Introduction}

Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started. If you have a question, please use the help menu (``?'') on the top bar to search for help or ask us a question. 

\section{Some examples to get started}

First you have to upload the image file from your computer using the upload link the project menu. Then use the includegraphics command to include it in your document. Use the figure environment and the caption command to add a number and a caption to your figure. See the code for Figure \ref{fig:frog} in this section for an example.

\begin{figure}
\centering
\includegraphics[width=0.3\textwidth]{frog.jpg}
\caption{\label{fig:frog}This frog was uploaded via the project menu.}
\end{figure}

\tableofcontents
\listoffigures


\end{document}

brings desired effect.

Any better solutions are welcome!

2
  • KOMA and tocloft do not like each other. Where's the KOMA content in your fragment at all?
    – user31729
    Aug 18, 2016 at 14:00
  • @ChristianHupfer I know it's rather simple solution, bo so far it works for me.
    – ReRunner
    Aug 18, 2016 at 17:59

1 Answer 1

1

There is no index and no bibliography in your example. So here is only a suggestion for the TOC and the lists like LOF and LOT, which are controlled by KOMA-Script package tocbasic:

\BeforeStartingTOC{\sffamily\renewcommand\familydefault{\sfdefault}}

enter image description here

enter image description here

Code:

\documentclass[mpinclude=true]{scrbook}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\BeforeStartingTOC{\sffamily\renewcommand\familydefault{\sfdefault}}

\usepackage{blindtext}
\begin{document}
\blinddocument
\begin{figure}
\centering
\includegraphics[width=0.3\textwidth]{example-image}
\caption{An example image\label{fig:example}}
\end{figure}

\tableofcontents
\listoffigures
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .