スクリプト内のページ余白を反転する

スクリプト内のページ余白を反転する

次のコードを修正して、余白が左ではなく右にあるドキュメントを作成できますか? ヘッダーは余白を超えて拡張される必要があります。

\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}

ヘッダーとフッターの位置を表示するためにオプションheadseplineとを使用していることに注意してください。footsepline

ここに画像の説明を入力してください

関連情報