你好,我尝试使用 elsarticle 命名法,但没有成功。请帮忙。谢谢
\documentclass{elsarticle}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip} % Baseline skip between items
\renewcommand*\nompreamble{\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}
\begin{document}
\begin{table*}[!t]
\begin{framed}
\printnomenclature
\end{table*}
\nomenclature{$I_b$}{First item}
\nomenclature{$I_d$}{Second item}
\nomenclature{$I_r$}{Third item}
\end{framed}
\end{document}
答案1
您的 MWE 导致错误
! LaTeX Error: \begin{framed} on input line 14 ended by \end{table*}.
这意味着环境没有正确嵌套。移至\end{framed}
之前\end{table*}
:
\documentclass{elsarticle}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip} % Baseline skip between items
\renewcommand*\nompreamble{\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}
\begin{document}
Test.
\begin{table*}[!t]
\begin{framed}
\printnomenclature
\end{framed}
\end{table*}
\nomenclature{$I_b$}{First item}
\nomenclature{$I_d$}{Second item}
\nomenclature{$I_r$}{Third item}
\end{document}
请记住,文档构建需要调用makeindex
应用程序,如使用包 nomencl。