
我正在使用預設的 Lyx 文件“文章”。
我的部分範圍從“部分”到“小小節”。當我編譯我的pdf時,我想替換“部分1 標題 1”、“第 2 部分標題 2”等,作者:“章節1 Title1」、「Chapter 2 Title2」等。知道如何做到這一點嗎?提前非常感謝!
答案1
當您使用 LyX 時,這表示預設情況下您也在使用babel
套件(對於類似的事情,總是必須使用 MWE)。所以你在序言中需要這樣的內容:
\addto\captionsenglish{%
\renewcommand{\partname}%
{Fake Chapter}%
}
然而,Lyx會將babel
包包 放後程式碼中的\makeatletter
--區塊(請參閱「檢視」功能表中的完整原始碼),因此無法運作。\makeatother
因此,您還需要放在\usepackage{babel}
前面 在前言中,要取得充當此 MWE 的文件:
\documentclass[english]{article}
\usepackage{babel}
\addto\captionsenglish{%
\renewcommand{\partname}%
{Fake Chapter}%
}
\begin{document}
\part{Some part or chapter}
The \textbackslash{}thepart{} is \thepart{} and the \textbackslash{}partname{} is \partname{}
That is all.
\end{document}
babel
或透過 Lyx 選單停用並僅放入\renewcommand{\partname}{Fake Chapter}
序言中。