Kopfzeile auf Kapitelanfangsseite wie auf allen andere Seite

Layout von Seiten, Rändern, Fusszeilen, usw, modifizieren


Diplomand

Kopfzeile auf Kapitelanfangsseite wie auf allen andere Seite

Beitrag von Diplomand »

Hallo,
ich arbeite mit dem KOMA-Sript und verwende für meine Kopf- und Fußzeilen das Paket scrpage2 mit dem \pagestyle{scrheadings}. Da ich alle Kapitel in der Kopfzeile in Großbuchstaben schreiben möchte, habe ich nach jedem Kapitel \chaptermark{KAPITELNAME} eingefügt. Das klappt auch wunderbar, nur auf den Kapitelanfangsseiten steht weiterhin "Kapitelname" anstatt "KAPITELNAME". Ich habe bereits \renewcommand{\chapterpagestyle}{scrheadings} eingefügt, dies nützt jedoch auch nichts. Könnt ihr mir weiterhelfen?
\renewcommand{\chapterpagestyle}{scrheadings}
\usepackage[a4paper, inner=1.5cm, outer=2.5cm, top=2cm, bottom=2.5cm, bindingoffset=1cm]{geometry} %hiermit kann die Berandung des Dokumentes eingestellt werden
\usepackage[ngerman]{babel} %Verwendung der neuen deutschen Rechtschreibung. Dadurch werden Trennungsregeln angepasst und automatisch erzeugte Überschriften ins Deutsche übersetzt (z.B. "Kapitel" statt "Chapter"). babel ist das Sprachpaket.
\usepackage[T1]{fontenc} %Auswahl des Zeichensatzes
\usepackage[latin9]{inputenc}%Verwendung eines Zeichensatzes, in dem auch Umlaute wie ä, ö und ü enthalten sind
\usepackage{lmodern} %skalierbare Schriftfamilie "Latin Modern" anstelle der defaultmäßigen bitmapped Schriftfamilien "Computer Modern", möglicherweise führt auch nur diese Eingabe zu Umlauten wie ä,ö und ü
\usepackage{textcomp} %Zusätzliche Symbolzeichen
\usepackage{parskip} %Verhindert die Einrückung von Zeilen bei Beginn eines Paragraphen und macht statt dessen einen kleinen Absatz
\usepackage{graphicx}
\usepackage[onehalfspacing]{setspace}%1,5-facher Zeilenabstand
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage[section]{placeins}


\usepackage[headsepline,footsepline]{scrpage2}%Strich in Kopf und Fußzeile einfügen über headsepline und footsepline
\pagestyle{scrheadings}
\clearscrheadings
\setkomafont{pagehead}{%
\normalfont
}
\ihead{\headmark}%fügt Kapitel in Kopfzeile ein 
\ohead{\includegraphics[height=0.6cm]{Bild1.png}}%fügt Bild1 auf rechtem Teil der Kopfzeile ein
\ifoot{\raisebox{-5mm}{\includegraphics[height=0.6cm]{Bild2.png}}}%fügt Bild2 auf linkem Teil der Fußzeile ein
\ofoot{\pagemark}%fügt Seitenzahl auf rechtem Teil der Fußzeile ein

Xenara
Forum-Meister
Forum-Meister
Beiträge: 682
Registriert: Mi 25. Nov 2009, 09:41

Beitrag von Xenara »

Nächstes Mal bitte ein vollständiges, lauffähiges, aber _minimales_ Minimalbeispiel. Dein Code ist gar nichts davon ...

Zu deinem Problem:
Willst du wirklich Grossbuchstaben verwenden oder doch lieber Kapitälchen? Ich würde Kapitälchen empfehlen.
Die Definition funktioniert wesentlich einfacher als über chaptermark neu schreiben, nämlich einfach in der Kopfzeilendefinition:
\documentclass{scrreprt}
 
\usepackage{blindtext} 

