Dear LaTeX experts,
I'm relatively new to LaTeX, but managed to find solutions for most of the problems I've encountered so far. However there is an issue which I was unable to solve even after extensive searching:
General Precondition: Selective manual re-corrections after visual inspection are *not* feasible, since all the LaTeX-code should be generated automatically for a huge amount of data read from a .csv-file.
Aim: To create an index-like document part which is devided into three columns and in which each entry is left-aligned and has its corresponding number right-aligned. In case an entry requires more spacing than a single line it should break automatically with a hanging indent and its corresponding number should be at the bottom-right of its last line.
The line spacing should never be extended for this aim, as space is restricted.
Problem: I've managed to build a file which achieves this behavior (s. MWE below), however there remains a serious issue with inter-entry line spacing: For larger entries which induce line breaking, the line spacing within the entry is larger than the line spacing of the preceding and subsequent entries (where it should be equal or even smaller).
Using '\smallskip' resolves unequal vertical distribution but extends line spacing in general, which is not acceptable.
Is there any way to resolve this problem? I would really appreciate any hint.
Kind regards.
Code: Select all
\documentclass[a5paper,pagesize=auto,8pt,parskip=half-,headings=small,DIV=15,BCOR=1mm]{scrbook}
\usepackage{multicol}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}
\begin{multicols*}{3}
\parbox[b]{3cm}{\raggedright\hangindent=1em an entry}\hfill 123
\parbox[b]{3cm}{\raggedright\hangindent=1em another one}\hfill 324
\parbox[b]{3cm}{\raggedright\hangindent=1em a larger entry}\hfill 325
\parbox[b]{3cm}{\raggedright\hangindent=1em an entry whith inacceptable results}\hfill 981
\parbox[b]{3cm}{\raggedright\hangindent=1em and another entry of the large ones}\hfill 235
\parbox[b]{3cm}{\raggedright\hangindent=1em another entry}\hfill 254
\parbox[b]{3cm}{\raggedright\hangindent=1em and another one}\hfill 254
\parbox[b]{3cm}{\raggedright\hangindent=1em and another entry of the large ones}\hfill 235
\parbox[b]{3cm}{\raggedright\hangindent=1em an entry}\hfill 123
Using \emph{\textbackslash smallskip} improves the equidistance of vertical spacing, but also
increases vertical spacing in general (not intended):
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em an entry}\hfill 123
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em another one}\hfill 324
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em a larger entry}\hfill 325
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em an entry whith inacceptable results}\hfill 981
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em and another entry of the large ones}\hfill 235
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em another entry}\hfill 254
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em and another one}\hfill 254
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em and another entry of the large ones}\hfill 235
\parbox[b]{3cm}{\smallskip\raggedright\hangindent=1em an entry}\hfill 123
\end{multicols*}
\end{document}