3

The hanging indent for my sorted entries (see here) is seemingly unchangeable, I've tried placing \hangindent's and \hangafter's all over the place and nothing seems to change what looks like a half inch hanging indent, which is way to large.

I initially thought that maybe multicol package was to blame, but even with it disabled the indent is still the same.

Preferably I'd want around 12pt hanging indent to save space because I don't need the separate entries standing out that much.

MWE:

\documentclass[11pt,twoside]{article}
\usepackage[paperheight=9in,paperwidth=6in,bottom=1in]{geometry}
\usepackage{multicol} 
\usepackage{fontspec,xunicode}
\usepackage{fancyhdr}
\usepackage{datatool}

%Command Setups

\newcommand{\wn}[5]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize n.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{\textit{pl.\hspace{2pt}#4 }}%
    \DTLnewdbentry{list}{extra}{#5}%
}
\newcommand{\wv}[4]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize v.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{}%
    \DTLnewdbentry{list}{extra}{#4}%
}
\newcommand{\wa}[4]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize adj.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{}%
    \DTLnewdbentry{list}{extra}{#4}%
}

%Enviroment Setup

\newenvironment{sortedlist}%
{%
    \DTLifdbexists{list}{\DTLcleardb{list}}{\DTLnewdb{list}}%
}%
{%
    \DTLsort{label}{list}%
    \begin{description}%
        \DTLforeach*{list}{\theLabel=label,\theDesc=description,\theIp=ipa,\thePl=plural,\theEx=extra}{%
            \markboth{\theLabel}{\theLabel}%
            \item[\theLabel] \theDesc \theIp \thePl \theEx
        }%
    \end{description}% 
}

\begin{document}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,LO]{\textsc{\rightmark}}
\fancyhead[CO,CE]{\thepage}
\fancyhead[RE,RO]{\textsc{\leftmark}}

\begin{multicols}{2}\hangindent=1pt\setlength{\columnseprule}{.5pt}
\raggedright
\begin{sortedlist}
    \wn{Lorem}{ipsum}{dolor}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
    \wa{Lorem}{ipsum}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
    \wv{Lorem}{ipsum}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
\end{sortedlist}
\end{multicols}
\end{document}
2

Since you are using a description environment, it is better to load enumitem package and adjust leftmargin:

\begin{description}[leftmargin=3em]

in the definition of sortedlist.

\newenvironment{sortedlist}%
{%
    \DTLifdbexists{list}{\DTLcleardb{list}}{\DTLnewdb{list}}%
}%
{%
    \DTLsort{label}{list}%
    \begin{description}[leftmargin=3em]%
        \DTLforeach*{list}{\theLabel=label,\theDesc=description,\theIp=ipa,\thePl=plural,\theEx=extra}{%
            \markboth{\theLabel}{\theLabel}%
            \item[\theLabel] \theDesc \theIp \thePl \theEx
        }%
    \end{description}%
} 

Adjust 3em as you wish.

\documentclass[11pt,twoside]{article}
\usepackage[paperheight=9in,paperwidth=6in,bottom=1in]{geometry}
\usepackage{multicol}
%\usepackage{fontspec,xunicode}
\usepackage{fancyhdr}
\usepackage{datatool}
\usepackage{enumitem}

%Command Setups

\newcommand{\wn}[5]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize n.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{\textit{pl.\hspace{2pt}#4 }}%
    \DTLnewdbentry{list}{extra}{#5}%
}
\newcommand{\wv}[4]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize v.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{}%
    \DTLnewdbentry{list}{extra}{#4}%
}
\newcommand{\wa}[4]{%
    \DTLnewrow{list}%
    \DTLnewdbentry{list}{label}{#1}%
    \DTLnewdbentry{list}{description}{\textit{\textsc{{\footnotesize adj.}}} \textbf{#2} }
    \DTLnewdbentry{list}{ipa}{(#3) }%
    \DTLnewdbentry{list}{plural}{}%
    \DTLnewdbentry{list}{extra}{#4}%
}

%Enviroment Setup

\newenvironment{sortedlist}%
{%
    \DTLifdbexists{list}{\DTLcleardb{list}}{\DTLnewdb{list}}%
}%
{%
    \DTLsort{label}{list}%
    \begin{description}[leftmargin=3em]%
        \DTLforeach*{list}{\theLabel=label,\theDesc=description,\theIp=ipa,\thePl=plural,\theEx=extra}{%
            \markboth{\theLabel}{\theLabel}%
            \item[\theLabel] \theDesc \theIp \thePl \theEx
        }%
    \end{description}%
}

\begin{document}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,LO]{\textsc{\rightmark}}
\fancyhead[CO,CE]{\thepage}
\fancyhead[RE,RO]{\textsc{\leftmark}}

\begin{multicols}{2}\setlength{\columnseprule}{.5pt}
\raggedright
\begin{sortedlist}
    \wn{Lorem}{ipsum}{dolor}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
    \wa{Lorem}{ipsum}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
    \wv{Lorem}{ipsum}{amet}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit.}
\end{sortedlist}
\end{multicols}
\end{document}

enter image description here

With leftmargin=1em we get

enter image description here

There are other lengths too that can be adjusted using enumitem. For details, please refer to the manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.