使用 tocloft 的乳膠自訂清單會導致換行

使用 tocloft 的乳膠自訂清單會導致換行

我已經使用該tocloft包創建了自訂縮寫列表。清單中的佈局如果可以的話。我遇到的問題是創建此條目的命令會創建換行符,並且我在內聯包含縮寫之後。

定義縮寫列表以及包和至少序言的相關代碼如下:

\RequirePackage{fix-cm}
\documentclass[a4paper,12pt,french]{report}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[autolanguage]{numprint}
\usepackage[utf8]{inputenc}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage[extendedchars, babel, multidot]{grffile}
\usepackage{xcolor,graphicx}
\usepackage{tabularx, multirow, array}

\usepackage{hyperref}
\usepackage[nottoc, notlot, notlof]{tocbibind}
\usepackage[titles]{tocloft}

\newcommand{\listabrevname}{Liste des abréviations}
\newlistof[chapter]{abreviation}{abrev}{\listabrevname}
\newcommand{\abreviation}[2]{%
    \refstepcounter{abreviation}%
    \par\noindent\textnormal{#2  (#1)}%
    \addcontentsline{abrev}{abreviation}{%
        \protect\numberline{}#1 -- #2%
        }\par%
}
\cftsetindents{figure}{0em}{2.5em}
\cftsetindents{table}{0em}{2.5em}
\cftsetindents{abreviation}{0em}{0em}
\setlength{\cftbeforefigskip}{0.00em}
\setlength{\cftbeforetabskip}{0.00em}
\setlength{\cftbeforeabreviationskip}{1.0em}

\begin{document}

%a bunch of stuff%

\addtocontents{abrev}{\noindent\textbf{Abréviation}~\hfill\textbf{Première Apparition}\par}
\listofabreviation
\addcontentsline{toc}{chapter}{\protect\hphantom{\numberline{\thesection}}\listabrevname}%
\newpage

\renewcommand{\listfigurename}{Liste des figures}
\listoffigures
\addcontentsline{toc}{chapter}{\protect\hphantom{\numberline{\thesection}}\listfigurename}%
\addtocontents{lof}{\noindent\textbf{Figure}~\hfill\textbf{Page}\par}
\newpage
\listoftables
\addcontentsline{toc}{chapter}{\protect\hphantom{\numberline{\thesection}}\listtablename}%
\addtocontents{lot}{\noindent\textbf{Table}~\hfill\textbf{Page}\par}
\newpage

\addtocontents{toc}{~\hfill\hbox{}\par}
\tableofcontents

\newpage

chapter{Introduction}\label{Intro}
\pagenumbering{arabic}

The use of \abreviation{HA}{Acide hyaluronique} represents...

\end{document}

這給出:


……一些文字和一些更多的文字和一些更多的文字%line break - indented

透明質酸 (HA)(No indent)

....另一行繼續文字......indented


我正在尋找縮寫的連續插入,因此沒有換行符,這將給出:


一些文字和一些更多文字和一些更多文字 Acide Hyaluronique (HA) 同一行上的文字延續。


我嘗試在定義的不同位置引入~防止中斷以及 ,\nobreak\nolinebreak到目前為止還沒有成功。

相關內容