0

I want to automatically sort the entries in a description environment alphabetically. I see examples of lists being sorted alphabetically, but I am unable to adapt those examples to work for descriptions. An example of a description list I want to sort is:

\begin{description}
\item[AI:] Artificial Intelligence
\item[ML:] Machine Learning
\item[DL:] Deep Learning
\end{description} 
  • This requires three steps. Fisrt you would need to store each item in an array (\csname). Then sort the array alphabetically. Finally format the sorted array elements. See also https://tex.stackexchange.com/questions/273037/expandable-quick-sort-array-macro – John Kormylo Oct 30 '22 at 15:00
  • 1
    You can use packages like glossaries, nomencl etc. to create such lists. Some of them use MakeIndex or Xindy to do the sorting optionally or mandatory. Some provide options to do the MakeIndex run automatically. – cabohah Oct 30 '22 at 15:24

0 Answers0