Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to write a user guide in LaTeX, and I want to layout my page in a way that I can put in a left margin for comments / notes on the corresponding lines of text in the main portion of the page (eg. a pcture of an exclamation mark and some words of caution to the reader about something said in the content on the right).

Furthermore it would be nice if I could somehow get a thin line separating the margin and the main body of text.

I've tried playing around with minipage, but I don't know how to specify the placement of the columns: I can't make the "margin" column align to the left side of the page, minipage always splits the page in half.

EG:

          |  main content of the page
          |  ctd.....................
! Warning |  ctd.....................
          |  ctd.....................
          |  ctd.....................
? Note    |  ctd.....................
          |  ctd.....................
share|improve this question
add comment

3 Answers

up vote 9 down vote accepted

One possible solution would be to use the space reserved for marginal notes to place the comments/notes and to use the background package to place the vertical rule separating the text from the notes/comments; a little example (feel free to adapt and improve my example to suit your needs):

\documentclass{article}
\usepackage{marginnote}
\usepackage{graphicx}
\usepackage{background}
\usepackage{lipsum}% just to generate filler text

% settings for the vertical line
\SetBgScale{1}
\SetBgColor{black}
\SetBgAngle{0}
\SetBgHshift{-0.52\textwidth}
\SetBgVshift{-1mm}
\SetBgContents{\rule{0.4pt}{\textheight}}

\newcommand*\Note{%
  \marginnote[\textcolor{blue}{\raggedright{\LARGE ?}\ Note }]{}%
}
\newcommand*\Warn{%
  \marginnote[\textcolor{red}{\raggedright{\LARGE !}\ Warning }]{}%
}
\reversemarginpar

\begin{document}
some test text\Note{sdfasdfdsfsd} \lipsum[1]
\Warn{sdfasdfdsfsd} \lipsum[1]
\end{document}

A portion of the resulting document:

enter image description here

share|improve this answer
    
background is a very nice package. Thanks for writing it. –  Alan Munn Mar 21 '11 at 2:16
    
@Alan Munn: thank you. I am preparing a new version of the package. –  Gonzalo Medina Mar 21 '11 at 2:19
add comment

none of these worked for me. here is a simple method to draw a line seperated the right margin. you can easily adjust it for the left one:

\usepackage{eso-pic}
\AddToShipoutPicture{
  \AtTextLowerLeft{
    \put(\LenToUnit{\textwidth},0){
      \rule{1pt}{\textheight}
    }
  }
}
share|improve this answer
add comment

Use \marginpar:

\documentclass{article}
\begin{document}
Here's a paragraph.
\marginpar{\raggedright Warning! That paragraph is only one sentence long!}
\end{document}

If this is really a two-column document with margin notes, then you may want to look at the memoir class as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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