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.

My pagemark in the heading is centered related to the textbody, but since my left margin is wider than my right, the pagenumber is not centered related to the page.

Little miniature example:

\documentclass[ 
    12pt, % Schriftgröße 
    %DIV10,  % Teilung der Seite in 10 Teile (Layout bessere Lesbarkeit) 
    ngerman, % für Umlaute, Silbentrennung etc. 
    a4paper, % Papierformat 
    oneside, % einseitiges Dokument (Standard) 
    titlepage, % es wird eine Titelseite verwendet 
    parskip=half, % Abstand zwischen Absätzen (halbe Zeile) 
    headings=normal, % Größe der Überschriften verkleinern 
    listof=totoc, % Verzeichnisse im Inhaltsverzeichnis aufführen 
    bibliography=totoc, % Literaturverzeichnis im Inhaltsverzeichnis aufführen 
    %index=totoc, % Index im Inhaltsverzeichnis aufführen 
    captions=tableheading, % Beschriftung von Tabellen unterhalb ausgeben 
    final % Status des Dokuments (final/draft) 
]{scrreprt} 

\usepackage[ 
    %automark, % Kapitelangaben in Kopfzeile automatisch erstellen 
    %headsepline, % Trennlinie unter Kopfzeile 
    ilines % Trennlinie linksbündig ausrichten 
]{scrpage2} 

\begin{document} 


% Kopf- und Fußzeilen ---------------------------------------------------------- 
\pagestyle{scrheadings} 
% Kopf- und Fußzeile auch auf Kapitelanfangsseiten 
\renewcommand*{\chapterpagestyle}{scrheadings} 
% Schriftform der Kopfzeile 
\renewcommand{\headfont}{\normalfont} 

% Kopfzeile 
\ihead{} 
\chead{\pagemark}    %TODO das muss ich noch zentrieren 
\ohead{} 
%\setlength{\headheight}{21mm} % Höhe der Kopfzeile 
% Kopfzeile über den Text hinaus verbreitern 
\setheadwidth[0pt]{textwithmarginpar} 
\setheadsepline[text]{0pt} % Trennlinie unter Kopfzeile entfernen 

% arabische Seitenzahlen im Hauptteil ------------------------------------------ 
\clearpage 
\pagenumbering{arabic} 
Das hier soll dann ein Text sein. 
\end{document}

Thank you very much!

share|improve this question
    
Do you really want to do that? At the moment I can't see why you'd want to. –  Hendrik Vogt Feb 28 '11 at 18:43
    
Because that's what my Student's-Book says. I have to have a certain format for my Bachelorsthesis. And that's how it's supposed to be. –  MiKa Mar 1 '11 at 7:49
add comment

2 Answers

try

\chead{\kern-1in\pagemark}
share|improve this answer
    
Thank you very much, it works fine if I put in "2in"! –  MiKa Feb 28 '11 at 10:31
    
I tried it again at home with my original tex file and it did not work. But somehow it worked fine with my miniature example when I used the geometry-package. –  MiKa Mar 2 '11 at 15:02
    
then you do something special. It is not possible to say more without a minimal example –  Herbert Mar 2 '11 at 15:46
    
How can I find out more about my problem, do you have any idea? I already looked through the file if I changed something, but I couldn't find anything. –  MiKa Mar 2 '11 at 16:01
    
... \begin{document} foo \end{document} and then uncomment the preamble from the bottom to the top until the problem went away. –  Herbert Mar 2 '11 at 16:16
show 1 more comment
up vote 1 down vote accepted

I finally found out how to fix it:

\setheadwidth[-1.35in]{page}

"page" sets the headwidth from the standard (text) to page. Somehow that didn't quite worked, so I added the optional parameter. THX for your help, otherwise I wouldn't have found out!

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.