1

I want to sort a description list in an alphabetical order.

\documentclass{article}
\begin{document}
\begin{description}
  \item[bb] \hfill \\ something bb
  \item[aa] \hfill \\ something aa
  \item[dd] \hfill \\ something dd
  \item[cc] \hfill \\ something cc
\end{description}
\end{document}
Ajith
  • 117
  • 1
    This is really a multi-pronged question. There are various questions about sorting of lists, for example, https://tex.stackexchange.com/questions/333646/sorting-a-comma-separated-list-with-latex. However, that in itself does not address the parsing of your environment to find the list of things to sort. – Steven B. Segletes Sep 26 '18 at 11:18
  • 2
    What's the \hfill for if you put a new line immediately after it? – Skillmon Sep 26 '18 at 11:44
  • yes. I put \hfill to do so. – Ajith Sep 26 '18 at 11:48
  • https://tex.stackexchange.com/questions/121489/alphabetically-display-the-items-in-itemize is not working for descriptions. That is only for itemize. Could you help me to sort the description? Thanks. – Ajith Sep 28 '18 at 12:47

0 Answers0