I have a sample of doc in latex and would like you to explain why this is not working as expected.
This is the code:
\documentclass{memoir}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{background}
\begin{document}
\SetBgContents{plain}
\pagestyle{plain}
\makeoddhead{plain}{}{}{header test}
\blinddocument
\clearpage
\blinddocument
\clearpage
\blinddocument
\clearpage
\end{document}
After compilation:
Indentation of the page changes from page to page
"header test" some time appears, sometime not
There are blank pages when I explicitly put "clearpage"
Can you please explain how to solve and make something stable ? Thanks
Unless specified otherwise, the default option passed to memoir
is to set the document in twoside
mode. See p 5 of the memoir
documentation under REMARKS:
Calling the class with no options is equivalent to:
\documentclass[letterpaper,10pt,twoside,onecolumn,openright,final]{memoir}
Under twoside
, the odd and even pages are offset from the inner margin, or the gutter. This results in the differing "indentations" of the page.
\makeoddhead
only sets the head
er for odd
pages. Odd pages only occur every other page, leaving even
page headers empty (the default for the plain
page style).
\clearpage
flushes all pending floats and starts a new page. There should be no blank page issued. However, with a call to \chapter
, memoir
actually issues \clearforchapter
, which is similar to \cleartorecto
or \cleardoublepage
. This necessarily clears pages until an odd page is reached, ensuring that a chapter starts on a right.