![使用 DIV 12 定义类似于 Koma Script 的几何页面布局](https://linux22.com/image/293477/%E4%BD%BF%E7%94%A8%20DIV%2012%20%E5%AE%9A%E4%B9%89%E7%B1%BB%E4%BC%BC%E4%BA%8E%20Koma%20Script%20%E7%9A%84%E5%87%A0%E4%BD%95%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80.png)
我想在 geometry 中定义一个页面布局,其值与 KOMA 脚本定义的值相似。遗憾的是,我为 geometry 提供的值并未按预期出现在设计中。
这是我使用的代码
\documentclass{scrbook}
\usepackage{layouts}
%\KOMAoptions{%
% DIV=12,% (Size of Text Body, higher values = greater textbody)
% % DIV=calc % (also areaset/classic/current/default/last)
% % -> after setting of spacing necessary!
% BCOR=10mm% (binding correction)
%}%
%
%\KOMAoptions{% (most options are for package typearea)
% twoside=true, % two side layout (alternating margins, standard in books)
% twocolumn=false, % (true)
% %
% headinclude=false,%
% footinclude=false,%
% mpinclude=false,%
% headsepline=true,%
% footsepline=false,%
%}%
\usepackage{geometry}
\geometry{%
%%% Paper Groesse
a4paper,
portrait,
%%% Koerper Groesse
textwidth=430pt, % modifies \textwidth, the width of body
textheight=610pt, % modifies \textheight, the height of body
%ignoreall, % sets both ignoreheadfoot and ignoremp to true
heightrounded, % This option rounds \textheight to n-times (n: an integer) of \baselineskip
%%% Margin
inner=4pt,
outer=22pt,
twoside, % switches on twoside mode with left and right margins swapped on verso pages.
bindingoffset=10mm, % removes a specified space for binding
%%% Dimensionen
headheight=17pt, % Alias: head
twoside,
}
\begin{document}
\pagenumbering{alph}
\pagestyle{empty}
\currentpage
\pagediagram
\pagevalues
\end{document}
对于 KOMA 脚本值(几何注释掉),这给了我
但对于几何图形,我尝试精确定义这些值,尤其是边距(偶数、奇数),但结果却完全不同,而且整个文本区域的位置也不同。我不期望有一个布局能够实现完全相同的页面内容,但应该很接近。
我需要如何修改几何图形的值才能获得类似的布局?为什么当前值最终会出现如此大的错误?
答案1
您设置了太多值,几何会警告您:
Package geometry Warning: Over-specification in `h'-direction.
`width' (430.0pt) is ignored.
删除其中一个内部/外部值并从 \oddsidemargin 和 bindingoffset 计算另一个:
\geometry{%
a4paper,
portrait,
textwidth=418.25555pt, % modifies \textwidth, the width of body
textheight=610pt, % modifies \textheight, the height of body
heightrounded,
inner=\dimexpr1in-12.5192pt-10mm\relax,
twoside,
bindingoffset=10mm,
headheight=17pt, % Alias: head
twoside,
}