![在Lyx中,如何將“部分”部分更改為“章節”?](https://rvso.com/image/254715/%E5%9C%A8Lyx%E4%B8%AD%EF%BC%8C%E5%A6%82%E4%BD%95%E5%B0%87%E2%80%9C%E9%83%A8%E5%88%86%E2%80%9D%E9%83%A8%E5%88%86%E6%9B%B4%E6%94%B9%E7%82%BA%E2%80%9C%E7%AB%A0%E7%AF%80%E2%80%9D%EF%BC%9F.png)
我正在使用預設的 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}
序言中。