我想知道如何将页码进一步移到外面:
+----------------------------+
| |
| dsad sadsad sad s |
| dasdsa dasd sadas |
| dasd sadas ds asd |
| |
| dsad sadsad sad s |
| dasdsa dasd sadas |
| dasd sadas ds asd |
| |
| dsad sadsad sad s |
| dasdsa dasd sadas |
| dasd sadas ds asd |
| |
| 1 |
+----------------------------+
如果可能的话,我也想上下调整位置。页码需要位于页面上的特定位置,因为我必须使用预制的背景图像,这些图像在页码应该出现的位置有空白。
梅威瑟:
\documentclass[a4paper,10pt, sectionprefix]{scrbook}
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\bfseries}
\setkomafont{pagination}{}
\setlength{\footskip}{20pt}
\ofoot*{\Huge{~\pagemark}}
\usepackage[bindingoffset=0.5cm,margin=1.8cm]{geometry}
\setlength{\columnsep}{4em}
\usepackage{blindtext}
\begin{document}
\blindtext[5]
\blindmathpaper
\blindmathpaper
\end{document}
答案1
以下是使用该ifoddpage
软件包将页码放在外边距的解决方案:
\documentclass[a4paper,10pt, sectionprefix]{scrbook}
\usepackage{scrlayer-scrpage}
\usepackage{ifoddpage}
\clearpairofpagestyles
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\bfseries}
\setkomafont{pagination}{}
\setlength{\footskip}{20pt}%
\ofoot*{\Huge\checkoddpage\ifoddpage\rlap{\quad\pagemark}\else\llap{\pagemark\quad}\fi}
\setlength{\footskip}{20pt}%
\usepackage[bindingoffset=0.5cm,margin=1.8cm]{geometry}
\setlength{\columnsep}{4em}
\usepackage{blindtext}
\begin{document}
\blindtext[5]
\blindmathpaper
\blindmathpaper
\end{document}
答案2
你可以使用
\KOMAoptions{footwidth=\textwidth+3em:0pt}
3em
几何设置后,通过外边缘放大脚的宽度。
有警告scrlayer-scrpage
:您应该 \footheight
至少放大到 19.16791pt。这可以通过类选项完成。可以通过选项footheight=19.16791pt
更改脚跳。geometry
footskip
\documentclass[
%a4paper,% default
10pt,
%sectionprefix,% unknown/unused option
footheight=19.16791pt% <- added as suggested by scrlayer-scrpage
]{scrbook}
\usepackage[bindingoffset=0.5cm,margin=1.8cm,
footskip=20pt%<- changed, use the geometry option
]{geometry}
\usepackage{scrlayer-scrpage}
\AtBeginDocument{\KOMAoptions{footwidth=\textwidth+3em:0pt}}%<-added, use after geometry settings
\clearpairofpagestyles
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\bfseries}
\setkomafont{pagination}{\Huge}% <-changed
\ofoot*{\pagemark}% <- changed
\setlength{\columnsep}{4em}
\usepackage{blindtext}
\begin{document}
\blindtext[5]
\blindmathpaper
\blindmathpaper
\end{document}
要更改页脚的垂直位置,您可以使用
%\providecommand*\Ifstrstart{\ifstrstart}%needed for older KOMA-Script versions
\ForEachLayerOfPageStyle*{scrheadings}{%
\Ifstrstart{#1}{scrheadings.foot.}{\ModifyLayer[addvoffset=15pt]{#1}}{}%
}
\ForEachLayerOfPageStyle*{plain.scrheadings}{%
\Ifstrstart{#1}{plain.scrheadings.foot.}{\ModifyLayer[addvoffset=15pt]{#1}}{}%
}
但您也可以为页码声明新的图层。