我正在写一篇论文,我想在目录中制作缩略词列表和词汇表。这是我的 latex
\documentclass[8pt]{report}
%\usepackage[T1,T2A]{fontenc}
%\usepackage[toc,page]{appendix}
\usepackage{appendix}
\usepackage{chngcntr}
\usepackage{lipsum}
\usepackage[acronym]{glossaries}
\makeglossaries
\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited for
scientific documents}
}
\newglossaryentry{maths}
{
name=mathematics,
description={Mathematics is what mathematicians do}
}
\newglossaryentry{formula}
{
name=formula,
description={A mathematical expression}
}
\newacronym{abcp}{ABCP}{Asset Backed Commercial Paper}
\newacronym{aig}{AIG}{American International Group}
\newacronym{bcbs}{BCBS}{Basel Committee on Banking Supervision}
\newacronym{cdo}{CDO}{Collateral Debit Obligation}
\newacronym{cds}{CDS}{Credit Default Swap}
\newacronym{cmbs}{CMBS}{Commercial Mortgage-Backed Securities}
\newacronym{cva}{CVA}{Credit Valuation Default}
\newacronym{ead}{EaD}{Exposure at Default}
\newacronym{fsb}{FSB}{Financial Stability Board}
\newacronym{gfc}{GFC}{Global Financial Crisis}
\newacronym{mbs}{MBS}{Mortgage-Backed Securities}
\newacronym{otc}{OTC}{Over-The-Counter}
\newacronym{pfe}{PFE}{Potential Future Exposure}
\newacronym{rc}{RC}{Replacement Cost}
\newacronym{rmbs}{RMBS}{Residential Mortgage-Backed Securities}
\newacronym{saccr}{SA-CCR}{Standard Approach for Counterparty Credit Risk}
\newacronym{us}{US}{United States
}
\begin{document}
\newpage
\setcounter{page}{1}
\pagenumbering{roman}
\tableofcontents
\printacronyms
\listoffigures
\listoftables
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
\chapter{Introduction}\label{chap1}
\end{document}
我如何生成首字母缩略词列表,我试过了\printacronyms
,但它们仍然没有显示
答案1
这是答案,稍后我会解释
\documentclass[8pt]{report}
%\usepackage[T1,T2A]{fontenc}
%\usepackage[toc,page]{appendix}
\usepackage{appendix}
\usepackage{chngcntr}
\usepackage{lipsum}
\usepackage[acronym]{glossaries}
\makeglossaries
\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited for
scientific documents}
}
\newglossaryentry{maths}
{
name=mathematics,
description={Mathematics is what mathematicians do}
}
\newglossaryentry{formula}
{
name=formula,
description={A mathematical expression}
}
\newacronym{abcp}{ABCP}{Asset Backed Commercial Paper}
\newacronym{aig}{AIG}{American International Group}
\newacronym{bcbs}{BCBS}{Basel Committee on Banking Supervision}
\newacronym{cdo}{CDO}{Collateral Debit Obligation}
\newacronym{cds}{CDS}{Credit Default Swap}
\newacronym{cmbs}{CMBS}{Commercial Mortgage-Backed Securities}
\newacronym{cva}{CVA}{Credit Valuation Default}
\newacronym{ead}{EaD}{Exposure at Default}
\newacronym{fsb}{FSB}{Financial Stability Board}
\newacronym{gfc}{GFC}{Global Financial Crisis}
\newacronym{mbs}{MBS}{Mortgage-Backed Securities}
\newacronym{otc}{OTC}{Over-The-Counter}
\newacronym{pfe}{PFE}{Potential Future Exposure}
\newacronym{rc}{RC}{Replacement Cost}
\newacronym{rmbs}{RMBS}{Residential Mortgage-Backed Securities}
\newacronym{saccr}{SA-CCR}{Standard Approach for Counterparty Credit Risk}
\newacronym{us}{US}{United States}
\begin{document}
\newpage
\setcounter{page}{1}
\pagenumbering{roman}
\tableofcontents
\printacronyms
\listoffigures
\listoftables
\glsaddall %%% ADDITION 1
\printglossary[type=\acronymtype,style=super,nonumberlist] %%% ADDITION 2
\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
\chapter{Introduction}\label{chap1}
\end{document}
请注意,您需要使用 pdfLaTeX 编译一次,然后makeglossaries
重新编译。该命令\glsaddall
用于使缩写词即使在正文中没有被调用也会出现。如果您不想要这种行为,只需删除该行即可。
为了创建“makeglossaries”命令,您首先必须确保系统中安装了 Perl。如果是这样,解决方案很简单,否则需要进行一些调整。
如果您有 Perl(或者您想从这里下载它,例如:https://strawberryperl.com/),只需进入您的 Tex 软件(例如脚本、合成等)。我有 TexWorks,我需要创建一个新流程,如下所示
编译顺序为 1. pdfLaTex、2. makeglossaries、3. pdfLaTeX。
如果您没有 Perl,我建议您在 StackExchange 上搜索如何操作(我曾经找到过但现在似乎找不到)...使用关键字“首字母缩略词”、“词汇表”、“未出现”、“Perl”。
希望你能解决这个问题,我为此挣扎了好几天!!!