I'm new to Tex, I use shareLatex specifically. When I write my 'book' document every page that has "Chapter ..." on it is displaying fine and the text aligns to the odd-side margin (?) nicely. But then every page after that is strangely shifted to the right (I don't believe it has something to do with indentation as the chapter title at the top of the page is also shifted). This also happens with the table of contents.
Here is an image, the top page has the 'chapter' text on it and the bottom page is strangely shifted. Please excuse the quality, I have limited resources atm.
"Hoofdstuk 4" means chapter 4 in my native language.
My document is built up like this:
\documentclass[12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[dutch]{babel}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage[backend=biber,
style=alphabetic,
sorting=ynt]{biblatex}
\addbibresource{references.bib}
\usepackage[hidelinks]{hyperref}
\setlength{\parskip}{1.2ex} % space between paragraphs
\setlength{\parindent}{0cm}%2em} % amount of indention
\setlength{\textwidth}{175mm} % default = 6.5"
\setlength{\oddsidemargin}{-5mm} % default = 0"
\setlength{\textheight}{225mm} % default = 9"
\setlength{\topmargin}{-12mm} % default = 0" -12mm
\begin{document}
\begin{titlepage}
\begin{center}
\vspace*{3cm}
{...}\\[1cm]
{...}\\[1cm]
{...}
\end{center}
...\\
...\\
...
\begin{center}
\textit{...}\\[2cm]
\includegraphics[scale= 0.5]{picture.jpg}
\end{center}
\let\newpage\relax % Avoid following page break
\end{titlepage}
\tableofcontents
\chapter{chapter 1}
\section{section 1}
etc..
Hopefully this can be sorted out as I have looked everywhere for a solution. Thank you for reading all this.
\textwidth
on all pages but only reduced\oddsidemargin
so even pages are shifted off too far you need to set\evensidemargin
. Alsotextheight
should be\topskip
+ an integer multiple of\baselineskip
otherwise a large block of text with no vertical space on the page can never fit on the page.oneside
option, i.e.,\documentclass[oneside,12pt]{book}
.