-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bdcad0
commit bb71bb5
Showing
3 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
\definecolor{notes}{rgb}{.75, .3, .3}% | ||
|
||
\makeatletter | ||
\expandafter\def\csname [email protected]\endcsname{} % Because it's loaded by eqparbox but breaks the decl environment | ||
\newenvironment{desc} | ||
{\if@nobreak | ||
\vskip-\lastskip | ||
|
@@ -573,7 +574,7 @@ \subsection{Horizontal spacing of labels} | |
\end{note} | ||
|
||
\begin{desc} | ||
|widest=<string>|\qquad|widest*=<integer>|\qquad|widest| | ||
|widest=<string>|\qquad|widest*=<integer>|\qquad|widest|\qquad|autowidest| | ||
\end{desc} | ||
|
||
To be used in conjunction with the \texttt{*}-values, if desired. It | ||
|
@@ -597,6 +598,9 @@ \subsection{Horizontal spacing of labels} | |
you might need change the computed parameter (eg, |itemindent=*| with | ||
|align=left|). | ||
|
||
\New{3.X} You can use |autowidest| to have \textsf{enumitem} | ||
work out the actual widest label for you, however it requires at least two runs of \LaTeX. | ||
|
||
\begin{desc} | ||
|labelsep*=<length>| | ||
\end{desc} | ||
|
@@ -863,21 +867,7 @@ \subsection{Injecting code} | |
assigned to each list, returned by |\EnumitemId|. | ||
|
||
\begin{example} | ||
Here is an example of how to combine a |\label| with |\EnumitemId|, | ||
and |after| to automatically set the width of the list label to the | ||
widest one (provided the ref is the same as the label):\footnote{See | ||
\texttt{https://tex.stackexchange.com/questions/29322/% | ||
how-to-make-enumerate-items-align-at-left-margin}.} | ||
\begin{verbatim} | ||
\SetEnumitemKey{widestlabel} | ||
{labelwidth = \widthof{\ref{enum-\EnumitemId}}, | ||
after = \label{enum-\EnumitemId}} | ||
\end{verbatim} | ||
Then just use the key |widestlabel|. | ||
\end{example} | ||
|
||
\begin{example} | ||
Reverse counting is also doable, but somewhat trickier, and we need | ||
Here is an example of reverse counting, but it is somewhat tricky, and we need | ||
some ``external'' help. Here is a possible solution, but not the | ||
only one (and very likely not even the best -- for example, |start| | ||
is in fact no-op). | ||
|