![如何使用 classicthesis 和 geometry 在左/右边距内设置页码](https://linux22.com/image/388023/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20classicthesis%20%E5%92%8C%20geometry%20%E5%9C%A8%E5%B7%A6%2F%E5%8F%B3%E8%BE%B9%E8%B7%9D%E5%86%85%E8%AE%BE%E7%BD%AE%E9%A1%B5%E7%A0%81.png)
我使用 classicthesis 和 geometry 包来设置页边距。页码位于顶部外侧,但应位于所有页边距内。我已成功将页码置于顶部和底部页边距内,
我尝试过但没有效果的方法:1) 我尝试过几何包中的 includeall 和 includeemp — — 它成功地移动了页码,但随后减小了文本宽度,好像为边注腾出了空间2) 我尝试过 \marginparwidth 0pt、\marginparsep 0pt 来删除边注的空间,但这也不起作用。
这是一个有效的例子:
\documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty,dottedtoc, BCOR=5mm,paper=a4,fontsize=11pt, fontsize=11pt, ngerman,american, ]{scrreprt}
\input{classicthesis-config}
\usepackage[inner=3.5cm, outer=2.5cm, top=2.5cm, bottom=2.5cm,includefoot,includehead]{geometry}
\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark}{}
\pagestyle{pgnumbottomcenter}
\deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{}
\renewcommand{\chapterpagestyle}{pgnumtopouter}
\begin{document}
\pagestyle{scrheadings}
\pagenumbering{roman}
\section{hello}
\newpage
\section{what's up}
\end{document}
第二页的屏幕截图,展示了我想要实现的目标:
答案1
\documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty,dottedtoc, BCOR=5mm,paper=a4,fontsize=11pt, fontsize=11pt, ngerman,american, ]{scrreprt}
\input{classicthesis-config}
\usepackage[inner=3.5cm, outer=2.5cm, top=2.5cm, bottom=2.5cm,includefoot,includehead]{geometry}
\lehead{\mbox{{\small\pagemark\kern2em}\headmark\hfil}}
\rohead{\mbox{\hfil{\headmark}{\small\kern2em\pagemark}}}
\begin{document}
\pagenumbering{roman}
\section{hello}
xxxxxxxxxx\hfill xxxxxxxx
\newpage
\section{what's up}
xxxxxxxxxx\hfill xxxxxxxx
\newpage
\pagenumbering{arabic}
\section{Hello}
xxxxxxxxxx\hfill xxxxxxxx
\newpage
\noindent xxxxxxxxxx\hfill xxxxxxxx
\end{document}