我正在尝试排版一本书(实际上是一本字典),但一直无法在偶数页和奇数页上设置相等的内边距和外边距。我以前做过很多次,但这次要么是 Geometry 忽略了我的参数,要么是发生了其他事情。
如果您能提供一些启发,我将不胜感激……
代码如下(不是完整的源代码):
\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}
结果如下所示(我显然希望奇数页的外边距更大 - 内边距也相应更小 - 这样所有内容都可以很好地适应)
PS 以防万一,源代码正在编译xelatex
。如果您需要查看更多代码,请告诉我!;)
更新
源示例:
%----------------------------------------------------------------------------------------
% 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...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
答案1
以下给出了奇数页和偶数页之间的对称布局:
\documentclass[fontsize=6pt,twoside]{scrbook}
\usepackage[paperwidth=4.125in,
paperheight=6.25in,
%bindingoffset=0.2in, % <----------- commented out
inner=1.0in,
outer=1.0in, % <----------- same as inner
top=0.4in,
bottom=0.75in,
columnsep=20pt,
layoutsize={4in,6in},
layouthoffset=0.125in,
layoutvoffset=0.25in,
showcrop=true,
showframe=true
]
{geometry}
% You can also use this to visualize the layout:
% \usepackage{showframe}
% \renewcommand\ShowFrameLinethickness{0.15pt}
% \renewcommand*\ShowFrameColor{\color{blue!30!white}}
\begin{document}
\noindent A\newpage \noindent B
\end{document}
注意:看到 KOMA-Script 警告后,我将您的6pt
\documentclass
选项替换为fontsize=6pt
。