TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's a small example of what I have to use. I have to reset the length everytime I use \marginnote because it restarts indenting and reformats the skip to 0.

\marginnote{\normalsize Some text goes here}

What I would like to be able to do is redefine this behaviour so I don't have to type so much junk (and keep my tex/Sweave document cleaner)

\somecommand Some text goes here 

Is there a way to get it to do so?

share|improve this question
Why does \marginnote reset the lengths in the first place? – Werner Mar 5 '12 at 18:23
No idea, and I don't understand latex enough to figure it out* – Brandon Bertelsen Mar 5 '12 at 18:24
The grouping I suggest in my answer should work to keep the length modification to "within" \somecommand. – Werner Mar 5 '12 at 18:25
That it does - thanks! – Brandon Bertelsen Mar 5 '12 at 18:29
up vote 5 down vote accepted

You could use a grouping structure to localise any changes made by \marginnote:

\newcommand{\somecommand}[1]{% \somecommand{<text>}
  \marginnote{\normalsize #1}%

You would then use

\somecommand{Some text goes here.}
share|improve this answer
Perfect, I just added my \setlength's after \marginnote and it works as expected. – Brandon Bertelsen Mar 5 '12 at 18:29

Your Answer


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.