scrreprt 中的反向頁邊距

scrreprt 中的反向頁邊距

任何人都可以修改以下程式碼以提供頁邊距位於右側而不是左側的文件嗎?標題仍應超出邊距。

\documentclass[twoside=semi, titlepage]{scrreprt}

\usepackage[
vmargin=2.5cm, heightrounded,
left=6cm, right=2cm,
marginparwidth=3.5cm, marginparsep=0.5cm,
showframe
]{geometry}



\usepackage[
automark,
headwidth=textwithmarginpar:-\the\marginparwidth-  \the\marginparsep:marginpar,
footwidth=textwithmarginpar:-\the\marginparwidth-\the\marginparsep:marginpar
]{scrlayer-scrpage}
\clearpairofpagestyles
\ofoot{\pagemark}
\ohead{\normalfont MATH UNIT}
\usepackage{blindtext}
\begin{document}

\section{Section}
\Blindtext\marginpar{Margin text}
\Blindtext\marginpar{Margin text}
\Blindtext[1]
\blinddocument
\end{document}

答案1

更改幾何選項中left和的設定。right對於頁首和頁尾位置,將偏移量明確設定為 0pt。 (我不知道為什麼這是必要的。)

\documentclass[twoside=semi, titlepage]{scrreprt}
\usepackage[
vmargin=2.5cm, heightrounded,
left=2cm, right=6cm,% <- changed
marginparwidth=3.5cm, marginparsep=0.5cm,
showframe
]{geometry}

\usepackage[
automark,
headsepline,% <- to show the headwidth
footsepline,% <- to show the footwidth
headwidth=textwithmarginpar:0pt:0pt,% <- changed
footwidth=textwithmarginpar:0pt:0pt% <- changed
]{scrlayer-scrpage}
\clearpairofpagestyles
\ofoot{\pagemark}
\ohead{\normalfont MATH UNIT}

\usepackage{blindtext}% dummy text
\begin{document}

\section{Section}
\Blindtext\marginpar{Margin text}
\Blindtext\marginpar{Margin text}
\Blindtext[1]
\blinddocument
\end{document}

請注意,我使用了選項headseplinefootsepline來顯示頁首和頁尾的位置。

在此輸入影像描述

相關內容