無聊修改一下講義使用的章節標題格式,使用titlesec這個Package。感覺這樣比較像一本書~~
\definecolor{titlecolor}{rgb}{0.503906,0.503906,0.734375}
\newcommand{\hwyk}{\CJKfamily{cwhbb}}
\newcommand{\mytitle}[1]{
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}}
\cellcolor{black} &\cellcolor{titlecolor} \textcolor{white}
{\newline\hwyk \LARGE 第\ \thechapter \ 章 \ \ #1}
\end{tabular}
\arrayrulewidth=0.4pt
}
\newcommand{\mysection}[1]{
\setlength\arrayrulewidth{1pt}\arrayrulecolor{titlecolor}
\begin{tabular}{p{0.01\textwidth}p{0.99\textwidth}}
\hline
\cellcolor{titlecolor} & \textcolor{black}{\hwyk \LARGE \thesection ~ #1}
\end{tabular}
\arrayrulewidth=0.4pt
}
\definecolor{titlecolor}{rgb}{0.503906,0.503906,0.734375}
\newcommand{\hwyk}{\CJKfamily{cwhbb}}
\titleformat{\chapter}[hang]{\hwyk \LARGE \sf}
{}{0mm}{\hspace{-0.4cm}\mytitle}
\titleformat{\section}[hang]{\hwyk \LARGE \sf}
{}{0mm}{\hspace{-0.5cm}\mysection}
讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~