Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it worth it to switch from the fancyhdr to the scrpage2 package?

I am trying to assess it's worth because I am having problems making the headers of the listsofsomething all uppercase.

I am using the KOMA-script report class and the following definitions for footers and headers.

\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}

Is there a linear way to translate it to the scrpage2 commands?

Is it worth it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I have solved it myself, I think.

Here is what I got.

\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

Defining the style this way seems more complicated, but I am happy.

share|improve this answer
    
If this solved your problem, then you should accept your own answer, so that it disappears from the list of unanswered questions. –  Hendrik Vogt Feb 12 '11 at 16:16
1  
Sorry, there as a waiting period, then I forgot. –  Tiago Veloso Feb 12 '11 at 16:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.