# How to put side notes in available whitespace, not just in margins

I'm creating a document that shows a template of a documentation standard. I'd like to put in some miscellaneous notes for the template placeholders. Something like

[date1]   [COMMENT: Please use only dates obtained from
[date2]   the Center for Dates.]
[date3]


Since the date list will have lots of white space to its right, I'd like the comment to appear there. It's closer to home and conserves space. The closest I found to what I want is \marginpar{} but it doesn't quite do the trick.

How can I do this in LaTeX?

-
@skytrader Suppose we have a comment for date2 and date3 would you please modify your example to show, how you propose to have it typeset (assume they all have two lines of contents). If you have an example scan from the standard, it will even be better to include a small image. – Yiannis Lazarides Dec 9 '11 at 4:33

The difficulty with this layout, is that the dates are printed using a different grid from those of the comments, i.e., it makes a tabular environment an unsuitable way to typeset such a layout. In a way, the comments are typeset as "sideways-footnotes"!

To make it convenient for the author to enter the lines, we provide a user command as:

\adddate{date..}{Please ....}


We create a list to hold all the data. We then iterate through the list and typeset using two minipages. Adding a bit more salt and pepper and some LaTeX kernel black magic commands we get the minimal below:

\documentclass{article}
\makeatletter
\def\listone{}
\ifx\@empty\listone
\fi
\expandafter\def\csname#1\endcsname{\footnotesize #2}
}

\parindent0pt
\begin{document}
% print the data
% define a macro for this for convenience
% if you want
\begin{minipage}[t]{2.5cm}
\@for\next:=\listone\do{%
\next \par
}
\end{minipage}
\begin{minipage}[t]{3cm}
\@for\next:=\listone\do{%
\@nameuse\next \par
}
\end{minipage}
\end{document}


You can add an additional macro to hold the code for the loops, if you are going to use such code extensively.

-
Wow! That's really some time you've got. I don't really have anything specific in mind about the layout---I planned to clip my words should they overflow. But that's really some effort. Thank you very much! (--,) – skytreader Dec 9 '11 at 5:25
@Yiannis -- this would look even nicer if the comments were set ragged right instead of justified. the uneven spacing makes this material hard to read, and i don't think the extra attention is "justified". (sorry about that.) – barbara beeton Dec 9 '11 at 14:14
@barbarabeeton -- thanks for the comment; no amount of cosmetic surgery can turn this ugly duckling into a typographical beauty. This sort of example though is good from a programming point of view, as it demonstrates, iteration and the use of lists using (La)TeX. – Yiannis Lazarides Dec 9 '11 at 14:43
@Yiannis -- ugly duckling, true! and i agree it's a useful demonstration of techniques. but i still feel that the ugliness and difficulty of reading the result attract more and longer attention than warranted for the object. a subjective view. – barbara beeton Dec 9 '11 at 15:56