![章节标题格式](https://linux22.com/image/367983/%E7%AB%A0%E8%8A%82%E6%A0%87%E9%A2%98%E6%A0%BC%E5%BC%8F.png)
答案1
以下是两个示例解决方案,改编自的代码\chapter
。对于这种布局,我必须更改的类,\section
以便新部分开始新的页面,并从页面顶部开始:
\documentclass[11pt, a4paper]{article}% http://ctan.org/pkg/amsproc
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier, erewhon}
\usepackage[showframe]{geometry}
\usepackage[x11names]{xcolor}
\usepackage[]{titlesec}%
\titleclass{\section}{top}
\titleformat{\section}[display]
{\filleft\bfseries}
{\fontsize{72}{75}\selectfont\color{SlateGray3}\thesection}
{8ex}
{\LARGE}%
\titlespacing*{\section}{0pt}{-8ex}{12ex}
\begin{document}
\section {The History of the Seven Families}%
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.
\end{document}
\documentclass[11pt, a4paper]{article}% http://ctan.org/pkg/amsproc
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier, erewhon}
\usepackage[showframe]{geometry}
\usepackage[x11names]{xcolor}
\usepackage[]{titlesec}%
\titleclass{\section}{top}
\titleformat{\section}[display]
{\filleft\bfseries}
{\Huge\color{SlateGray3}\raisebox{-0.5\height}{\thesection}\enspace \titlerule[1pt]}
{6ex}
{\LARGE}[\vspace{4.5ex}{\color{SlateGray3}\titlerule[1pt]}]%
\titlespacing*{\section}{0pt}{-6ex}{12ex}
\begin{document}
\section {The History of the Seven Families}%
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.
\end{document}
编辑:
目录标题的格式可以与上面的不同,使用\titleformat
,带有numberless
键,因为目录、参考资料等在文章类中被实现为未编号的部分。只需将此代码添加到您的序言中:
\titleformat{name = \section, numberless}[block]
{\filright}
{}
{0pt}
{\huge\textbf}%
\titlespacing*{name = \section, numberless}{0pt}{-4ex}{12ex}