1

I am writing my thesis in book class but I figured out that my title chapters are appearing on the left side of the pdf instead of right. I see some discussions that chapter title page must be appear on the right side and also odd pages should be on the right side. I have tried several but not working. Is it because of some package error ?

I have tried this discussion but not working. my compiler is XeLaTeX. My MWE is,

this is the output

\PassOptionsToPackage{square,comma,numbers,sort&compress,super}{natbib}

\documentclass[a4paper, twoside, 12pt]{book}

\usepackage{newunicodechar} % It is used to remove the error due to the previous document class

\usepackage{booktabs} %for table lines

\usepackage{textgreek,stackengine} %for a dot over the greek letters

\newunicodechar{fi}{fi}

\newunicodechar{ff}{ff}

\UseRawInputEncoding

\usepackage[colorlinks=true]{hyperref}

\hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta,
urlcolor=cyan, }

\usepackage{graphicx}

\usepackage{textcomp}

\usepackage{fontspec}

\usepackage{graphics}

\usepackage{natbib}

\usepackage[symbols,nogroupskip,nonumberlist,acronym]{glossaries-extra}

\makeglossaries

\loadglsentries{glos}

\usepackage{threeparttable}

\usepackage{amsmath}

\usepackage{xcolor}

\usepackage{setspace}

\usepackage{fancyhdr}

\pagestyle{fancy}

\fancyhead[RO,LE]{\small\thepage}

\fancyhead[LO]{\small \emph{\nouppercase{\leftmark}}}

\fancyhead[RE]{\small \emph{\nouppercase{\rightmark}}}

\fancyfoot[L,R,C]{}

\renewcommand{\headrulewidth}{1pt}

\renewcommand{\footrulewidth}{1pt}

\newcommand{\chapabstract}[1]{ \begin{quote}\singlespacing\small \rule{11.5cm}{1pt}\#1\vskip-4mm\rule{11.5cm}{1pt}\end{quote} } \newcommand{\publn}{ \begin{quote} \singlespacing\small \end{quote} }

\begin{document}

\frontmatter

\pagenumbering{roman}

\include{firstpage}

\include{frontmatter}

\tableofcontents

\clearpage{\pagestyle{empty}\cleardoublepage}

\listoftables

\clearpage{\pagestyle{empty}\cleardoublepage}

\mainmatter

\setcounter{page}{1}

\pagenumbering{arabic}

\input{intro}       %%Chapter 1%%

\input{Materialia}  %%Chapter 2%%

\cleardoublepage

 \singlespacing

 \renewcommand{\bibname}{References}

 \bibliographystyle{IEEEtran}

  \bibliography{RSC}

   \end{document}

  • forgive me for the extended MWE. – Sanjay Remanan Jul 29 '20 at 17:26
  • 1
    The default arrangement for the book class is for odd-numbered pages to be on the right. That this is actually what is happening is confirmed by the location of the even page number, which would be the outside edge when printed and bound. Some pdf-readers try to "save space" on a screen by starting on the left, but they're wrong! One thing that should be fixed in your file is the location where hyperref is loaded; it should be near the end of the preamble; packages that should be loaded later are named in the documentation. – barbara beeton Dec 19 '22 at 00:50

1 Answers1

0

When I try to use xelatex it comes back with Segmentation fault (core dumped) so I used lualatex instead on your MWE, which I edited slightly to comment out the files you did not provide, replacing them with a simple version of what I assume their contents are.

% chapterprob.tex SE 555584

\PassOptionsToPackage{square,comma,numbers,sort&compress,super}{natbib} \documentclass[a4paper, twoside, 12pt]{book}
\usepackage{newunicodechar} % It is used to remove the error due to the previous document class
\usepackage{booktabs} %for table lines \usepackage{textgreek,stackengine} %for a dot over the greek letters \newunicodechar{fi}{fi}
\newunicodechar{ff}{ff}
\UseRawInputEncoding
\usepackage[colorlinks=true]{hyperref}
\hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta,
urlcolor=cyan, }
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{fontspec} \usepackage{graphics}
\usepackage{natbib}
\usepackage[symbols,nogroupskip,nonumberlist,acronym]{glossaries-extra}
\makeglossaries
\loadglsentries{glos}
\usepackage{threeparttable}
\usepackage{amsmath}
\usepackage{xcolor} \usepackage{setspace}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RO,LE]{\small\thepage}
\fancyhead[LO]{\small \emph{\nouppercase{\leftmark}}}
\fancyhead[RE]{\small \emph{\nouppercase{\rightmark}}}
\fancyfoot[L,R,C]{}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\newcommand{\chapabstract}[1]{ \begin{quote}\singlespacing\small \rule{11.5cm}{1pt}\#1\vskip-4mm\rule{11.5cm}{1pt}\end{quote} } \newcommand{\publn}{ \begin{quote} \singlespacing\small \end{quote} }

\begin{document}

\frontmatter

\pagenumbering{roman}

\include{firstpage}

\include{frontmatter}

\tableofcontents

\clearpage{\pagestyle{empty}\cleardoublepage}

\listoftables

\clearpage{\pagestyle{empty}\cleardoublepage}

\mainmatter

% \setcounter{page}{1} % \mainmatter sets this

% \pagenumbering{arabic} % \mainmatter sets this

% \input{intro} %%Chapter 1%% \chapter{Introduction} Some text.

% \input{Materialia} %%Chapter 2%% \chapter{Materiala} More text.

\cleardoublepage

 \singlespacing

 \renewcommand{\bibname}{References}

 \bibliographystyle{IEEEtran}

  \bibliography{RSC}

   \end{document}

The above MWE starts each chapter on the right hand (recto, odd) page.

Your problem may be with xelatex but probably not. More likely is what you have in your intro.tex and Materiala.tex files which you haven't given us an inkling of.

Peter Wilson
  • 28,066
  • Hi Wilson, Thanks for your answer. I have tried this, but my Texstudio is printing on the left side only. I also downloaded Texmaker and run my code. Same, I cannot find the the error. In my code, I tried by deactivating rest of the chapter and also deactivated the user package one by one. But still the effect remain same. – Sanjay Remanan Jul 30 '20 at 09:59