How do I get and use a column with keywords in latex? Or is there another term for this column?
Example (screenshot from todonotes doc):
How do I get and use a column with keywords in latex? Or is there another term for this column?
Example (screenshot from todonotes doc):
This is as straight forward as using a \marginpar
to write content in the margin. Here is one option:
\documentclass{article}
\newcommand{\keyword}[1]{%
\marginpar{\raggedleft\small\keywordfont #1}%
{\keywordfont #1}%
}
\newcommand{\keywordfont}{\ttfamily}
\begin{document}
\reversemarginpar % For \marginpar on the left
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras pretium
condimentum dignissim. Proin eu ullamcorper lacus, id \keyword{vehicula} eros. Cras
convallis dolor quam, laoreet pellentesque neque aliquam eu. Donec odio magna,
laoreet at fringilla et, varius vitae ipsum. Nulla facilisi. Mauris ut \keyword{finibus}
mi, sed bibendum quam. Mauris ut blandit quam.
Aenean consequat hendrerit lacus, id hendrerit tellus sodales quis. Etiam dapibus
tellus sit amet nisl molestie, at euismod sapien commodo. \keyword{integer} \keyword{tristique}
dui quis nibh malesuada tincidunt. Nulla facilisi. Pellentesque habitant morbi tristique
senectus et netus et \keyword{malesuada} fames ac turpis egestas. Morbi mi neque, sollicitudin
bibendum fringilla vitae, tincidunt nec mi. Donec placerat sapien eu turpis aliquet,
in tempor lorem molestie. Curabitur faucibus turpis non tortor auctor mattis. Duis
tempor congue eros vitae \keyword{condimentum}.
\end{document}
I have found an approach which works for me:
\usepackage{marginnote}
\newcommand{\keyword}[1]{\reversemarginpar \marginnote{\textbf{#1}}}
\newcommand{\dict}[2]{#1\normalmarginpar \marginnote{{\small #1: #2}}}
\paragraph{}
\keyword{Swiss German} "Swiss German (Standard German: Schweizerdeutsch, Alemannic
German: Schwyzerdütsch, Schwiizertüütsch, Schwizertitsch Mundart and others) is any
of the Alemannic dialects spoken in the German-speaking part of Switzerland and in
some Alpine communities in Northern Italy bordering Switzerland. Occasionally, the
Alemannic dialects spoken in other countries are grouped together with Swiss
German, as well, especially the dialects of Liechtenstein and Austrian Vorarlberg,
which are closely \dict{associated}{verbunden, assoziiert, angeschlossen} to
Switzerland's." (Source: Wikipedia)
\paragraph{}
\keyword{Lorem ipsum} \lipsum[1] % \usepackage{lipsum} required