1) 主要问题:如何减少章节标题中的行距?似乎使用
\setSingleSpace{1.3} \SingleSpacing
我希望章节标题为单倍行距,行距为 1.0。但是,这适用于整个文档。
2) 如何使页码与页眉的第一行或第二行对齐?目前它介于两者之间。
3) 如何将页眉中的部分字体更改为\textsc
? 仅在页眉中,而不是在文档文本中。
梅威瑟:
\documentclass[12pt, a4paper,english,reqno, twoside]{memoir}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage{afterpage}
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{amsfonts,amssymb,amsfonts,amsthm}
\usepackage{array}
\usepackage{atbegshi}
\usepackage[american, german]{babel}
\usepackage{bm}
\usepackage{booktabs}
\usepackage{breqn}
\usepackage{calc}
\usepackage{caption}
\usepackage{color}
\usepackage{delarray}
\usepackage{eurosym}
\usepackage{emptypage}
%\usepackage{fancyhdr}
\usepackage{float}
\usepackage{floatpag}
%\usepackage[T1]{fontenc}
\usepackage[unicode=true, hidelinks]{hyperref}
\usepackage[utf8]{inputenc}
%\usepackage[outer=5cm, inner=3.5cm]{geometry}
\usepackage{graphicx}
\usepackage[headsepline]{scrlayer-scrpage}
\usepackage{lipsum}
\usepackage{longtable}
\usepackage{lscape}
\usepackage{makecell}
%\usepackage{mathptmx}
\usepackage{mathtools}
\usepackage{microtype}
\usepackage{multirow}
\usepackage[all]{nowidow}
\usepackage[sort, numbers, authoryear, comma]{natbib}
%\usepackage{kpfonts}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{parskip}
\usepackage{pbox}
\usepackage{pdflscape}
\usepackage{pdfpages}
%\usepackage{pgfplotstable}
\usepackage{placeins}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{subcaption}
\usepackage{tabularx}
\usepackage{titlesec}
\usepackage[flushleft]{threeparttable}
\usepackage{tikz}
%\usepackage{titletoc}
\usepackage{verbatim}
\usepackage{footmisc}
% \usepackage{floatrow}\cite
%\usepackage[flushmargin]{footmisc}
%\usepackage[T1]{fontenc}
%\usepackage{a4wide}
%\usepackage{endfloat}
%\usepackage{palatino}
%\usepackage{pslatex}
%\usepackage{scalefnt}
%\usepackage{times}
%\usepackage{ulem}
\usetikzlibrary{arrows,calc}
\raggedbottom
\begin{document}
\setlength{\parindent}{0pt}
\setSingleSpace{1.3}
\SingleSpacing
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
\setlength{\parindent}{0pt}
\setSingleSpace{1.3}
\SingleSpacing
\setlength{\oddsidemargin}{4cm}
\setlength{\evensidemargin}{4cm}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\nouppercaseheads
%\pagestyle{headings}
\checkandfixthelayout
\setlength{\parindent}{15pt}
\setlength{\parskip}{0.15cm}
\checkandfixthelayout
\setSingleSpace{1.3}
\SingleSpacing
\setFloatSpacing{1.1}
{\renewcommand{\arraystretch}{1.1}%
\setcounter{secnumdepth}{4}
\chapter[How do I reduce chapter heading line space? How do I reduce chapter heading line space?]{How do I reduce chapter heading line space? How do I reduce chapter heading line space?}
\markboth{\small {\textsc{\thechapter. How do I reduce chapter heading line space? How do I reduce chapter heading line space?}}}{}
\section{How to change this font?}
\lipsum[1-6]
\end{document}
编辑:1) 和 2) 可通过移除包来解决scrlayer-scrpage
。根据要求,MWE 为:
\documentclass[12pt, a4paper,english,reqno, twoside]{memoir}
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage{afterpage}
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{amsfonts,amssymb,amsfonts,amsthm}
\usepackage{array}
\usepackage{atbegshi}
\usepackage[american, german]{babel}
\usepackage{bm}
\usepackage{booktabs}
\usepackage{breqn}
\usepackage{calc}
\usepackage{caption}
\usepackage{color}
\usepackage{delarray}
\usepackage{eurosym}
\usepackage{emptypage}
%\usepackage{fancyhdr}
\usepackage{float}
\usepackage{floatpag}
%\usepackage[T1]{fontenc}
\usepackage[unicode=true, hidelinks]{hyperref}
\usepackage[utf8]{inputenc}
%\usepackage[outer=5cm, inner=3.5cm]{geometry}
\usepackage{graphicx}
%\usepackage[headsepline]{scrlayer-scrpage}
\usepackage{lipsum}
\usepackage{longtable}
\usepackage{lscape}
\usepackage{makecell}
%\usepackage{mathptmx}
\usepackage{mathtools}
\usepackage{microtype}
\usepackage{multirow}
\usepackage[all]{nowidow}
\usepackage[sort, numbers, authoryear, comma]{natbib}
%\usepackage{kpfonts}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{parskip}
\usepackage{pbox}
\usepackage{pdflscape}
\usepackage{pdfpages}
%\usepackage{pgfplotstable}
\usepackage{placeins}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{subcaption}
\usepackage{tabularx}
\usepackage{titlesec}
\usepackage[flushleft]{threeparttable}
\usepackage{tikz}
%\usepackage{titletoc}
\usepackage{verbatim}
\usepackage{footmisc}
% \usepackage{floatrow}\cite
%\usepackage[flushmargin]{footmisc}
%\usepackage[T1]{fontenc}
%\usepackage{a4wide}
%\usepackage{endfloat}
%\usepackage{palatino}
%\usepackage{pslatex}
%\usepackage{scalefnt}
%\usepackage{times}
%\usepackage{ulem}
\usetikzlibrary{arrows,calc}
\raggedbottom
\begin{document}
\setlength{\parindent}{0pt}
\setSingleSpace{1.3}
\SingleSpacing
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
\setlength{\parindent}{0pt}
\setSingleSpace{1.3}
\SingleSpacing
\setlength{\oddsidemargin}{4cm}
\setlength{\evensidemargin}{4cm}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\nouppercaseheads
%\pagestyle{headings}
\checkandfixthelayout
\setlength{\parindent}{15pt}
\setlength{\parskip}{0.15cm}
\checkandfixthelayout
\setSingleSpace{1.3}
\SingleSpacing
\setFloatSpacing{1.1}
{\renewcommand{\arraystretch}{1.1}%
\setcounter{secnumdepth}{4}
\chapter[How do I reduce chapter heading line space? How do I reduce chapter heading line space?]{How do I reduce chapter heading line space? How do I reduce chapter heading line space?}
\markboth{\small {\textsc{\thechapter. How do I reduce chapter heading line space? How do I reduce chapter heading line space?}}}{}
\section{How to change this font?}
\lipsum[1-6]
\end{document}
答案1
回答您的两个问题。
...
\setSingleSpace{1} % normal space between lines
\SingleSpacing
\chapter[How do ...]{How do I reduce chapter heading line space? How do I ...}
\setSingleSpace{1.3} % more space between lines
\SingleSpacing
\setsecheadstyle{\large\scshape\raggedright} % change section head font
\section{How to change this font?}
\lipsum[1-6]
\end{document}
我不知道页眉和页码,但如果页眉是一行(通常都是这样),那么页码就会与该行对齐。
运行 MWE 会产生各种警告。最好不要将setspace
、titlesec
或scrlayer-scrpage
软件包与 一起使用memoir
。在最终有效配对之前,您\setSingleSpacing \SingleSpacing
多次使用了宏对。
答案2
对于(3)
\makeevenhead{headings}{\thepage}{}{\small\scshape\leftmark}
\makeoddhead{headings}{\small\scshape\rightmark}{}{\thepage}
\nouppercaseheads
\pagestyle{headings}
这使得所有标题 scshape