![如何在报告类中获得类似的章节样式?](https://linux22.com/image/396267/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%8A%A5%E5%91%8A%E7%B1%BB%E4%B8%AD%E8%8E%B7%E5%BE%97%E7%B1%BB%E4%BC%BC%E7%9A%84%E7%AB%A0%E8%8A%82%E6%A0%B7%E5%BC%8F%EF%BC%9F.png)
答案1
以下是一种方法:
\documentclass[12pt, a4paper]{report}%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[lf]{ebgaramond}
\usepackage{geometry}
\usepackage[newlinetospace]{titlesec}%
\titleformat{\chapter}[display]{\fontsize{30pt}{36pt}\selectfont\filright}{\fontsize{36pt}{48pt}\bfseries\thechapter}{2ex}{}
\begin{document}
\setcounter{chapter}{1}
\chapter{The History of the Seven Families \\ of the Lake Pipple-Popple}
In former days -- that is to say, once upon a time, there lived in the Land of Gramblamble, Seven Families. They lived by the side of the great Lake Pipple-popple (one of the Seven Families, indeed, lived in the Lake), and on the outskirts of the City of Tosh, which, excepting when it was quite dark, they could see plainly. The names of all these places you have probably heard of, and you have only not to look in your Geography books to find out all about them.
Now the Seven Families who lived on the borders of the great Lake Pipple-popple, were as follows in the next Chapter.
\end{document}
添加:如果您希望标题的右边距比文本更宽,则可以\parbox{some width}
在 的最后一个参数中添加 s \titleformat
,如下所示:
\titleformat{\chapter}[display]{\fontsize{30pt}{36pt}\selectfont\filright}{\fontsize{36pt}{48pt}\bfseries\thechapter}{2ex}{\parbox{0.75\textwidth}}
答案2
类memoir
包含book
、report
和article
类并对其进行了扩展,提供了大约 29 种不同的章节样式;不幸的是,您想要的样式不在其中,但也许您会喜欢其中一种。如果没有,那么手册 ( > texdoc memoir
) 中给出了其中许多样式的代码,您可以自己制作。
课程还提供了您想要放在章节标题后面的题词。
为了缩进section
标题,该类提供了\setsecindent{<length>}
用于在章节标题前设置缩进的宏。