首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >改变乳胶中的头宽w/out fancyhdr

改变乳胶中的头宽w/out fancyhdr
EN

Stack Overflow用户
提问于 2016-05-25 14:34:49
回答 1查看 305关注 0票数 0

我很难用乳胶做我的风格。

这是一辆mwe:

代码语言:javascript
复制
\documentclass{scrbook}
\usepackage{lipsum}
\usepackage[pagestyles]{titlesec}   
\usepackage{scrpage2}
\pagestyle{scrheadings}
\renewcommand*{\chapterpagestyle}{empty}
\renewcommand*{\headfont}{\normalfont}
\lefoot[LE]{\makebox[0pt][r]{\makebox[2cm][l]{\thepage}}}
\rofoot[RO]{\makebox[0pt][l]{\makebox[2cm][r]{\thepage}}}
\usepackage[]{setspace}
\usepackage{showframe}
\setlength{\textheight}{20cm}
\setlength{\textwidth}{13cm}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\renewcommand*{\chapterpagestyle}{empty}
\renewcommand*{\headfont}{\normalfont}

\begin{document}
\chapter{chapter test}
\lipsum[1-2]
\section{section test2}
\lipsum[3-10]
\end{document}

我希望将标题分散在外部,直到分页编号,这样标题和分页编号是合理的。我似乎无法做到这一点。谢谢你,弗莱斯弗罗森

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-05-25 18:31:59

您可以通过\leftmark访问章节编号/标题,通过\rightmark访问节号/标题。然后,只需使用与页脚相同的符号和框操作:

代码语言:javascript
复制
\documentclass{scrbook}

\usepackage{lipsum}

\renewcommand*{\chapterpagestyle}{empty}
\renewcommand*{\headfont}{\normalfont}

\usepackage{scrpage2}
\pagestyle{scrheadings}

\lefoot{\makebox[0pt][r]{\makebox[2cm][l]{\thepage}}}
\rofoot{\makebox[0pt][l]{\makebox[2cm][r]{\thepage}}}
\lehead{\makebox[0pt][r]{\makebox[2cm][l]{\leftmark}}}
\rohead{\makebox[0pt][l]{\makebox[2cm][r]{\rightmark}}}

\begin{document}

\chapter{chapter test}
\lipsum[1-2]

\section{section test2}
\lipsum[3-10]

\end{document}

虽然对于标题内容来说,2cm框太小了,但这并不重要,因为您只是对特定的位置/对齐感兴趣。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37440323

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档