\documentclass[a4paper,DIV=classic]{scrbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[portuguese]{babel} \usepackage{scrpage2} \usepackage{lipsum} \addtokomafont{pagenumber}{\sffamily \bfseries} \addtokomafont{pagehead}{\sffamily} \addtokomafont{chapter}{\sffamily \bfseries} \pagestyle{scrheadings} \clearscrheadfoot \lehead{% \llap{\pagemark~~~\smash{% \rule[-0.4ex]{0.4pt}{\dimexpr\headheight-\topmargin+\headsep\relax}}% \hspace{2em}}% \headmark} \rohead{% \headmark% \rlap{\hspace{2em}\smash{% \rule[-0.4ex]{0.4pt}{\dimexpr\headheight-\topmargin+\headsep\relax}}% ~~~\pagemark}} \begin{document} \chapter{Um Capítulo} \lipsum[1-10] \section{Uma Seção} \lipsum[15-20] \chapter{Outro Capítulo} \lipsum[1-10] \section{Outra seção} \lipsum[15-20] \end{document}
选自:http://tex.stackexchange.com/questions/126531/headers-with-vertical-rule-with-koma-script
发表评论 取消回复