从 fancyhdr 切换到 srcpage2

从 fancyhdr 切换到 srcpage2

fancyhdr从 切换到 包是否值得scrpage2

我正在尝试评估它的价值,因为我无法将列表的标题全部大写。

我正在使用 KOMA 脚本报告类以及页脚和页眉的以下定义。

\documentclass[a4paper,11pt,liststotoc,bibtotoc,abstracton,twoside,open=right]{scrreprt}

\usepackage{fancyhdr}
\renewcommand{\chaptermark}[1] % 
{\markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}} 
\renewcommand{\sectionmark}[1] % 
{\markright{\MakeUppercase{\thesection.\ #1}}}
\newcommand{\helv}{ % 
\bfseries\fontsize{9}{11}\selectfont}

\fancyhf{} % Clear header and footer styles
\fancyhead[RO]{\helv \rightmark}
\fancyhead[LE]{\helv \leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\fancyfoot[LE,RO]{\helv \thepage}
\renewcommand{\footrulewidth}{0.5pt}

是否有一种线性方法将其转换为scrpage2命令?

这值得么?

答案1

我想我已经自己解决了。

这是我得到的。

\usepackage{scrpage2}

\renewcommand{\chaptermark}[1] % 
{\markboth{\chaptername\ \thechapter.\ #1}{}} 

\renewcommand{\sectionmark}[1] % 
{\markright{\thesection.\ #1}}

\renewcommand{\headfont}{\bfseries\fontsize{9}{11}\selectfont}
\renewcommand{\pnumfont}{\bfseries\fontsize{9}{11}\selectfont}

\newpagestyle{fancy}{(0pt,0pt)                          % Outer header line
                    {\MakeUppercase{\headmark} \hfill}   % Even page header
                    {\hfill \MakeUppercase{\headmark}}   % Odd page header
                    {\hfill}                            % Onesided page header
                    (\textwidth,0.5pt)}                 % Inner header line
                    {(\textwidth,0.5pt)                 % Inner footer line 
                    {\pagemark \hfill}                   % Even page footer
                    {\hfill \pagemark}                   % Odd page footer
                    {\hfill \pagemark \hfill}             % Onesided page footer
                    (0pt,0pt)}                          % Outer footer line

\renewpagestyle{plain}{(0pt,0pt)              % Outer header line
                      {\hfill}                % Even page header
                      {\hfill}                % Odd page header
                      {\hfill}                % Onesided page header
                      (0pt,0pt)}              % Inner header line
                      {(\textwidth,0.5pt)     % Inner footer line 
                      {\pagemark \hfill}       % Even page footer
                      {\hfill \pagemark}       % Odd page footer
                      {\hfill \pagemark \hfill} % Onesided page footer
                      (0pt,0pt)}              % Outer footer line

通过这种方式定义风格似乎更加复杂,但我很高兴。

相关内容