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.

I copied my fanyfoot setting of a former work of mine but in my current file it behaves completely different. On the first page of each chapter the pagenumber if not centered but aligned left. Also no headline is shoiwn (which is ok though!). Do I have to specify the settings for these pages separately?

These are my current settings:

     \fancypagestyle{ownfancy}{
            \fancyhf{} % Alle Kopf und Fußzeilenfelder bereinigen
            %\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

            \fancyhead[LE,RO]{\footnotesize\sffamily{\nouppercase{\rightmark}}}
            \fancyhead[LO,RE]{\footnotesize\sffamily{\nouppercase{\leftmark}}}
        \fancyfoot[C]{\sffamily\thepage}

        \renewcommand{\headrulewidth}{0.4pt}    % Liniendicke Kopf
    } 


    \pagestyle{ownfancy}     % Eigener Seitenstil

The only thing which could be different from the file in which these setting worked are the used packages. Perhaps one of these causes the problem?

\documentclass[12pt,a4paper, twoside,
bibliography=totoc,                     % Literaturverzeichnis ins Inhaltsverzeichnis aufnehmen
titlepage,                                      % Titlepage-Umgebung statt \maketitle
headsepline,                                    % horizontale Linie unter Kolumnentitel
BCOR6mm,                                            % Bindekorrektur, die den Seitenspiegel um 6mm nach rechts verschiebt,
]{scrreprt}     
\usepackage{geometry}
\geometry{a4paper, top=25mm, left=30mm, right=25mm, bottom=30mm} % Seitenränder
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\RequirePackage{fix-cm}
\usepackage[ngerman]{babel}     % deutsche Trennungsregeln und Übersetzung der festcodierten Überschriften
\usepackage{graphicx}               % Einbinden von Grafiken erlauben
\usepackage{mathpazo}               % Einstellung der verwendeten Schriftarten
\usepackage{textcomp}               % zum Einsatz von Eurozeichen u. a. Symbolen
\usepackage[intoc]{nomencl}     % zur Erstellung des Abkürzungsberzeichnisses
\usepackage{fancyhdr}                   % Zusatzpaket zur Gestaltung von Fuß und Kopfzeilen
\usepackage{tabularx}                  % Schönere Tabellen%
\usepackage{setspace} 
\usepackage{tocloft}                    % für Anpassungen im Abb. und Tbl. Verzeichnis
\usepackage{csquotes}               % Quotes    
\usepackage{float}
\usepackage{hyperref}
\usepackage{minted}
share|improve this question
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  hpesoj626 Mar 20 '13 at 15:38
1  
Was your "former work" a scrreprt, too? This class (and scrbook) has an special \chapterpagestyle different from regular pages pagestyle. scrartcl doesn't have it. –  Ignasi Mar 20 '13 at 16:37
    
@ezeey You could try something like \def\Chapter#1{\chapter{#1}\thispagestyle{ownfancy}} and use it like \Chapter{Chapter Name}. Also, please put small but self-contained codes when asking questions. Long codes make one loose focus and discourages one to answer your question. –  MMA Mar 20 '13 at 17:35
add comment

1 Answer

Sorry for my incomplete question. Thanks to the advice of @Ignasi I solved the issue. I created a new pagestyle and assigned it to the chapterpagestyle.

\fancypagestyle{ownfancy}{
    \fancyhf{}
    \fancyhead[LE,RO]{\footnotesize\sffamily{\nouppercase{\rightmark}}}
    \fancyhead[LO,RE]{\footnotesize\sffamily{\nouppercase{\leftmark}}}
    \fancyfoot[C]{\sffamily\thepage}
    \renewcommand{\headrulewidth}{0.4pt}
} 

\fancypagestyle{chapterStyle}{
    \fancyhf{} % Alle Kopf und Fußzeilenfelder bereinigen
    \fancyfoot[C]{\sffamily\thepage}
    \renewcommand{\headrulewidth}{0pt}
} 

\pagestyle{ownfancy}    
\renewcommand*{\chapterpagestyle}{chapterStyle}

Strangely the first page of my table of contents, as well as of my list of figures still was different than my defined pagestyles. I found out that they still were styled after the default "plain" pagestyle, so I overwrote it as well:

\fancypagestyle{plain}{
    \fancyhf{}
    \fancyfoot[C]{\sffamily\thepage}
    \renewcommand{\headrulewidth}{0pt}
}
share|improve this answer
add comment

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.