如何打印一本“单面”且页边距较宽(全部在左侧)但页码为“双面”的书籍(奇数页码在右侧,偶数页码在左侧)

如何打印一本“单面”且页边距较宽(全部在左侧)但页码为“双面”的书籍(奇数页码在右侧,偶数页码在左侧)

我想输入一本页边距相对较宽的书,总是在左边,也就是“单面”。但是页码是“双面”,这意味着偶数页码在左边,奇数页码在右边。到目前为止,我得到了这个,但所有的页码都是单面的:

\documentclass[openany,oneside]{book}

\usepackage{blindtext}
\usepackage[showframe]{geometry} % <====================================
\geometry{%
 paperheight=9.8125in,
  paperwidth=8in, 
left=.5in, right=.5in,top=.75in,bottom=.4375in 
}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{} 
\fancyhead[EL,OR]{\textbf {\thepage}}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{plain}

\renewcommand{\rmdefault}{pag}

\usepackage[utf8]{inputenc}
\usepackage[hyphens]{url}
\usepackage[authoryear,round]{natbib}

\newcommand{\titlefontarash}{% 
\usefont{OT1}{pag}{b}{n}%
\fontsize{25}{\baselineskip}%
\selectfont%
}
\newcommand{\basefontarash}{%
\usefont{OT1}{pag}{b}{n}%
\fontsize{18}{\baselineskip}%
\selectfont%
}


\begin{document}

\title{\titlefontarash  Helping each other}
\author{\basefontarash Good boy}
{ % <===================================================================
\maketitle
\let\clearpage\relax

\frontmatter
} % <===================================================================
\vspace*{\fill}
\begin{center}
\basefontarash To good...
\basefontarash To those good..
\end{center}
\vspace*{\fill}

\tableofcontents

\newgeometry{ left=2.75in, right=.5in } % <======================= ?????
\mainmatter
\fancypagestyle{plain}{%
\fancyhf{}
\fancyhead[OR]{\textbf {\thepage}\hspace*{2.25in}} % <================
\fancyhead[EL]{\textbf {\hspace*{2.25in}\thepage}} % <================
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{plain}

\chapter{Introduction}
\section{Introducing the fish}
\section{fox}
referring to \citet{Fish(1979)}.
A \textbf{fish}  (or \textbf{cat}) jungle sky.
\section{river}
\Blinddocument

\chapter{Introduction2}
\section{Introducing the fish2}
\section{fox2}
\newgeometry{ left=.5in, right=.5in}
\fancypagestyle{plain}{\fancyhf{}\fancyhead[EL,OR]{\textbf 
{\thepage}}\renewcommand{\headrulewidth}{0pt}}
\pagestyle{plain}

\begin{thebibliography}{9}
\bibitem[Fish(1979)]{Fish(1979)} Fish, Y(1979) \textit{orange HHH} New York: 
hot.  
\end{thebibliography}
\end{document}

答案1

关键思想是在开始时定义一次边距,然后使用“changepage”包中的“adjustwidth”来更改缩进。在“adjustwidth”环境中,可以根据定义的边距调整左右缩进:

 \begin{adjustwidth}{leftmargin}{rightmargin}

在这种情况下:

\begin{adjustwidth}{2.25in}{0pt}

之前左边距是 0.5 英寸,现在增加了 2.25 英寸,得到 2.75 。以下是更正后的代码:

\documentclass[openany]{book}
\usepackage{changepage}
\usepackage{blindtext}
\usepackage[showframe]{geometry} % <====================================
\geometry{%
 paperheight=9.8125in,
  paperwidth=8in, 
left=.5in, right=.5in,top=.75in,bottom=.4375in 
}
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{} 
\fancyhead[EL,OR]{\textbf {\thepage}}
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{plain}

\renewcommand{\rmdefault}{pag}

\usepackage[utf8]{inputenc}
\usepackage[hyphens]{url}
\usepackage[authoryear,round]{natbib}

\newcommand{\titlefontarash}{% 
\usefont{OT1}{pag}{b}{n}%
\fontsize{25}{\baselineskip}%
\selectfont%
}
\newcommand{\basefontarash}{%
\usefont{OT1}{pag}{b}{n}%
\fontsize{18}{\baselineskip}%
\selectfont%
}


\begin{document}

\title{\titlefontarash  Helping each other}
\author{\basefontarash Good boy}
{ % <===================================================================
\maketitle
 \let\clearpage\relax

\frontmatter
} % <===================================================================
\vspace*{\fill}
\begin{center}
\basefontarash To good...
\basefontarash To those good..
\end{center}
\vspace*{\fill}

\tableofcontents


\mainmatter
\begin{adjustwidth}{2.25in}{0pt}
\chapter{Introduction}
\section{Introducing the fish}
\section{fox}
referring to \citet{Fish(1979)}.
A \textbf{fish}  (or \textbf{cat}) jungle sky.
\section{river}
\Blinddocument

\chapter{Introduction2}
\section{Introducing the fish2}
\section{fox2}
\end{adjustwidth}

\begin{thebibliography}{9}
\bibitem[Fish(1979)]{Fish(1979)} Fish, Y(1979) \textit{orange HHH} New York: 
hot.  
\end{thebibliography}
\end{document}

相关内容