我使用LaTeX模板(由ASME提供)来编写会议论文。asme2e.cls类将“命名”环境定义如下:
% Nomenclature environment
\newbox\tempbox
\newenvironment{nomenclature}{%
\newcommand\entry[2]{%
\setbox\tempbox\hbox{##1.\quad}
\hangindent\wd\tempbox\noindent{##1}\quad\ignorespaces##2\par}
\section*{NOMENCLATURE}}{\par\addvspace{12pt}}
它用于.tex源文件中,如下所示:
\begin{nomenclature}
% [...]
\entry{$C_{visc}$}{Viscous friction coefficient.}
\entry{$M$}{Spool mass.}
% [...]
\end{nomenclature}
结果说明文本不合理(因为在符号(例如: M)和描述(例如:假脱机质量)之间插入了固定的水平空间,但是符号有不同的长度(例如: Cvisc比M长)。
是否有一种方法可以修复类的左对齐描述?(我做了一些实验,用\dimexpr和calc包做了一些实验,但是只得到了一些错误)。
(我还问ASME是否可以提供更新的模板,但我仍在等待他们的反馈.)
发布于 2022-02-16 02:43:48
我不知道这是不是你想要的,但请看下面的MWE:
\documentclass[12pt]{article}
\newlength{\nomenlabelindent}
\setlength{\nomenlabelindent}{4em}
\newenvironment{nomenclature}{%
\newcommand\entry[2]{%
\hangindent\nomenlabelindent\noindent\makebox[\nomenlabelindent][l]{##1\quad}\ignorespaces##2\par}%
\section*{NOMENCLATURE}}{\par\addvspace{12pt}}
\begin{document}
\begin{nomenclature}
\entry{$A$} {Parameter}
\entry{$B$} {Parameter}
\entry{$C$}{Parameter}
\entry{$D$}{Parameter}
\entry{$E$}{Parameter}
\end{nomenclature}
\end{document}
输出
https://stackoverflow.com/questions/44384087
复制相似问题