TransWikia.com

Undesired margin shift - No error and warnings - Underfull vbox (badness 1521)

TeX - LaTeX Asked by Simon Rucinski on February 10, 2021

I am almost done with my scientific paper but I have an irritating problem. Some of the margins in my paper are shifted. Please take a look at the attached document. My compilation is free from any errors or warnings. The only message that I am getting is the one below. How can I fix this margin shift? 🙂

enter image description here
enter image description here

 documentclass[a4paper,12pt,english,twoside]{extreport}
    % ustawienia marginesów
    usepackage{geometry}
    geometry{
     a4paper,
     top=25mm,
     inner=35mm,
     outer=25mm,
     bottom=25mm,
    }
% ustawienie interlinii na 1.5
renewcommand{baselinestretch}{1.5}

% ustawienia paragrafów
setlength{parskip}{1em}

% zmiana punktowania list na myślniki
renewcommandlabelitemi{---}

% polskie znaki
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
% usepackage[polish]{babel}
% usepackage{polski}

% bibliografia
usepackage{csquotes}
usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
addbibresource{bibliography.bib}
usepackage{hyperref}

% listingi i spis listingów
usepackage{listings}
usepackage[center]{caption}
DeclareCaptionType{code}[Listing][List of listings]
lstset{breaklines=true,basicstyle=ttfamilyscriptsize}

% rysunki i spis rysunków
usepackage{float}
usepackage{graphicx}
graphicspath{ {./img/} }
usepackage[nottoc]{tocbibind}

% tabele
floatstyle{plaintop}
restylefloat{table}
captionsetup[table]{name=Tabel}

usepackage{color}
usepackage{listings}
lstset{ %
language=Python,                % choose the language of the code
basicstyle=footnotesize,       % the size of the fonts that are used for the code
numbers=left,                   % where to put the line-numbers
numberstyle=footnotesize,      % the size of the fonts that are used for the line-numbers
stepnumber=1,                   % the step between two line-numbers. If it is 1 each line will be numbered
numbersep=5pt,                  % how far the line-numbers are from the code
backgroundcolor=color{white},  % choose the background color. You must add usepackage{color}
showspaces=false,               % show spaces adding particular underscores
showstringspaces=false,         % underline spaces within strings
showtabs=false,                 % show tabs within strings adding particular underscores
frame=single,           % adds a frame around the code
tabsize=2,          % sets default tabsize to 2 spaces
captionpos=b,           % sets the caption-position to bottom
breaklines=true,        % sets automatic line breaking
breakatwhitespace=false,    % sets if automatic breaks should only happen at whitespace
escapeinside={%*}{*)}          % if you want to add a comment within your code
}


% strona tytułowa
usepackage{pdfpages}

% treść
begin{document}
pagenumbering{gobble}
includepdf[pages={1}]{pdf/title_page}
% nullnewpage
pagenumbering{arabic}
input{tableofcontents}
input{./Chapters/chapter1}
input{./Chapters/chapter2}
input{./Chapters/chapter3}
input{./Chapters/chapter4}
input{./Chapters/chapter5}
input{./Chapters/chapter6}
input{./Chapters/chapter7}
input{./Chapters/onsetDetection}

% section{Wstawianie odniesień do literatury}
% Odniesienie do książki cite{example_book}. Odniesienie do strony internetowej cite{example_website}.
newpage
printbibliography[heading=bibintoc]

newpage
listoffigures

newpage
listofcodes

newpage
renewcommand{listtablename}{List of tabels}
listoftables

end{document}

One Answer

The margins are shifted because you use twoside as a document option. This option set the margins so that they feel right when looking at a double spread (thanks @Ulrike!) so it shifts the margins between even and odd pages (also, the position of the page number, the running heads, etc., may depend on the even/odd page).

BTW the underfull boxes are completely unrelated...

(Probably a duplicate. Let's see if I can find it...)

Answered by Rmano on February 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP