amsbook 中的零件名稱大寫

amsbook 中的零件名稱大寫

在法語中,amsbook即使我重新定義,類別也會在目錄中以小寫形式寫入部分名稱\partname。我想知道如何解決這個問題。

\documentclass{amsbook}
\usepackage[french]{babel}

\title{La démocratie}
\author{Quelqu'un}

\begin{document}
  \frontmatter
  \maketitle
  \tableofcontents
  \mainmatter
  \part{Introduction}
\end{document}

答案1

我猜你想在標題中保留“Première party”,所以這裡有一些技巧。

首先,中的程式碼babel-french不認為\thepart前面有一個應該被忽略(或刪除)的空格,因此我透過(本地)重新定義\thepartto\unskip而不是什麼都不做來修復它。

其次,我修補\@part使其直接寫入Partie而不是寫入檔案\partnametoc

\documentclass{amsbook}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{etoolbox}

% fix a small issue in babel-french
\makeatletter
\renewcommand\FB@emptypart{\def\thepart{\unskip}}
% make \part write 'Partie' instead of '\partname'
\patchcmd{\@part}{\partname}{Partie}{}{}
\makeatother

\title{La démocratie}
\author{Quelqu'un}

\begin{document}

\frontmatter
\maketitle

\tableofcontents

\mainmatter

\part{Introduction}

\end{document}

在此輸入影像描述

在此輸入影像描述

答案2

根據babel-french 包文件 PartNameFull應設定為false避免此類問題。

所以只需添加\frenchsetup{PartNameFull=false}到您的序言中即可。這應該可以解決你的問題。

文件摘錄:

PartNameFull=假(真);

當 true 時,babel-french 將 \part{} 指令的標題編號為「Première party」、「Deuxième party」等。對於某些更改 \part{} 命令的類別(AMS 類別這樣做),您可以在目錄中獲得“Première party 1”、“Deuxième party 2”;當發生這種情況時,選項應設為 false,然後零件標題將列印為「Partie I」、「Partie II」。

相關內容