代码如下
\documentclass[12pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[svgnames, x11names]{xcolor} \newcommand*\ftsize[1]{\fontsize{#1pt}{\numexpr 1.2*#1\relax pt}\selectfont} \newcommand*\chapsubtitle[1]{{\LARGE #1}} \newcommand\maketabular[1]{\begin{tabular}[b]{l} #1 \end{tabular}} \usepackage{colortbl} \usepackage{titlesec} \titleformat{\chapter}[block]{\usefont{T1}{phv}{m}{n}}{% \begin{tabular}[b]{c !{\color{lightgray}\vline width1.2pt}}{\large\color{lightgray} \textls*{CHAPTER}}\\[4ex] \fontsize{72}{72}\selectfont\thechapter\end{tabular}}{1em}{\bfseries\fontsize{36}{48}\selectfont\maketabular}%[] \begin{document} \setcounter{chapter}{12} \chapter{Hello, ATL Server\\ \chapsubtitle{A Modern C++ Web Platform}}% \end{document}
选自:http://tex.stackexchange.com/questions/163052/customizing-chapters-title
发表评论 取消回复