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 need a document that has a notes column on the right hand side of each page starting after the contents page.

This notes column should have the heading "Notes" , should be 50% of the size of the main column and be separated with a thin line.

Any ideas which packages I can use to do this? I've managed to get a wide ruled margin. No heading so far.

share|improve this question

migrated from stackoverflow.com Oct 6 '11 at 11:27

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 7 down vote accepted

This should get you started. I extended the size of the margin and used \marginpar to place the text in the margin:

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{mdframed}

\setlength{\textwidth}{4.0in}%
\setlength{\marginparwidth}{2.0in}%

\mdfdefinestyle{MyMarginNoteStyle}{
    topline=false,
    bottomline=false,
    rightline=false,
    backgroundcolor=yellow!20
}

\newcommand{\MarginNote}[1]{%
\marginpar{%
\begin{mdframed}[style=MyMarginNoteStyle]%
    \textbf{Notes}%
    \par\bigskip%
    #1%
\end{mdframed}%
}}%

\begin{document}
\lipsum[1-3]
\MarginNote{\lipsum[1]}

\lipsum[4-6]
\MarginNote{\lipsum[2]}
\end{document}
share|improve this answer
    
I tried to typeset your code (cut and pasted into TeXShop) however, I get an error message ! Undefined control sequence. l.9 \mdfdefinestyle {MyMarginNoteStyle}{ ? Is one of the packages missing in TeX Live 2011? –  Sony Oct 6 '11 at 12:00
    
@Sony: I just did that now (also with TeXShop and TeXLive 2011) and I did not get that error message. Have you done an update to the packages since installing TeXLive 2011? –  Peter Grill Oct 6 '11 at 14:40
    
I usually wait a year for the next version to come out. So, I do have to update TeXLive2011. Thanks. –  Sony Oct 6 '11 at 17:04
    
@Sony: If you want to use this solution it looks like you'll need and updated version of the mdframed package. Alternatively, you could try placing the style settings that are specified in MyMarginNoteStyle as part of the actual \begin{mdframed} and remove the mdfdefinestyle{MyMarginNoteStyle}{...} section. –  Peter Grill Oct 6 '11 at 17:14
    
@sony I have the same issue. By all accounts an upgrade will fix it. I'll be able to confirm this tonight. –  Wayne Oct 10 '11 at 10:06

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.