0

I would like to list the keywords for my thesis on the format:

  1. First Keyword, 2. Second Keyword, 3. Third Keyword, ...

But not had to type the numeration manually, so the command would be like:

\mykeywodslist{First Keyword,  Second Keyword, Third Keyword}

Then calling the command:

\printmykeywordlist

Would print them like:

1. First Keyword, 2. Second Keyword, 3. Third Keyword
user
  • 4,745
  • Why not simply write 1. First Keyword, 2. Second Keyword, 3. Third Keyword? –  Aug 19 '17 at 02:49
  • Because you have to keep track of counting them, and when you add or remove some item, you have to manually edit all the others indexes affected. – user Aug 19 '17 at 12:59
  • Considering you supposedly will have an average of 5 keywords, that's a waste of time. –  Aug 19 '17 at 20:24

1 Answers1

3

You can use the enumitem package with inline option:

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate*}
    \item First Keyword
    \item Second Keyword
    \item Third Keyword
\end{enumerate*}
\end{document}

See documentation for changing the style of labels.

JPG
  • 2,019