1

I'm just writing my thesis and this board has proven very very helpful with a lot of issues I've had with Latex, thank you :) I'm almost done now and would like to make my thesis visually appealing. I specifically want my numbers to have a vertical line in front of them (hard to describe) - very much likes this | 21

I added some pictures (sorry they are the wrong way around) SitestyleThis pictures originates from this page: http://www.kfiles.de/latex.php#Seitenlayout, which actually has code on it, but it doesn't work for me as I have never used hboxes or anything and it seems to require a lot of adjustement :(

I'm using the scrreport class and only need my pagenumbering to be on the right site of the page, same goes for the header.

Hope somebody can help, it would make me really happy if I could actually get this style into my thesis :)

Thanks in advance!

2

Here is a suggestion based on the goLaTeX solution by Noch so einer (see Seitenzahlen/Kapitel mit Vertikalen Linien). But the following example works for twosided documents too and there is no vertical rule in the header if a chapter or section is unnumbered.

\documentclass{scrbook} 
\usepackage{blindtext}
\usepackage{microtype}
\usepackage[automark]{scrlayer-scrpage} 
\clearpairofpagestyles 
\renewcommand*{\chaptermark}[1]{% 
   \markboth{% 
     \makebox[0pt][r]{%
       \ifnumbered{chapter}{%
         \chaptermarkformat% Kapitelnummer 
         \enskip% Abstand 
         \rule[-\dp\strutbox]{2pt}{\baselineskip}% Linie 
         \hspace*{\marginparsep}% Abstand
       }{}%
     }% 
     #1% Text 
   }{%
      #1%Text 
     \makebox[0pt][l]{%
       \hspace*{\marginparsep}% Abstand 
       \ifnumbered{chapter}{%
         \rule[-\dp\strutbox]{2pt}{\baselineskip}% Linie 
         \enskip% Abstand 
         \chaptermarkformat% Kapitelnummer
       }{}%
     }% 
   }% 
} 
\renewcommand*{\sectionmark}[1]{% 
   \markright{% 
     #1%Text 
     \makebox[0pt][l]{% 
       \ifnumbered{section}{%
         \hspace{\marginparsep}% Abstand 
         \rule[-\dp\strutbox]{2pt}{\baselineskip}% Linie 
         \enskip% Abstand 
         \sectionmarkformat% Abschnittsnummer 
       }{}%
     }% 
   }% 
} 
\ohead{\headmark} 
\rofoot*{% 
   \makebox[0pt][l]{%
     \hspace{\marginparsep}%  
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{2pt}{2\baselineskip}% 
     }% 
     \enskip 
     \pagemark 
   }% 
}
\lefoot*{% 
   \makebox[0pt][r]{% 
     \pagemark 
     \enskip
     \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% 
       \rule[-\dp\strutbox]{2pt}{2\baselineskip}% 
     }% 
     \hspace{\marginparsep}%
   }% 
}
\addtokomafont{pagehead}{\upshape}
\begin{document} 
\tableofcontents
\Blinddocument\Blinddocument\Blinddocument\Blinddocument\Blinddocument
\addchap{Unnumbered Chapter}
\addsec{Unnumbered Section}
\Blindtext[10]
\end{document}

enter image description here

enter image description here

  • Mille grazie :-) – Johannes_B Oct 15 '15 at 9:15
  • Thanks, that's great! Also thanks for the links above, very informative - I had browsed Texchange before asking because I thought I'd seen something similar here already but couldn't find it. Bookmarked. – Arelia Oct 17 '15 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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