4

I have been writing a thesis that is currently in one sided layout, but I would like to switch everything except for contents, abstract, acknowledgement and dedication into two sided layout. Is it possible? Here is a simple document that uses my current preamble

 \documentclass[11pt,a4paper,oneside]{report} 
 \usepackage[pdftex]{graphicx}
 \usepackage[T1]{fontenc} 
 \usepackage{fouriernc}
 \usepackage{mathtools}
 \usepackage{amsfonts,amsmath,amssymb,amsthm} 
 \usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} 
 \usepackage{multicol}
 \usepackage{chngcntr} % reset footnote for each chapter
 \usepackage{fancyhdr} % headline
 \usepackage{enumerate}
 \usepackage{wasysym} % symbols
 \usepackage{faktor}%for factor rings 
 \usepackage{ marvosym }
 \usepackage{ragged2e}
 \usepackage{blindtext}
 %%-------------------footnotes-------------------------------------
 \counterwithout{footnote}{chapter}% reset footnote for each chapter
 \usepackage[hang]{footmisc} %align text of footnotes
 \setlength{\footnotesep}{0.4cm}
 %---------------------note--------------------------------------
 \newtheoremstyle{note}% hnamei 
    {3pt}% hSpace abovei 
    {3pt}% hSpace belowi note
    {}% hBody fonti 
    {}% hIndent amounti1
    {\itshape}% hTheorem head fonti 
    {\spacedlowsmallcaps}%
    {:}% hPunctuation after theorem headi 
    {.5em}% hSpace after theorem headi2
    {}%
  \theoremstyle{note}
 \newtheorem{note}{Definition}
 %------------------------theorem-------------------------------
 \theoremstyle{plain}
 \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each    chapter
 \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on    theorem numbers
 \newtheorem{exmp}[thm]{Example}
 \newtheorem{cor}[thm]{Corollary}
 \newtheorem{lem}[thm]{Lemma}
 \newtheorem{prop}[thm]{Proposition}
 \renewcommand\arraystretch{1.2}
 \DeclareMathOperator{\disc}{disc}
 \DeclareMathOperator{\order}{\mathcal{O}_{K}} 
 \DeclareMathOperator{\z}{\mathbf{Z}} 
 \DeclareMathOperator{\q}{\mathbf{Q}} 
 \DeclareMathOperator{\C}{\mathbf{C}}
 \DeclarePairedDelimiter{\Span}{\langle}{\rangle}
 \DeclarePairedDelimiter{\bs}{\lvert}{\rvert}
 \DeclareMathOperator{\discr}{disc}
 %--------------------proof-------------------------------------
 \newcommand\prosto{\rule{1ex}{2.6ex}}
 \renewcommand\qedsymbol{\prosto}
 \makeatletter % ''proof''from italic to bold
 \renewenvironment{proof}[1][\proofname]{\par
 \pushQED{\qed}%
 \normalfont \topsep6\p@\@plus6\p@\relax
 \trivlist
 \item[\hskip\labelsep
    \bfseries
 #1\@addpunct{.}]\ignorespaces
 }{%
 \popQED\endtrivlist\@endpefalse
 }
 \makeatother
 %-------------------headline-------------------------------
 \pagestyle{fancy}
 \lhead{\empty} %left headline
 \rhead{\normalfont \small \itshape \rightmark} 
 \cfoot{\empty} 
 \rfoot{\thepage}
 \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
 \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} 
 \def\headrulewidth{0pt} 
 \setlength{\headheight}{14pt} 
 %-------------------------------------------------------------
 \usepackage[pdftex]{hyperref}

 \begin{document}
 \chapter{1}
 \blindtext
 \blindtext
 \chapter{2}
 \blindtext
 \blindtext
 \section{1}
 \blindtext
 \blindtext
 \end{document} 
user124471
  • 1,063
  • you should switch everything to two-sided (documentclass-option twoside) and remove the white pages you don't like afterwards. There are a lot of posts here explaining how to get rid of a blank pages after contents and so on. Using oneside only for the beginning would result in different numbering and different side margins (inner less than outer for twoside) and therefore should not be done. – LaRiFaRi Sep 03 '14 at 10:07
  • There are no \tableofcontents etc. what you want to have... There is also a lot of unneeded packages for the special problem –  Sep 03 '14 at 10:09
  • @ChrisH: That post contains the vice-versa question ;-) –  Sep 03 '14 at 10:35
  • @ChristianHupfer, I had exactly the OP's problem -- or at least the desired end result -- and solved it by switching the document to twoside and faking the oneside part as in David Carlisle's answer. Now to remember why it's currently commented out in my thesis! – Chris H Sep 03 '14 at 12:56

2 Answers2

3

It can be done by switching off the boolean @twoside for the front matter. However, it is not to be recommended.

