对于某一章,我想将附录作为一节包含在该章中。查看 MWE,1.2 将是 1.A。我该怎么做?
谢谢!
\documentclass{scrreprt}
\usepackage[
includemp,
showframe,
reversemp,
paperwidth=20.1cm,
paperheight=25.80cm,
top=2.30cm,
bottom=3.4cm,
inner=2.7cm,
outer=2.7cm,
marginparwidth=1.6cm, % Fixed for now
marginparsep=0.4cm
]{geometry}
\makeatletter % to set the marginpar on the left side in showframe
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother
\renewcommand*{\chapterformat}{\makebox[0pt][r]{\chapappifchapterprefix{\
}\thechapter\autodot\hskip\marginparsep}}%
\renewcommand*{\sectionformat}{\makebox[0pt][r]
{\thesection\autodot\hskip\marginparsep}}
\renewcommand*{\subsectionformat}{\makebox[0pt][r]
{\thesubsection\autodot\hskip\marginparsep}}
\renewcommand*{\subsubsectionformat}{\makebox[0pt][r]
{\thesubsubsection\autodot\hskip\marginparsep}}
% remove the vertical skip before the chapter heading
\RedeclareSectionCommand[beforeskip=-1sp plus -1sp minus 1sp]{chapter}
\begin{document}
\chapter{test}
\section{test}
\section{test}
\end{document}
答案1
通过appendix
包的帮助:
(图片仅显示第一页)
\documentclass{scrreprt}
\usepackage{appendix}% added
\usepackage[
includemp,
showframe,
reversemp,
paperwidth=20.1cm,
paperheight=25.80cm,
top=2.30cm,
bottom=3.4cm,
inner=2.7cm,
outer=2.7cm,
marginparwidth=1.6cm, % Fixed for now
marginparsep=0.4cm
]{geometry}
\makeatletter % to set the marginpar on the left side in showframe
\let\Gm@vrules@mpi\Gm@vrules@mpii
\makeatother
\renewcommand*{\chapterformat}{\makebox[0pt][r]{\chapappifchapterprefix{\
}\thechapter\autodot\hskip\marginparsep}}%
\renewcommand*{\sectionformat}{\makebox[0pt][r]
{\thesection\autodot\hskip\marginparsep}}
\renewcommand*{\subsectionformat}{\makebox[0pt][r]
{\thesubsection\autodot\hskip\marginparsep}}
\renewcommand*{\subsubsectionformat}{\makebox[0pt][r]
{\thesubsubsection\autodot\hskip\marginparsep}}
% remove the vertical skip before the chapter heading
\RedeclareSectionCommand[beforeskip=-1sp plus -1sp minus 1sp]{chapter}
\begin{document}
\chapter{test}
\section{test}
\begin{subappendices}% environment defined in package appendix
\section{test}
\section{test}
\end{subappendices}
\chapter{test}
\section{test}
\section{test}
\end{document}