如何将单面文档转换为双面文档?

如何将单面文档转换为双面文档?

我一直在写一篇论文,目前是单面布局,但我想将除目录、摘要、致谢和献词之外的所有内容都改为双面布局。可以吗?这是使用我当前序言的简单文档

 \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} 

答案1

可以通过关闭@twoside前置内容的布尔值来实现。但是,不建议这么做。

\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} 

这里我把类改成了book双面结构,并引入了子类\frontmatter\mainmatter(参考文献等应该在中\backmatter)。前言材料放在一\@twosidefalse开始就发布的组中。

答案2

对于我来说,同样的问题已通过此解决方法解决

\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
% ...

编辑:

正如评论中提到的那样,这并不可取,因为(1)ifthen包是据称已经过时(2)一般不建议在同一个文件中同时包含onesidetwoside对齐,因为这会导致文档不一致且不适合打印。

我必须这样做的唯一原因是,我的大学对我施加了限制,要求在同一本 PDF 书中同时包含单面前言和双面正文;这正是问题所指定的。

相关内容