[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Bit OT]: Latex Gurus?



"Byron Hillis" <b_hillis@optusnet.com.au> writes:
>
> A quick Q for a Latex document layout. I want a single 
> column output, but on the right hand side I want a line 
> that separates the \marginpar notes from the rest of the
> text. Like this....
>
>       Body Text Body Text Body Text |
>       Body Text Body Text Body Text |
>       Body Text Body Text Body Text | MarginPar
>       Body Text Body Text Body Text |

The following should do what you want and doesn't require any special
LaTeX packages.  You can adjust the \marginrulewidth and \marginparsep
parameters at the top: the \marginparsep is the separation between the
text and marginpars, and a rule of width \marginrulewidth will be
placed in the middle of that separation.

-----START OF EXAMPLE-----
\documentclass{article}

\makeatletter
\newlength\marginrulewidth
\marginrulewidth=0.4pt
\marginparsep=3em
\let\oldoutputpage\@outputpage
\def\@outputpage{\setbox\@outputbox\vbox{\hbox{\box\@outputbox
      \kern.5\marginparsep\kern-.5\marginrulewidth
      \vrule width\marginrulewidth
      \kern.5\marginparsep\kern-.5\marginrulewidth}}\oldoutputpage}
\makeatother

\begin{document}

\noindent
Body Text Body Text Body Text Body Text Body Text Body Text Body Text
Body Text Body Text Body Text Body Text Body Text Body Text Body Text%
\marginpar{Marginpar}
Body Text Body Text Body Text Body Text Body Text Body Text Body Text
Body Text Body Text Body Text Body Text Body Text Body Text Body Text
Body Text Body Text Body Text Body Text

\end{document}
-----END OF EXAMPLE-----

-- 
Kevin Buhr <buhr+debian@asaurus.net>



Reply to: