回憶錄 - 將章節標題改為母語

回憶錄 - 將章節標題改為母語

我得到了準備用英語寫作的序言,但我正在用丹麥語寫作。在頁面頂部有一個小標題,例如,

Chapter 8. My native chapter title

我想將其更改為

Kapitel 8. My native chapter title

透過在序言中註解掉這一行,該標題就會消失

\makeoddhead{my_page_style}{}{\small\sffamily\leftmark}{}

那麼,如何修改它\makeoddhead以顯示我的語言的章節?注意我正在使用回憶錄。

答案1

丹麥語babel 工作,所以請您向我們展示您首先做了什麼。您應該使用\chaptername來引用名稱(實際上\@chapapp更好)。

另外,不需要在內部進行測試\chaptermark,這會起到同樣的作用

\createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ }

headings(來自in的預設定義memoir

答案2

我透過修改帶有註解“THIS LINE!!”的行來修復它- 我沒有顯示所有代碼 - 對此感到抱歉。確信應該修改 \makeoddhead 行

\makepagestyle{my_page_style}
\makeoddhead{my_page_style}{}{\small\sffamily\leftmark}{}
\makeoddfoot{my_page_style}{}{}{\small\sffamily\thepage}
\setlength{\parindent}{0pt}
\makeatletter
\makepsmarks{my_page_style}{%
  \renewcommand\chaptermark[1]{%
    \markboth{%
      \ifnum \value{secnumdepth} > 1
      \if@mainmatter % 
      \ Kapitel \thechapter. \ % THIS LINE!!
      \fi
      \fi
      ##1}{}}%
  \renewcommand\tocmark{\markboth{\contentsname}{\contentsname}}%
  \renewcommand\lofmark{\markboth{\listfigurename}{\listfigurename}}%
  \renewcommand\lotmark{\markboth{\listtablename}{\listtablename}}%
  \renewcommand\bibmark{\markboth{\bibname}{\bibname}}%
  \renewcommand\indexmark{\markboth{\indexname}{\indexname}}%
  \renewcommand\sectionmark[1]{\markright{##1}}%
  \renewcommand\subsectionmark[1]{\markright{##1}}%
  \renewcommand\subsubsectionmark[1]{\markright{##1}}%
}

相關內容