Generalheaders, pagenumbers

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ThomYorke
Posts: 3
Joined: Tue May 06, 2008 9:47 am

headers, pagenumbers

Post by ThomYorke »

Hallo!

Hi! I hope that I have found a community that can help me :)
I would like to have pagenumbers right-aligned and not so close to the bottom of the page, and the headerline also right-aligned and formated in spaced laters(LIKE THIS).

Whats wrong with the following code/what do I have to do? Thank you very much!


\documentclass[12pt,a4paper,headsepline]{scrreprt}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{a4paper,left=40mm,right=20mm, top=20mm, bottom=20mm}
\usepackage{amssymb}
%\usepackage[nenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{array}


\usepackage{graphicx}
\usepackage{caption}
%\usepackage{subfigure}
\usepackage{setspace}
\onehalfspacing



\usepackage{fancyhdr}

\pagestyle{fancy}
\headheight 14pt

\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

% Kopf- und Fußzeile in eingestellter Schriftart
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

ThomYorke
Posts: 3
Joined: Tue May 06, 2008 9:47 am

Re: headers, pagenumbers

Post by ThomYorke »

Situation now:

\documentclass[12pt,a4paper,headsepline]{scrreprt}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{a4paper,left=40mm,right=20mm, top=20mm, bottom=20mm}
\usepackage{amssymb}
%\usepackage[nenglish]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{array}


\usepackage{graphicx}
\usepackage{caption}
%\usepackage{subfigure}
\usepackage{setspace}
\onehalfspacing
\usepackage{fancyhdr}

\pagestyle{fancy}

\fancyfoot[CO,CE]{}
\fancyfoot[RO]{\thepage} %seitenzahl auf ungeraden seiten rechts
\fancyfoot[RE]{\thepage} %seitenzahl auf ungeraden seiten rechts


\headheight 14pt

\renewcommand{\headrulewidth}{0.4pt}



Problem:
Format is only taken for SUBsections. When a new SECTION begins, pagenumber is still in the middle.
???
User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

headers, pagenumbers

Post by Stefan Kottwitz »

Hi ThomYorke,

welcome to the LaTeX Community board!
The page number in the middle corresponds to the plain pagestyle. See fancyhdr documentation 7 Redefining plain style or just write:

Code: Select all

\fancypagestyle{plain}{}
I would prefer scrpage2 instead of fancyhdr if I was using a KOMA-Script class like you.

Btw. it would be nice if you mention next time that you've posted this question in another forum too (here), this information helps to avoid work on answers that may already have been given in the other forum.

Stefan
LaTeX.org admin
ThomYorke
Posts: 3
Joined: Tue May 06, 2008 9:47 am

Re: headers, pagenumbers

Post by ThomYorke »

Okay, thank you very much, I will do so next time.
Post Reply