1

I want to type a book which has a relatively wide margin always on left, which is "oneside". However the page numbers are "twoside" that means even page numbers on left and odd page numbers on right. So far I get this but all page numbers are oneside:

\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}
2
  • you need the twoside option to get separate layout but then just set the oddsidemargin and the evensidemargin to the same value. Commented May 3, 2019 at 6:53
  • \fontsize{25}{\baselineskip}% will be wrong fro any title more than a line, you are setting 25pt text on a normal (12pt) baseline. why the low level \fontsize rather than \Huge (which is 25pt on a 30pt baseline)? Commented May 3, 2019 at 6:55

1 Answer 1

1

The key idea is to define margin one time at the beginning and then using "adjustwidth" using package "changepage" for changing the indentation. Within an "adjustwidth" environment the left and right indentations can be adjusted with respect to the defined margin:

 \begin{adjustwidth}{leftmargin}{rightmargin}

in this case:

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

previously the left margin was .5 inch now it adds 2.25 inch to get 2.75 . Below is the corrected code:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .