I am wondering whether it is possible to display the items alphabetically regardless of the order we type on the backend? For example I am using itemize as follows:
\begin{itemize}
\item ISDYNSTP: Is dynamic time step used?
\item ISCDCA:
\item MVAR
\item IS2TL_
\end{itemize}
But I want to display the items in the alphabetical order. I don't know whether it is possible or not. I have like hundreds of itemize items. Actually I am trying to create a glossary for the different parameters.
Best Answer
Taking some code from How to sort an alphanumeric list, a mild change to your interface works for sorting via the
datatool
package:To allow for formatting of sorted elements, it's best to modify the syntax. To that end, the following MWE supplied an updated version of
\sortitem[<sort label>]{<label/description>}
that takes an optional<sort label>
(used as the label to sort upon):If you want a case-insensitive comparison, just replace the
\DTLsort
command by\DTLsort*
.