\documentclass[11pt,a4paper,twoside]{book} 
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc} 
\usepackage{fouriernc}
\usepackage{mathtools}
\usepackage{amsfonts,amsmath,amssymb,amsthm} 
\usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} 
\usepackage{multicol}
\usepackage{chngcntr} % reset footnote for each chapter
\usepackage{fancyhdr} % headline
\usepackage{enumerate}
\usepackage{wasysym} % symbols
\usepackage{faktor}%for factor rings 
\usepackage{ marvosym }
\usepackage{ragged2e}
\usepackage{blindtext}
%%-------------------footnotes-------------------------------------
\counterwithout{footnote}{chapter}% reset footnote for each chapter
\usepackage[hang]{footmisc} %align text of footnotes
\setlength{\footnotesep}{0.4cm}
%---------------------note--------------------------------------
\newtheoremstyle{note}% hnamei 
   {3pt}% hSpace abovei 
   {3pt}% hSpace belowi note
   {}% hBody fonti 
   {}% hIndent amounti1
   {\itshape}% hTheorem head fonti 
   {\spacedlowsmallcaps}%
   {:}% hPunctuation after theorem headi 
   {.5em}% hSpace after theorem headi2
   {}%
 \theoremstyle{note}
\newtheorem{note}{Definition}
%------------------------theorem-------------------------------
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each    chapter
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on    theorem numbers
\newtheorem{exmp}[thm]{Example}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\renewcommand\arraystretch{1.2}
\DeclareMathOperator{\disc}{disc}
\DeclareMathOperator{\order}{\mathcal{O}_{K}} 
\DeclareMathOperator{\z}{\mathbf{Z}} 
\DeclareMathOperator{\q}{\mathbf{Q}} 
\DeclareMathOperator{\C}{\mathbf{C}}
\DeclarePairedDelimiter{\Span}{\langle}{\rangle}
\DeclarePairedDelimiter{\bs}{\lvert}{\rvert}
\DeclareMathOperator{\discr}{disc}
%--------------------proof-------------------------------------
\newcommand\prosto{\rule{1ex}{2.6ex}}
\renewcommand\qedsymbol{\prosto}
\makeatletter % ''proof''from italic to bold
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item[\hskip\labelsep
   \bfseries
#1\@addpunct{.}]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
%-------------------headline-------------------------------
\pagestyle{fancy}
\lhead{\empty} %left headline
\rhead{\normalfont \small \itshape \rightmark} 
\cfoot{\empty} 
\rfoot{\thepage}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} 
\def\headrulewidth{0pt} 
\setlength{\headheight}{14pt} 
%-------------------------------------------------------------
\usepackage[pdftex]{hyperref}

\begin{document}
\frontmatter
\begingroup
\makeatletter
\@twosidefalse
\makeatother

\chapter*{Preface}
\blindtext

\tableofcontents

\endgroup

\mainmatter
\chapter{1}
\blindtext
\blindtext
\chapter{2}
\blindtext
\blindtext
\section{1}
\blindtext
\blindtext
\end{document} 

Here I have changed the class to book that has a two sided scheme, and introduced the subdivisions \frontmatter and \mainmatter (references etc. should be in \backmatter). The front matter material is put in a group where \@twosidefalse has been issued at the beginning.

Andrew Swann
  • 95,762
  • Thank you very much Andrew. I really tried to follow some suggestions given in other posts related to this topic but I was always getting a bunch of errors and no output. Your solution works great. It does exactly what I wanted. – user124471 Sep 03 '14 at 12:13
  • Why is it not recommended? – Ébe Isaac May 13 '17 at 05:24
  • @ÉbeIsaac It completely f*cks up a document for print and is outright insane! – Johannes_B May 13 '17 at 05:40
  • @Johannes_B Thanks for the reply but I don't think that language is necessary TBH (it is ill-advised in StackExchange in general). – Ébe Isaac May 13 '17 at 05:44
  • @ÉbeIsaac I don't recommend it for two reasons: (a) this is muddling with internals, so may have unexpected consequences, and (b) it is subverting the document design, so will not given a consistent appearance. – Andrew Swann May 13 '17 at 09:25
  • @AndrewSwann Thanks for the heads-up; I'll keep that in mind. Alas, it seems like some universities just prefer the 'inconsistent' alternative just as posted by the OP. – Ébe Isaac May 13 '17 at 09:35
0

The same problem for me was fixed by this workaround

\documentclass[11pt,a4paper,twoside]{book} % Start the document with two-sided option     
\usepackage{ifthen}

% Some code

\setboolean{@twoside}{false} % Temporarily move to one-sided mode

% One-sided matter
% ...

\setboolean{@twoside}{true} % Move back to two-sided mode

% General matter
% ...

Edit:

As mentioned in the comments it is not really advisable as (1) ifthen package is supposedly obsolete and (2) having both oneside and twoside alignments in the same file is generally not recommended as it gives a document that is inconsistent and not printer-friendly.

The only reason I had to do this is that this was a constraint imposed by my University to have both one-sided front-matter and two-sided main-matter in the same PDF book; which is exactly what the question specified.

  • Are you sure this will work? Where is \setboolean defined? Do you have to treat the @ signs in a special way? – Johannes_B May 13 '17 at 05:41
  • @Johannes_B I had the same problem and It worked for me just now. Using the \@twosidefalse as shown in the previous answer just threw me an error stating You can't use '\spacefactor' in vertical mode. – Ébe Isaac May 13 '17 at 05:43
  • See http://www.tex.ac.uk/FAQ-atvert.html - you need the \makeatletter...\makeatother around \@twosidefalse. \setboolean is from the ifthen package and in effect just wraps the switch command in the necessary pair. Generally the ifthen package is not to be recommend - etoolbox is more robust - see https://tex.stackexchange.com/q/13866/15925 – Andrew Swann May 13 '17 at 09:23