
我目前正在 Overleaf 上寫一篇論文,並嘗試使用lossaries-extra 套件來管理我的縮寫。目前全文使用了 14 個縮寫。我使用的是長短樣式,第一次使用時應顯示“長(短)”,然後在後續使用時僅顯示“短”。在 14 個縮寫中,只有 12 個縮寫這樣做。其他兩個即使在第一次使用時也只顯示簡短的變體。
我還使用一個腳本,該腳本允許縮寫在文本中擴展的第一個使用中使用小寫字母,而縮寫列表中的擴展變體具有大寫的第一個字母。
縮寫的設定方式如下:
\documentclass{article}
\usepackage[abbreviations]{glossaries-extra}
\glssetcategoryattribute{general}{glossdesc}{firstuc} % Used for upper case in list.
\glssetcategoryattribute{abbreviation}{glossdesc}{title} % Used for upper case in list.
\makeglossaries
\setglossarystyle{list}
\setabbreviationstyle[acronym]{long-short}
\begin{document}
\newabbreviation{PUR}{PUR}{polyuretan} % Does not expand at first use
\newabbreviation{HDPE}{HDPE}{hoytetthets polyeten}
\newabbreviation{CMS}{CMS}{corrosion management system}
\newabbreviation{KUI}{KUI}{korrosjon under isolasjon}
\newabbreviation{PE}{PE}{polyeten} % Does not expand at first use
\newabbreviation{PEX}{PEX}{kryssbundet polyeten}
\newabbreviation{DV}{DV}{Drift og vedlikehold}
\newabbreviation{NDT}{NDT}{ikke-destruktiv testing}
\newabbreviation{SAP}{SAP}{System Analysis Program {}Development}
\newabbreviation{NCMD}{NCMD}{Non-contact magnetometric diagnostics}
\newabbreviation{MMM}{MMM}{metal magnetic memory}
\newabbreviation{MSFG}{MSFG}{magnetic stray field gradient}
\newabbreviation{ERP}{ERP}{enterprise {}resource {}planning}
\newabbreviation{GPR}{GPR}{ground penetrating radar}
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}} % Used for upper case in list.
\printglossary[type=\acronymtype, style=super, title=Forkortelser]
The thesis itself is written here with the first use of \gls{PEX} showing as "krysskoblet polyeten (PEX)"
and the following uses of \gls{PEX} showing as just "PEX".
The first use of \gls{PUR} however turns out as just "PUR". So does the following uses.
\end{document}
我還沒有運行此程式碼,所以我不知道這裡是否也存在問題。當然,該專案中還使用了許多其他包,但為了保持簡短,我沒有包含這些包。值得一提的是,我是乳膠新手(這是我使用它的第一個專案),並且不太了解不同套件或 Overleaf 中的底層程式碼。
答案1
我想到了。這是一個簡單的錯誤。圖中文字中使用了這兩個縮寫。儘管圖表文字本身並不是縮寫的首次使用,但報告開頭的圖表中的縮寫卻是首次使用。我只需將圖形文字與圖形列表中顯示的文字分開即可。
由此:
\caption{A picture of \gls{PUR} insulation.}
對此:
\caption[A picture of PUR insulation.]{A picture of \gls{PUR} insulation.}