chapter代码设计如下:

\usepackage{tikz}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\titleformat{\chapter}
{\normalfont\Huge\scshape}
{}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=cyan] (0,-1) rectangle
(\paperwidth,3cm);
\node[anchor=west,xshift=.21\paperwidth,yshift=-.01\paperheight,rectangle]
{\color{white}\LARGE CHAPTER \Huge\thechapter};
\node[anchor=west,xshift=.21\paperwidth,yshift=-.065\paperheight,rectangle]
{\color{cyan}\Huge\MakeUppercase{#1}};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{0pt}
选自:http://tex.stackexchange.com/questions/95958/titleformat-does-not-seem-to-work-when-used-within-a-class-file/95976#95976

点赞(2)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部