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 want to create a \marginnote which is aligned to the title of a theorem. However, the \marginnote is always placed over or under the title, when I put the \marginnote command before or into the theorem environment.

\documentclass{article}

\usepackage{ntheorem}
\usepackage{marginnote}
\theoremstyle{break}
\theorembodyfont{\normalfont}
\newtheorem{definition}{Definition}

\begin{document}

\begin{definition}[my title]
    \marginnote{my comment}
    my definition
\end{definition}

\end{document}
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Try:

\documentclass{article}

\usepackage{ntheorem}
\usepackage{marginnote}
\theoremstyle{break}
\theorembodyfont{\normalfont}
\newtheorem{definition}{Definition}

\begin{document}
\begin{definition}[my title]
    \marginnote{my comment}[-\baselineskip]% Adjust the vertical offset here
    my definition
\end{definition}

\end{document}

Note that

The command \marginnote[<left>]{<right>}[<voffset>] may be used to set a margin note using marginnote. The first optional argument and the mandatory argument are same using \marginpar from the LATEX kernel. Even \reversemarginpar will be considered. The note <left> or <right> will be put at the current vertical position. Second optional argument <voffset> may be used to adjust the vertical position of the margin note. Use a negative dimension to move it up or a positive dimension to move it down.

share|improve this answer
    
pretty easy, thanks –  bln-tom Mar 14 '13 at 16:47
    
@bln-tom You are welcome :-) –  azetina Mar 14 '13 at 16:49

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.