
祝大家聖誕快樂。我正在嘗試製作 LyX 模板,因為我必須在接下來的 12 個月內編寫三份報告。我正在使用回憶錄和chapterstyle demo2。我怎麼能夠
1)右對齊章節號(名稱已經右對齊)並且
2)將其從“一”更改為“第一章”?
3) 我可以對我的闌尾做同樣的事情嗎?即,右對齊並使其以“附錄A”而不是“A”開頭?
到目前為止,這是我的序言:
\chapterstyle{demo2}
\makepagestyle{mystyle}
\makeheadrule {mystyle}{\textwidth}{\normalrulethickness}
\makeevenhead{mystyle}{\small\leftmark}{}{}
\makeoddhead{mystyle}{\small\rightmark}{}{}
\makeevenfoot{mystyle}{}{\thepage }{}
\makeoddfoot{mystyle}{}{\thepage}{}
答案1
定義章節樣式的變體demo2
:
\documentclass{memoir}
\makeatletter
\makechapterstyle{demo2var}{%
\chapterstyle{default}
\renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{\raggedleft}
\renewcommand*{\printchapternum}{\chapnumfont
\ifanappendix Appendix \else Chapter \fi\thechapter}
\renewcommand*{\printchaptertitle}[1]{%
\hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
\renewcommand*{\afterchaptertitle}{%
\vskip\onelineskip \hrule\vskip \afterchapskip}
\setlength{\beforechapskip}{3\baselineskip}
\renewcommand*{\printchapternonum}{%
\vphantom{\chapnumfont One}
\afterchapternum%
\vskip\topskip}
\setlength{\beforechapskip}{2\onelineskip}}
\makeatother
\chapterstyle{demo2var}
%% add here the changes for headers and footers
\begin{document}
\mainmatter
\chapter{Fundamentals}
\appendix
\chapter{Minor points}
\end{document}