# Specifying font size in a \newcommand?

I'm typing up a document in which I'd like to the margin's note font to be footnote size. This is my code:

\documentclass[12pt]{article}
\usepackage{outlines,marginnote}
\usepackage[top=1cm, bottom=1.3cm, left=5cm, right=0.75cm, heightrounded, marginparwidth=4.6cm, marginparsep=3mm]{geometry}
\reversemarginpar
\newcommand{\mn}{\marginnote}
\pagestyle{empty}

\begin{document}
\begin{flushleft}
\Large \underline{Chapter 8 \textsc{Lipids}}
\end{flushleft}

\section*{Lipids}
\begin{outline}[enumerate]
\1 What is a lipid? \mn{{\footnotesize How's it different from the other functional groups?}}
\end{outline}

\end{document}


As it can be seen from my MWE, I had to specify the font size while making the margin note, but I want \footnotesize to assumed automatically. I'm thinking this can be done by modifying my \newcommand for margin note. I tried playing around with it, but nothing worked. If anyone could point me in the right direction, I'd really appreciate it.

-
–  Werner Oct 4 '11 at 19:40

The documentation of marginnote is your friend:

\renewcommand*{\marginfont}{\footnotesize}


Here is a complete example:

\documentclass[12pt]{article}
\usepackage{marginnote,letltxmacro}
\renewcommand*{\marginfont}{\footnotesize}
\LetLtxMacro\mn\marginnote
\pagestyle{empty}

\begin{document}
What is a lipid? \mn{How's it different from the other functional groups?}
\end{document}


With the package outlines.sty it also works:

\documentclass[12pt]{article}
\usepackage{outlines,marginnote,letltxmacro}
\usepackage[top=1cm, bottom=1.3cm, left=5cm, right=0.75cm, heightrounded, marginparwidth=4.6cm, marginparsep=3mm]{geometry}
\reversemarginpar
\renewcommand*{\marginfont}{\footnotesize}
\LetLtxMacro\mn\marginnote
%\newcommand{\mn}{\marginnote}
\pagestyle{empty}

\begin{document}
\begin{flushleft}
\Large \underline{Chapter 8 \textsc{Lipids}}
\end{flushleft}

\section*{Lipids}
\begin{outline}[enumerate]
\1 What is a lipid? \mn{{\footnotesize How's it different from the other functional groups?}}
\end{outline}

\end{document}


EDIT Added letltxmacro. Thanks to Werner for his comment.

-
outlines is not included in TeX Live, but it is included in MiKTeX. –  Werner Oct 4 '11 at 20:02
@Werner: I downloaded the file from CTAN ;-) But the package has a small bug. It calls ProvideClass –  Marco Daniel Oct 4 '11 at 20:03
Since \marginnote takes optional arguments, better to use \LetLtxMacro{\mn}{\marginnote} from the letltxmacro package. –  Werner Oct 4 '11 at 20:08
@Werner: You are right. –  Marco Daniel Oct 4 '11 at 20:24
@Marco: Although I liked Ben's fix since it was quick and easy (at least for my level of LaTeX), I decided to go with yours since it worked and I also learned a bit more about LaTeX. Thanks for your help! –  Halime Oct 4 '11 at 21:35

You could try \newcommand{\mn}[1]{\marginnote{\footnotesize #1}}. That would work, but Marco's solution is better.

-
Sorry but with this solution you can't use the optional argument of \marginnote. (\marginnote[left]{right}[voffset]) –  Marco Daniel Oct 4 '11 at 19:43
@Marco, true -- but the usage in the question above didn't indicate optional arguments, and seemed to be looking for a \newcommand approach. As I said, your solution is better, since \marginnote includes a font hook. –  Ben Lerner Oct 4 '11 at 19:48
You can use \newcommand{\mn}[2][]{\marginnote[\footnotesize #1]{\footnotesize #2}} –  Marco Daniel Oct 4 '11 at 19:52