# classicthesis marginpar

The document reproduced below has a problem with the margin note going outside the page. If I remove the package classicthesis then the problem solves: the note stays inside the page. So there is a problem of interaction with classicthesis (I had many, but I like so much the style of classicthesis and I would like to keep it). If I experiment with the file classicthesis.sty (see http://ctan.mirror.garr.it/mirrors/CTAN/macros/latex/contrib/classicthesis/classicthesis.sty) I find that the problem is caused by the lines

    \setlength{\marginparwidth}{...}%
\setlength{\marginparsep}{...}%


which redefine the dimensions of the margin. If I remove all these lines (there are many "if" branches and I'm not sure which is executed) the problem solves.

What is the best way to fix this problem? Maybe I should redefine these length to the default value, but how I find what is the default value? Maybe I can customize the file classicthesis, but I don't feel comfortable with this option. Any suggestion would be appreciated.

added: the problem is maybe also caused by the interaction with the geometry package. I need custom page size and I'm not sure what is the correct way to provide it: after many iterations I find as the only solution to load the geometry package after classicthesis. Not sure if it is the correct way to go.

\documentclass[italian,twoside,headinclude]{scrbook}
\usepackage{amsmath,amssymb,amsthm,thmtools}
\usepackage{babel}
\usepackage[nochapters,pdfspacing]{classicthesis}
\usepackage[paperwidth=7in,paperheight=10in,bindingoffset=0.625in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{sidenotes}
\usepackage{marginnote}
\usepackage{mparhack} % fix margin notes (otherwise sometime they go to wrong margin!)
\newcommand{\mymark}[1]{\reversemarginpar\marginnote{#1}\normalmarginpar}

\newcommand{\mynote}[1]{\marginnote{{\footnotesize #1}}}
\newcommand{\mymargin}[1]{\mynote{#1}\index{#1}}
\newcommand{\myemph}[1]{\emph{#1}\mynote{#1}\index{#1}}

\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\normalfont,
qed=,
]{exercise_style}

\declaretheoremstyle[
spaceabove=6pt, spacebelow=6pt,
qed=,
]{axiom_style}

\declaretheorem[name=Teorema,numberwithin=chapter]{theorem}
\declaretheorem[style=axiom_style,name=Assioma,sibling=theorem]{axiom}

\begin{document}
\begin{axiom}[campo ordinato]
\mynote{campo ordinato}
\index{campo!ordinato}
Le operazioni di campo e l'ordinamento sono compatibili nel senso che
valgono le seguenti proprietà:
\begin{enumerate}
\item positività: se $x\ge 0$ e $y \ge 0$ allora $x+y \ge 0$ e $x\cdot y\ge 0$;
\item monotonia: se $x \ge y$ allora $x+z \ge y+z$.
\end{enumerate}
\end{axiom}
\end{document}


• Just out of curiosity: why inches? – egreg May 10 '18 at 7:50
• I'm trying to upload a book to www.createspace.com which has only a predefined set of paper sizes (expressed in inches). – Emanuele Paolini May 10 '18 at 15:02

With your setting, the space reserved to margin notes goes outside the page.

\oddsidemargin=28.18587pt
\textwidth=322.50346pt
\marginparsep=21.90005pt
\marginparwidth=76.65019pt

Converting to inches, the first three parameters amount to 5.16; one has to add the default 1in, leading to 6.16in.

Your paper is 7in wide, leaving so 0.84in (60.7pt) and you see that the margin par space goes beyond the page.

I believe that 0.625in of binding correction (16mm) is excessive; no (good) binding takes more than 7mm. In any case, you have to change some of the pagination parameters.

You can see the blocks for the page by using the layout package:

• Thanks! So I solved by adding marginparwidth=70.7, marginparsep=11.9 so that the margin should extend exactly to the page boundary. If I understand correctly: the point is that classicthesis can only deal with predefined page sizes, if I want to customize the page size I have to define all the sizes of margins etc. – Emanuele Paolini May 10 '18 at 15:19