我正在使用titleps
我的硕士论文。当我按照以下方式更改显示跳过时这个答案标题会偏移。如果不使用橡皮间距,标题只会发生最小偏移。如果能提供一些建议,我将不胜感激。
\documentclass{book}
\usepackage{blindtext}
\usepackage{etoolbox}
%%%%%%%%%SPACING%%%%%%%%%%%%%%%%%
\apptocmd\normalsize{
\setlength\abovedisplayskip{.5cm plus .1cm minus .1cm}
\setlength\belowdisplayskip{.5cm plus .1cm minus .1cm}
\setlength\abovedisplayshortskip{.1cm plus .1cm minus .1cm}
\setlength\belowdisplayshortskip{.5cm plus .1cm minus .1cm}}{}{}
%%%%%%%%%%%%%%PAGESTYLES%%%%%%%%%%%%%%%%%%%%
\usepackage[pagestyles]{titlesec}
\newpagestyle{main}[\small]{
\setheadrule{.3pt}
\sethead[Chapter \thechapter][][]
{}{}{\thesection \, \sectiontitle}
\setfoot[\thepage][][]
{}{}{\thepage}}
\pagestyle{main}
\begin{document}
\Blindtext
\end{document}
答案1
您对代码的修改是在输出中添加额外的空格,代码中的每个换行符对应一个空格。您需要使用以下字符\normalsize
注释掉这些行尾%
\apptocmd\normalsize{%
\setlength\abovedisplayskip{.5cm plus .1cm minus .1cm}%
\setlength\belowdisplayskip{.5cm plus .1cm minus .1cm}%
\setlength\abovedisplayshortskip{.1cm plus .1cm minus .1cm}%
\setlength\belowdisplayshortskip{.5cm plus .1cm minus .1cm}}{}{}
看行末百分号(%)有什么用?进行相关讨论。
\documentclass{book}
\usepackage{blindtext}
\usepackage{etoolbox}
%%%%%%%%%SPACING%%%%%%%%%%%%%%%%%
\apptocmd\normalsize{
\setlength\abovedisplayskip{.5cm plus .1cm minus .1cm}
\setlength\belowdisplayskip{.5cm plus .1cm minus .1cm}
\setlength\abovedisplayshortskip{.1cm plus .1cm minus .1cm}
\setlength\belowdisplayshortskip{.5cm plus .1cm minus .1cm}}{}{}
%%%%%%%%%%%%%%PAGESTYLES%%%%%%%%%%%%%%%%%%%%
\usepackage[pagestyles]{titlesec}
\newpagestyle{main}[\small]{
\setheadrule{.3pt}
\sethead[Chapter \thechapter][][]
{}{}{\thesection \, \sectiontitle}
\setfoot[\thepage][][]
{}{}{\thepage}}
\pagestyle{main}
\begin{document}
\Blindtext
\end{document}