
我\textbar
在標題中使用它來將頁碼與部分分開。
\thepage\hspace{0.5ex}\textbar\hspace{1ex}\thesection\sectiontitle
但我想減薄其厚度\textbar
並將其設置為 0.15ex(以匹配頭尺的寬度)。必須\textbar
比頁碼和章節標題高一點(\textbar
已經是這樣了)。
答案1
我會\textbar
使用\scalebox{<factor>}[1]
來自graphicx
:
\documentclass{article}
\usepackage{titleps,lipsum,graphicx}
\newcommand{\newtextbar}[1][.7]{\scalebox{#1}[1]{\textbar}}
\newpagestyle{main}{
\setheadrule{0.15ex}
\sethead{}{\thepage\hspace{0.5ex}\textbar{} \newtextbar\hspace{1ex}\thesection{} \sectiontitle}{}
}
\pagestyle{main}
\begin{document}
\section{A section}
\lipsum[1-5]
\end{document}
\newtextbar
具有 70% 的寬度\textbar
(預設),儘管您可以調整預設值和實際使用的\newtextbar[<factor>]
.因子 > 1 會使其變厚,而因子 < 1 則會使其變薄。