章节内文本的良好对齐

章节内文本的良好对齐

事实上,我想在一个名为缩写列表的章节中编写手动命名法,当我编写命名法时,它们没有对齐,并且第一个命名法的开头有一个空格。这是代码:

\documentclass[12pt]{report}
\usepackage{lipsum}
 \usepackage[intoc]{nomencl}
 \makenomenclature
\usepackage[french]{babel}
\usepackage{unnumberedtotoc}
\usepackage[automark,
plainheadsepline,
headsepline,
plainfootsepline,
footsepline,
markcase=ignoreupper]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead*{\leftmark}
\cfoot*{\pagemark}
\setkomafont{pageheadfoot}{\scshape}
\usepackage{titlesec}
\usepackage[a4paper,right=20mm,left=25mm,top=30mm, bottom=40mm,%
head=14.5pt,%<- new
]{geometry}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\tableofcontents
\addchap{Publications}
\addchap{Acknowledgement}
\printnomenclature
\nomenclature{FCB}{FC Barcelona}
\nomenclature{ASR}{AS Roma}
\nomenclature{FCS}{FC Sévilla}
\nomenclature{FCB}{FC Bayern}
\nomenclature{JFC}{Juventus FC}
\nomenclature{LFC}{Liverpool FC}
\nomenclature{MC}{Manchester City}
\chapter{Introduction}
\lipsum
\lipsum
\chapter{state of art}
\lipsum
\chapter{theory}
\lipsum
\end{document} 

答案1

尽管您坚持不使用tabular,但这里有一个使用环境的手动命名法版本tabular

\documentclass{report}
\begin{document}

\chapter*{List of abbreviations}
\begin{tabular}{@{}ll}
FCB: &FC Barcelona\\
ASR: &AS Roma\\
FCS: &FC Sévilla \\
FCB: &FC Bayern \\
JFC: &Juventus FC\\
LFC: &Liverpool FC\\
MC: &Manchester City\\
\end{tabular}

在此处输入图片描述

上面提出的手动方法在某些情况下受到限制:

  • 跨越多行的长描述需要包X中的灵活宽度列tabularx
  • 跨越多页的长缩写列表将需要该longtable包。
  • 条目的排序必须手动完成。

这里有一个示例,说明如何使用该nomencl包自动按字母顺序对相同条目进行命名。该intoc选项包括目录中的命名。

\documentclass{report}
\usepackage[intoc]{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of abbreviations}
\begin{document}
\tableofcontents
\printnomenclature
\nomenclature{FCB}{FC Barcelona}
\nomenclature{ASR}{AS Roma}
\nomenclature{FCS}{FC Sévilla}
\nomenclature{FCB}{FC Bayern}
\nomenclature{JFC}{Juventus FC}
\nomenclature{LFC}{Liverpool FC}
\nomenclature{MC}{Manchester City}

\end{document} 

在此处输入图片描述

相关内容