我想更改文档类“elegantbook”页眉装饰符号的颜色。如何将页码样式从“-7-”更改为“7”?
梅威瑟:
\documentclass[lang=en,11pt]{elegantbook}
%--------------------------------------------------
%Header Ornamenty
%--------------------------------------------------
\usepackage{fourier-orns}
\renewcommand\headrule{\hrulefill
\raisebox{-2.1pt}[10pt][10pt]{\quad\decofourleft\decoone\decofourright\quad}\hrulefill}
%.................................................................................
\title{This is Sample Title}
\subtitle{Classic Book}
\author{Author's Name}
\institute{Author's Institution}
\date{\today}
\version{3.10}
\bioinfo{Bio}{Information}
\extrainfo{Victory won\rq t come to us unless we go to it. }
\logo{logo-blue.png}
\cover{cover.jpg}
\begin{document}
\maketitle
\frontmatter
\tableofcontents
\mainmatter
\chapter{This is first Chapter}
Chapter contents here.
\newpage
\section{First section}
Section contents here.
\newpage
\subsection{First section}
Subsection contents here.
\end{document}
答案1
也许你需要阅读 elegantbook-en.pdf,颜色都在那里。你需要查看 elegantbook.cls 来更改标题编号。
\documentclass[lang=en,11pt]{elegantbook}
\fancyhead[R]{\color{structurecolor}\thepage}
\usepackage{fourier-orns}
\renewcommand\headrule{\hrulefill
\raisebox{-2.1pt}[10pt][10pt]{\color{structurecolor}\quad\decofourleft\decoone\decofourright\quad}\hrulefill}
\begin{document}
\chapter{This is first Chapter}
Chapter contents here.
\newpage
\section{First section}
Section contents here.
\newpage
\subsection{First section}
Subsection contents here.
\end{document}