I've created a method to input Norwegian-English translations into a sort of glossary. I need multiple of these little glossaries, later they will be compiled into a big glossary. It doesn't need to be complex.
I use datatool to sort the list alphabetically (ignoring Norwegian indexing problems for now), in a system I'm pretty happy with, actually.
\documentclass[11pt]{memoir}
% \usepackage[colorlinks=true]{hyperref} % hyperlink to target
\usepackage{multicol} % multiple columns
\usepackage{hanging} % paragraph indentation control
\usepackage{datatool} % for sorting lists
\newcommand{\vocab}[3]{%\parskip=0pt \textbf{#1} (#2) #3~\par%
\DTLnewrow{vocabsort}%
\DTLnewdbentry{vocabsort}{norsk}{#1}%
\DTLnewdbentry{vocabsort}{class}{#2}%
\DTLnewdbentry{vocabsort}{english}{#3}%
}
\newenvironment{vocabsection}[1]{\noindent \hspace{1em} \textbf{#1} %
\DTLifdbexists{vocabsort}{\DTLcleardb{vocabsort}}{\DTLnewdb{vocabsort}}%
}%
{ \dtlsort{norsk}{vocabsort}{\dtlicompare}%
\displaysorteddb
}
\newcommand{\displaysorteddb}{%
\begin{multicols}{2}
\begin{hangparas}{0.5em}{1}
\begin{DTLenvforeach*}{vocabsort}{\norsk=norsk, \class=class, \english=english}
\textbf{\norsk} (\class) \english~\par
\end{DTLenvforeach*}
\end{hangparas}
\end{multicols}
}
\begin{document}
\subsection{Foo}
\begin{vocabsection}{Map Vocab}
\vocab{basseng}{n.}{pool}
\vocab{hytte}{n.}{cabin}
\vocab{akershus}{n.}{A castle in Oslo, the counselors' cabin}
\vocab{kjokken}{n.}{kitchen}
\vocab{bad}{n.}{bathroom}
\vocab{basketball bane}{n.}{basketball court}
\vocab{lekeplass}{n.}{playground}
\vocab{sykepleirske}{n.}{nurse's cabin}
\vocab{innsj\o}{n.}{lake}
\vocab{skog}{n.}{forest}
\vocab{vei}{n.}{road}
\vocab{flagg}{n.}{flag}
\vocab{lysthus}{n.}{gazebo}
\end{vocabsection}
\end{document}
The above code results in this:

But uncomment \usepackage[colorlinks=true]{hyperref} and it all falls apart, producing:
To be honest, I don't need the hyperlinks anyway, since this document will mostly be used in hard copy anyway, but now I'm curious how hypperref could possibly be causing this, and if there is a fix.
As pointed out in the comments, the bug also requires the use of hanging. The question still stands, how could the interaction of hyperref and hanging cause multicols to fail in this instance?
Compile with XeTeX, as it ignores the command-already-defined error produced by hanging.

LaTeXcan be so bizarre sometimes: I can rearrange a page in minutes, but a package that creates hyperlinks interferes with the output of a sorted and outputted list in two columns. – Azor Ahai -him- Dec 18 '15 at 04:49hangingpackage – Dec 18 '15 at 04:52\begin{hangparas}in the\displaysorteddbmacro. Uncommenting that it will use two columns again, but it doesn't look nice :-( – Dec 18 '15 at 04:55hanging, especially as these lists will grow larger. – Azor Ahai -him- Dec 18 '15 at 05:12hyperref, unfortunately, it does not cure the problem :-( – Dec 18 '15 at 06:13