我可以排版:使用无衬线字体排版目录、参考书目、图表和索引,使用衬线字体排版正文吗?
解决方案 (?)
\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}
带来预期的效果。
欢迎任何更好的解决方案!
答案1
您的示例中没有索引,也没有参考书目。因此,这里仅针对目录和 LOF 和 LOT 等列表提出建议,这些列表由 KOMA-Script 包控制tocbasic
:
\BeforeStartingTOC{\sffamily\renewcommand\familydefault{\sfdefault}}
代码:
\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}