我只是想补充一下我在使用 easylists 和 subscript 时遇到的一个小问题。使用易清单,我遇到了括号出现的问题下标风格。
\documentclass{article}
\usepackage[ampersand]{easylist}
\begin{document}
\begin{easylist}
\ListProperties(Style*={(H\textsubscript}, % i want my numbering to be (H\textsubscript{numbers})
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
FinalMark={)} ) % this is where i put my parenthesis
& I am sad
&& because the parenthesis appears as subscript
\end{easylist}
\end{document}
答案1
键的值Style
可以是需要参数的宏。只需在其中放入括号即可。
\documentclass{article}
\usepackage[ampersand]{easylist}
\newcommand{\mynumbering}[2]{%
(#1\textsubscript{#2})%
}
\begin{document}
\begin{easylist}
\ListProperties(Style*={\mynumbering{H}},
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
)
& I am happy
&& because the parentheses are right
\end{easylist}
\end{document}
答案2
我找到了解决这个问题的方法:我创建了一个小命令,在下标“括号”结束后包装当前编号:
\newcommand{\addpar}[1]{#1)} % adds a parenthesis ) after #1
让我们再试一次
\documentclass{article}
\usepackage[ampersand]{easylist}
\begin{document}
\newcommand{\addpar}[1]{#1)} % adds a parenthesis ) after #1
\begin{easylist}
\ListProperties(Style*={(H\textsubscript}, % i want my numbering to be (H\textsubscript{numbers})
Mark={}, % no markings
Numbers1=l, % level 1 are letters
Numbers2=a, % level 2 are numbers
Progressive=1em, % progressive margin 1em
FinalMark={}, % do not forget to remove it here
CtrCom=\addpar) %my little custom command will wraps the numbering, adding a parenthesis at the end
& I am happy
&& because the parenthesis appears with the correct size
\end{easylist}
\end{document}