\renewcommand{\chapterpagestyle}{scrheadings} 
%\usepackage[a4paper, inner=1.5cm, outer=2.5cm, top=2cm, bottom=2.5cm, bindingoffset=1cm]{geometry} %hiermit kann die Berandung des Dokumentes eingestellt werden 
\usepackage[ngerman]{babel} %Verwendung der neuen deutschen Rechtschreibung. Dadurch werden Trennungsregeln angepasst und automatisch erzeugte Überschriften ins Deutsche übersetzt (z.B. "Kapitel" statt "Chapter"). babel ist das Sprachpaket. 
\usepackage[T1]{fontenc} %Auswahl des Zeichensatzes 
\usepackage[latin9]{inputenc}%Verwendung eines Zeichensatzes, in dem auch Umlaute wie ä, ö und ü enthalten sind 
%\usepackage{lmodern} %skalierbare Schriftfamilie "Latin Modern" anstelle der defaultmäßigen bitmapped Schriftfamilien "Computer Modern", möglicherweise führt auch nur diese Eingabe zu Umlauten wie ä,ö und ü 
%\usepackage{textcomp} %Zusätzliche Symbolzeichen 
%\usepackage{parskip} %Verhindert die Einrückung von Zeilen bei Beginn eines Paragraphen und macht statt dessen einen kleinen Absatz 
\usepackage{graphicx} 
%\usepackage[onehalfspacing]{setspace}%1,5-facher Zeilenabstand 
%\usepackage{hyperref} 
%\usepackage{amsmath} 
%\usepackage[section]{placeins} 


\usepackage[headsepline,footsepline]{scrpage2}%Strich in Kopf und Fußzeile einfügen über headsepline und footsepline 

\automark[chapter]{section}

\pagestyle{scrheadings} 
\clearscrheadings 
\setkomafont{pagehead}{% 
\normalfont 
} 
\ihead{\scshape \headmark}%fügt Kapitel in Kopfzeile ein 
%\ohead{\includegraphics[height=0.6cm]{Testbild}}%fügt Bild1 auf rechtem Teil der Kopfzeile ein 
%\ifoot{\raisebox{-5mm}{\includegraphics[height=0.6cm]{Testbild}}}%fügt Bild2 auf linkem Teil der Fußzeile ein 
\ofoot{\pagemark}%fügt Seitenzahl auf rechtem Teil der Fußzeile ein

\begin{document}

\blinddocument

\end{document}

Simulant
Forum-Anfänger
Forum-Anfänger
Beiträge: 31
Registriert: Do 18. Aug 2011, 13:09

Beitrag von Simulant »

Vielen Dank für die schnelle Hilfe, da dies gerade mein erster Beitrag war, habe ich daran leider nicht gedacht. Nächstes Mal werde ich es besser machen.
Mit deiner Hilfe sieht nun alles viel besser aus, nur beim Literaturverzeichnis wird weiterhin "Literaturverzeichnis" anstelle von "LITERATURVERZEICHNIS" geschrieben.

Ich verwende dazu den Befehl \bibliographystyle{plain}.
Was muss ich ändern, damit auch dort Kapitälchen in der Kopfzeile verwendet werden?

Xenara
Forum-Meister
Forum-Meister
Beiträge: 682
Registriert: Mi 25. Nov 2009, 09:41

Beitrag von Xenara »

Das Problem ist für mich nicht nachvollziehbar, mit untenstehendem Code ist auch auf der zweiten Seite die Kopfzeile in Kapitälchen.
\documentclass{scrreprt}

