在 Lyx 中,「部分」部分採用阿拉伯數字,並對其餘部分進行相應編號

在 Lyx 中,「部分」部分採用阿拉伯數字,並對其餘部分進行相應編號

lyx 中的預設值是

一、第一部分(羅馬數字)

  1. 第1節

1.1 第 1 款

我想要

  1. 第一部分(阿拉伯數字)

1.1 第 1 節

1.1.1 第 1 款

ETC。

有什麼建議嗎?預先非常感謝!

答案1

不知道這是否是首選的 LyX 方式(我還沒有真正使用過它)......你可以添加

\renewcommand*\thepart{\arabic{part}}% arabic numbers for part
\makeatletter
\@addtoreset{section}{part}% reset section number when a new part starts
\makeatother
\renewcommand*\thesection{\thepart.\arabic{section}}% section 1.1
\renewcommand*\thesubsection{\thesection.\arabic{subsection}}% subsection 1.1.1

您的文件序言。在 LyX 中轉到Document > Settings… > LaTeX Preamble.

不過,這有一個缺點:所見即所得(WYM?)將不再是所見即所得。在編輯器中,編號保持不變。但在 PDF 中編號將要已改變。

編輯(回覆下面的評論):以下假設您使用的是標準article類別。在article類別中,該部分的 ToC 條目由 控制\l@section。您可以修補該指令以變更為節號保留的空間。這又出現在 LaTeX 序言中:

\usepackage{etoolbox}
\makeatletter
\patchcmd\l@section
  {\setlength\@tempdima{1.5em}}% this is default
  {\setlength\@tempdima{2em}}% this is new; change value to your needs
  {}{}
\makeatother

相關內容