![Koma 剪贴簿 -- 一面,左侧有章节标记,右侧有部分标记](https://linux22.com/image/370903/Koma%20%E5%89%AA%E8%B4%B4%E7%B0%BF%20--%20%E4%B8%80%E9%9D%A2%EF%BC%8C%E5%B7%A6%E4%BE%A7%E6%9C%89%E7%AB%A0%E8%8A%82%E6%A0%87%E8%AE%B0%EF%BC%8C%E5%8F%B3%E4%BE%A7%E6%9C%89%E9%83%A8%E5%88%86%E6%A0%87%E8%AE%B0.png)
我仍在努力使用 leftmark 和 rightmark。看来 leftmark = rightmark!
我试图将其chaptermark
打印在页眉的左侧以及sectionmark
左侧。
梅威瑟:
\documentclass[a4paper, oneside, 12pt, parskip=half]{scrbook}
\usepackage[a4paper,
vmargin=2cm, hmargin=2cm, % page margins
includehead, includefoot, % Margins calculated include header and footer
footskip=2em]
{geometry}
\usepackage[footsepline=0.25pt, headsepline=0.25pt, automark]{scrlayer-scrpage}
% automark places chapter/section title in header. Also enables placement in footer.
\automark[section]{chapter}
\usepackage{lastpage}
\ohead{\rightmark}
% Footer content
\cfoot{\tiny{Page \thepage \ of \pageref*{LastPage} \\
\leftmark}}
\usepackage{lipsum}
\begin{document}
\chapter{Chap One}
\lipsum[1]
\section{Sec One.One}
\lipsum[2-5]
\section{Sec One.Two}
\lipsum[6-10]
\chapter{Chap Two}
\lipsum[11-15]
\end{document}
答案1
添加autooneside=false
到包选项:
\documentclass[a4paper, oneside, 12pt, parskip=half]{scrbook}
\usepackage[
margin=2cm, % page margins
includeheadfoot, % Margins calculated include header and footer
footskip=2em]
{geometry}
\usepackage[
footsepline=0.25pt, headsepline=0.25pt,
automark,
autooneside=false% <- added
]{scrlayer-scrpage}
\chead{}
\ohead{\rightmark}
% Footer content
\cfoot{Page \thepage\ of \pageref{LastPage}\\\leftmark}
\addtokomafont{pagefoot}{\tiny}
\usepackage{lastpage}
\usepackage{lipsum}
\begin{document}
\chapter{Chap One}
\lipsum[1]
\section{Sec One.One}
\lipsum[2-5]
\section{Sec One.Two}
\lipsum[6-10]
\chapter{Chap Two}
\lipsum[11-15]
\end{document}
或者你可能想要:
\usepackage[
footsepline=0.25pt, headsepline=0.25pt,
automark,
autooneside=false% <- added
]{scrlayer-scrpage}
\chead{}
\ihead{\leftmark}
\ohead{\rightmark}