1

I wrote my diploma thesis in a one-sided layout (report) and now I want to print it, but don't want to have the back page blank on every single page. So I want to change the paper format to a two-sided layout in order to have a different offset on odd and even pages. For that reason, I changed my preamble which looks like this now:

\documentclass[a4paper, 12pt, twoside, openright]{report}
\usepackage[showframe]{geometry}

\usepackage{lipsum}
\usepackage{ngerman}
\usepackage{fancyhdr}
\usepackage{a4}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{sectsty}

\makeatletter
\renewcommand*\l@section{\@dottedtocline{2}{3.8em}{4em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{4em}}
\renewcommand*\l@subsubsection{\@dottedtocline{2}{3.8em}{4em}}
\renewcommand*\l@figure{\@dottedtocline{1}{2.8em}{3em}}
\renewcommand*\l@lstlisting{\@dottedtocline{1}{2.8em}{3em}}
\makeatother

\parindent=0pt
\parskip=12pt
\onehalfspacing

\setlength{\headheight}{15pt}
\addtolength{\textwidth}{1.5cm}

\begin{document}
    \pagestyle{fancyplain}

    \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
    \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}
    \lhead[\fancyplain{}{\sffamily\sl\thepage}]{\fancyplain{}{\sffamily\sl\rightmark}}
    \rhead[\fancyplain{}{\sffamily\sl\leftmark}]{\fancyplain{}{\sffamily\sl\thepage}}
    \cfoot{}

\lipsum[1-100]
\end{document}

When I compile it, the following PDF is generated:

First page Second page

Obviously, the offset is the wrong way around. Page 1 should have the offset of page 2 and inverse. Does somebody know a simple solution for this problem?

1

The reason why you are having this inconsistent margin is because you are manually adjusting the textwidth when you write \addtolength{\textwidth}{...}. A better way to achieve this is to set the width of the inner and outer margins using the geometry package (which should be loaded last I think). An exaggerated solution (where I also adjust the top height rather than doing \setlength{\headheight}{15pt}) would use:

\usepackage[showframe, left=50mm, right=20mm, top=20mm]{geometry}
| improve this answer | |
  • Thank you very much, it helped me a lot. – Oliver May 20 at 18:53
  • @Oliver perhaps consider up voting... – oliversm May 20 at 23:28
  • I did it, but sadly it doesn't count. When I upvote, I get following message: Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score. – Oliver May 31 at 14:05

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.