I'm trying to typeset a book (actually, a dictionary) but keep having trouble setting equal inner and outer margins on both even and odd pages. I have done it numerous times before, but this time either Geometry ignores my parameters or sth else is going on.
I would be grateful if you could shed some light...
Here's what the code looks like (not the complete source):
\documentclass[6pt,twoside]{scrbook}
\usepackage[paperwidth=4.125in,
paperheight=6.25in,
bindingoffset=0.2in,
inner=1.0in,
outer=0.5in,
top=0.4in,
bottom=0.75in,
columnsep=20pt,
layoutsize={4in,6in},
layouthoffset=0.125in,
layoutvoffset=0.25in,
showcrop=true,
showframe=true
]
{geometry}
And here's what the result looks like (I would obviously like a greater outer margin on odd pages - and an accordingly smaller inner margin - so that everything fits fine)
P.S. In case it matters, the source code is being compiled with xelatex
. If you need to see more code, just let me know! ;)
UPDATE
Source sample:
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[6pt,twoside]{scrbook}
\usepackage[paperwidth=4.125in,
paperheight=6.25in,
bindingoffset=0.2in,
inner=1.0in,
outer=0.5in,
top=0.4in,
bottom=0.75in,
columnsep=20pt,
layoutsize={4in,6in},
layouthoffset=0.125in,
layoutvoffset=0.25in,
showcrop=true,
showframe=true
]
{geometry}
\usepackage[strict]{changepage}
\usepackage{atveryend}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\usepackage{palatino}
\usepackage{microtype}
\usepackage{multicol}
\usepackage[bf,sf,center]{titlesec}
\usepackage{afterpage}
%\usepackage{ragged2e}
\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhead[L]{\textsf{\rightmark}}
\fancyhead[R]{\textsf{\leftmark}}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[C]{}
\pagestyle{fancy}
%\usepackage[utf8]{inputenc}
%\usepackage[T2A,T1]{fontenc}
\usepackage[spanish,english]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\definecolor{ultralightgray}{gray}{0.90}
\usepackage{tabularx}
\newcommand{\printchaptertitle}[1]{
\vspace{0.5cm}
\flushleft
\begin{tikzpicture}
\draw[fill,color=black] (0,0) rectangle (1cm,1cm);
\draw[color=white] (0.5cm,0.5cm) node { \Huge{#1} };
\end{tikzpicture}
\vspace{0.5cm}
}
\setlength{\parindent}{0pt}
\setmainfont[ItalicFont={Times New Roman Italic},BoldItalicFont={Times New Roman Bold Italic}]{Frutiger}
\setsansfont[ItalicFont={Times New Roman Italic},BoldItalicFont={Times New Roman Bold Italic}]{Frutiger}
\newfontfamily\hebr{Myriad Hebrew}
\usepackage{hang}
\usepackage{xeCJK}
\setCJKmainfont{PingFang SC}
\setCJKsansfont{PingFang SC}
\newcommand{\conjpageindex}[2]{
\leavevmode\checkoddpage
\ifoddpage{\begin{tikzpicture}[overlay,remember picture]\node[left,rectangle,white,fill=darkgray!70!white,minimum width=1.4cm,text width=1.0cm,align=left] at ($(current page.east) +(0cm,#2)$){\bfseries{#1}};\end{tikzpicture}}\else{\begin{tikzpicture}[overlay,remember picture]\node[right,rectangle,white,fill=darkgray!70!white,minimum width=1.4cm,text width=1.0cm,align=right] at ($(current page.west) +(0cm,#2)$){\bfseries{#1}};\end{tikzpicture}}\fi
}
\newcommand{\lemmaposp}[1]{{\textcolor{darkgray}{\bfseries\textit{#1}}}}
\newcommand{\lemmagender}[1]{{\textit{#1}}}
\newcommand{\conjsection}[1]{%
{$\smash{\textbf{\color{black} #1}}$}
}
\newcommand{\conjsubsection}[1]{%
{\textit{\underline{\smash{#1}}}}
}
\newcommand{\conjseparator}{%
\vspace{0.3cm}
}
\usepackage{tcolorbox}
\definecolor{mycolor}{rgb}{0.435, 0.435, 0.435}
\makeatletter
\newcommand{\mybox}[1]{%
\setbox0=\hbox{#1}%
\setlength{\@tempdima}{\dimexpr\wd0+13pt}%
\begin{tcolorbox}[colframe=mycolor,boxrule=0.5pt,arc=4pt,
left=6pt,right=6pt,top=6pt,bottom=6pt,boxsep=0pt,width=\@tempdima]
#1
\end{tcolorbox}
}
\makeatother
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PHRASEBOOK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter*{Phrasebook}
\addcontentsline{toc}{chapter}{Phrasebook}
\section*{Numbers}
\addcontentsline{toc}{section}{Numbers}
\lipsum[1-12]
\section*{Useful Phrases}
\addcontentsline{toc}{section}{Useful Phrases}
\lipsum[1-12]
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is the end,
% my only friend the end...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%