\usepackage{filecontents}
\begin{filecontents}{literatur.bib}
@Book{book1,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@MISC{misc2,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@Book{book3,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@MISC{misc4,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@Book{book5,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@MISC{misc6,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@Book{book7,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@MISC{misc8,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
@Book{book9,
author = {Autor lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
title = {Titel lkajsdf lkjsaf dlkjasd flkja dsflkjas dflkjas dflkjas dflkj asldkfj kalsfj lsakjf lksajd flksaj flkasj flkassj fdlkasjf lksajf lkasjdf lksajd flksaj fdlksja flksaj flksajf lksaj flksajd flksaj fdlksajf lkasj flkajs fdlkasj flkajsflk asjfoiwejrlksadjfoisafjlkasjklassvnklsadjferlöjdlfkj salfdkj aslkfdj alkfj kla fdjl},
publisher = {Verlag},
year = {2222},
}
\end{filecontents}

 
\usepackage{blindtext} 

\renewcommand{\chapterpagestyle}{scrheadings} 
%\usepackage[a4paper, inner=1.5cm, outer=2.5cm, top=2cm, bottom=2.5cm, bindingoffset=1cm]{geometry} %hiermit kann die Berandung des Dokumentes eingestellt werden 
\usepackage[ngerman]{babel} %Verwendung der neuen deutschen Rechtschreibung. Dadurch werden Trennungsregeln angepasst und automatisch erzeugte Überschriften ins Deutsche übersetzt (z.B. "Kapitel" statt "Chapter"). babel ist das Sprachpaket. 
\usepackage[T1]{fontenc} %Auswahl des Zeichensatzes 
\usepackage[latin9]{inputenc}%Verwendung eines Zeichensatzes, in dem auch Umlaute wie ä, ö und ü enthalten sind 
%\usepackage{lmodern} %skalierbare Schriftfamilie "Latin Modern" anstelle der defaultmäßigen bitmapped Schriftfamilien "Computer Modern", möglicherweise führt auch nur diese Eingabe zu Umlauten wie ä,ö und ü 
%\usepackage{textcomp} %Zusätzliche Symbolzeichen 
%\usepackage{parskip} %Verhindert die Einrückung von Zeilen bei Beginn eines Paragraphen und macht statt dessen einen kleinen Absatz 
\usepackage{graphicx} 
%\usepackage[onehalfspacing]{setspace}%1,5-facher Zeilenabstand 
%\usepackage{hyperref} 
%\usepackage{amsmath} 
%\usepackage[section]{placeins} 


\usepackage[headsepline,footsepline]{scrpage2}%Strich in Kopf und Fußzeile einfügen über headsepline und footsepline 

\automark[chapter]{section}

\pagestyle{scrheadings} 
\clearscrheadings 
\setkomafont{pagehead}{% 
\normalfont 
} 
\ihead{\scshape \headmark}%fügt Kapitel in Kopfzeile ein 
%\ohead{\includegraphics[height=0.6cm]{Testbild}}%fügt Bild1 auf rechtem Teil der Kopfzeile ein 
%\ifoot{\raisebox{-5mm}{\includegraphics[height=0.6cm]{Testbild}}}%fügt Bild2 auf linkem Teil der Fußzeile ein 
\ofoot{\pagemark}%fügt Seitenzahl auf rechtem Teil der Fußzeile ein


\begin{document}

\blinddocument


\cite{*}

\bibliographystyle{plain}
\bibliography{literatur}

\end{document}

Simulant
Forum-Anfänger
Forum-Anfänger
Beiträge: 31
Registriert: Do 18. Aug 2011, 13:09

Beitrag von Simulant »

Hier ist mal ein Beispiel an dem das Problem klar werden sollte. Die Schrift in der Kopfzeile des Literaturverzeichnisses sieht anders aus als die Schrift in den restlichen Kopfzeilen. Ich möchte, dass die Schrift in der Kopfzeile des Literaturverzeichnisses genauso aussieht wie in den übrigen Kopfzeilen. Wie kann ich das erreichen?
\documentclass[a4paper,11pt,oneside,markuppercase,headlines=2.2]{scrbook}

\usepackage{filecontents}
\begin{filecontents}{literatur.bib}
@Book{book1,
author = {Autor a},
title = {Titel a},
publisher = {Verlag a},
year = {1111},
}
@MISC{misc2,
author = {Autor b},
title = {Titel b},
publisher = {Verlag b},
year = {2222},
}
\end{filecontents}

\usepackage{blindtext} 

\renewcommand{\chapterpagestyle}{scrheadings}
\usepackage[ngerman]{babel} %Verwendung der neuen deutschen Rechtschreibung. Dadurch werden Trennungsregeln angepasst und automatisch erzeugte Überschriften ins Deutsche übersetzt (z.B. "Kapitel" statt "Chapter"). babel ist das Sprachpaket.
\usepackage[headsepline,footsepline]{scrpage2}%Strich in Kopf und Fußzeile einfügen über headsepline und footsepline
\automark[chapter]{chapter}
%\fancyhf{}
\pagestyle{scrheadings}
\clearscrheadings
\clearscrplain

\setkomafont{pageheadfoot}{\normalfont\scshape
  \expandafter\let\csname breakatheadspaceelse \endcsname\\}
\DeclareRobustCommand*{\breakatheadspaceelse}{\ \ignorespaces}

\ihead{\scshape \headmark}%fügt Kapitel in Kopfzeile ein 

\newcommand{\head}[1]{\textnormal{\textbf{#1}}}

\begin{document}
\blinddocument
\cite{*}
\bibliographystyle{plain}
\bibliography{literatur}
\end{document}

Besserwisser

Beitrag von Besserwisser »

Lass Option markuppercase besser weg. Der dabei erzeugte Versaliensatz ist typografisch total falsch, da die typografisch zwingend erforderliche ausgeglichene Sperrung fehlt.

Ansonsten:
\makeatletter
\AtBeginDocument{\renewcommand*{\@mkboth}[2]{\markboth{\MakeMarkcase{#1}}{\MakeMarkcase{#2}}}}
\makeatother
nach dem Laden von scrpage2.

Der Versaliensatz im Kopf taugt aber wie gesagt überhaupt nichts!

Simulant
Forum-Anfänger
Forum-Anfänger
Beiträge: 31
Registriert: Do 18. Aug 2011, 13:09

Beitrag von Simulant »

Ein erneutes Mal vielen Dank! Echt top die Hilfe hier!

Antworten