这个问题继续我的其他。
我在学术写作中必须使用奇怪的边距和行距。MWE:
\documentclass[
pagesize,
usegeometry = on,
DIV = calc% for the line spacing, KOMA-Script manual, page 40
]{scrartcl}
\usepackage[
left = 25mm,
bottom = 20mm,
right = 45mm,
top = 20mm
]{geometry}
\usepackage{scrlayer-scrpage}
\usepackage[onehalfspacing]{setspace}% for the line spacing, KOMA-Script manual, page 40
% for the line spacing, KOMA-Script manual, page 40:
\AfterTOCHead{\singlespacing}
\KOMAoptions{
DIV = last,
onpsinit = {\linespread{1}\selectfont}% slightly heaves the page numbers
}
\begin{document}
Test.
\end{document}
结果: 我可以更好地控制页码的位置吗?页码下方至少应有一行高的空间!
提前感谢您的帮助和努力!
答案1
首先:设置完成DIV=last
后不要使用geometry
。这个 KOMA-Script 选项会重新计算类型区域!加载包showframe
或使用几何选项showframe
来查看差异。例如,左右边距将再次具有相同的宽度。
在 之前setspace
用 选项加载包。然后您可以使用几何选项和。onehalfspacing
geometry settings
heightrounded
footskip=<length>
自 KOMA-Script 版本 3.24(当前为 3.25)起,有一个singlespacing
选项scrlayer-scrpage
。
\documentclass[
usegeometry = on,
DIV=calc
]{scrartcl}
\usepackage[onehalfspacing]{setspace}% before the geometry settings
\usepackage[
left = 25mm,
bottom = 20mm,
right = 45mm,
top = 20mm,
includehead,% remove if the header should be inside the 20mm top margin
heightrounded,
footskip=30pt% <- adjust to your needs
]{geometry}
\usepackage[singlespacing]{scrlayer-scrpage}
\AfterTOCHead{\singlespacing}
% the following packages are only for this example:
\usepackage{showframe}% to show the page layout
\usepackage{layout}% to show the page layout
\begin{document}
\layout% to show the page layout
Test.
\end{document}
请注意,KOMA-Script 选项pagesize
是默认选项。如果您删除这两个选项usegeometry=on
,则DIV=calc
上例中只会\marginparwidth
发生更改。
还可以移动scrheadings
和页脚中的所有图层plain.scrheadings
。如果这些图层的底部应位于页面下边框上方 2\baselineskips,则可以使用
\documentclass[
usegeometry = on,
DIV=calc
]{scrartcl}
\usepackage[onehalfspacing]{setspace}% before the geometry settings
\usepackage[
left = 25mm,
bottom = 20mm,
right = 45mm,
top = 20mm,
includehead,% remove if the header should be inside the 20mm top margin
heightrounded,
]{geometry}
\usepackage[singlespacing]{scrlayer-scrpage}
\ForEachLayerOfPageStyle*{scrheadings}{%
\ifstrstart{#1}{scrheadings.foot}
{\ModifyLayer[voffset=\paperheight-2\baselineskip,align=b]{#1}}
{}%
}
\ForEachLayerOfPageStyle*{plain.scrheadings}{%
\ifstrstart{#1}{plain.scrheadings.foot}
{\ModifyLayer[voffset=\paperheight-3\baselineskip,align=b]{#1}}
{}%
}
\AfterTOCHead{\singlespacing}
% the following packages are only for this example:
\usepackage{showframe}% to show the page layout
\usepackage{layout}% to show the page layout
\begin{document}
\layout% to show the page layout
Test.
\end{document}
结果:
答案2
一种可能性是使用例如命令
\setlength{\footskip}{0.75cm}
定义文本最后一条底线与脚第一条底线之间的距离。根据需要更改该值...
使用以下 MWE
\documentclass[%
pagesize,
usegeometry = on,
DIV = calc, % for the line spacing, KOMA-Script manual, page 40
]{scrartcl}
\usepackage[%
left = 25mm,
bottom = 20mm,
right = 45mm,
top = 20mm,
showframe % <=========================================================
]{geometry}
\usepackage{scrlayer-scrpage}
\usepackage[onehalfspacing]{setspace}% for the line spacing, KOMA-Script manual, page 40
% for the line spacing, KOMA-Script manual, page 40:
\AfterTOCHead{\singlespacing}
\KOMAoptions{%
DIV = last,
onpsinit = {\linespread{1}\selectfont}% slightly heaves the page numbers
}
\setlength{\footskip}{0.75cm} % <=======================================
\begin{document}
Test.
\end{document}
你得到了结果(看到我使用选项showframe
来可视化打字区域和边距):