June 1, 2017
Inline Enumerations in LaTeX
Normally you use the \enumerate command in LaTeX to create enumerated lists like this:
I use lots of space! If you prefer your enumeration “inline”, you could do that:
... \newcommand{\inlineEnum}[1]{ \ifcsname c@#1\endcsname \addtocounter{#1}{1} \textbf{\arabic{#1})~} \else \newcounter{#1} \setcounter{#1}{1} \textbf{\arabic{#1})~} \fi } ... \begin{document} \inlineEnum{counter} Here is some text. \inlineEnum{counter} Here is some more text. \inlineEnum{counter} And another sentence! ... \end{document} Much better:
…
Here is some text. 2) Here is some more text.
Read more