4

I am trying to take some notes in the margins, that will appear in the printed edition. I hope to use adjmulticols to adjust the margins for two column text in the document so I can save space. Unfortunately the causes the marginnote to collide with my text here is an example:

\documentclass{article}
\usepackage{lipsum,multicol}
\usepackage{marginnote}
\usepackage{adjmulticol}
\begin{document}
Here I have some text that is in a single regular column.
 It is not very interesting, but it should illustrate the purpose here.
 \marginnote{Here is a margin note, that should look fine}
 I'm sure you can come up with something more interesting, but 
 that isn't the point here, it is just to have some text in a single column.
 Just so you don't have to read this crap the whole time, I'll give you
 something worth reading.
\begin{adjmulticols}{2}{-7.5 ex}{-7.5ex}
I had called upon my friend Sherlock Holmes upon the second
morning after Christmas, with the intention of wishing him the
compliments of the season. He was lounging upon the sofa in a
purple dressing-gown, a pipe-rack within his reach upon the
right, and a pile of crumpled morning papers, evidently newly
studied, near at hand. Beside the couch was a wooden chair, and
on the angle of the back hung a very seedy and disreputable
\marginnote{This is an ugly hat, and an ugly margin note}
hard-felt hat, much the worse for wear, and cracked in several
places. A lens and a forceps lying upon the seat of the chair
suggested that the hat had been suspended in this manner for the
purpose of examination.

"You are engaged," said I; "perhaps I interrupt you."

"Not at all. I am glad to have a friend with whom I can discuss
my results. The matter is a perfectly trivial one"--he jerked his
thumb in the direction of the old hat--"but there are points in
connection with it which are not entirely devoid of interest and
even of instruction."

I seated myself in his armchair and warmed my hands before his
crackling fire, for a sharp frost had set in, and the windows
were thick with the ice crystals. "I suppose," I remarked, "that,
homely as it looks, this thing has some deadly story linked on to
it--that it is the clue which will guide you in the solution of
some mystery and the punishment of some crime."

"No, no. No crime," said Sherlock Holmes, laughing. "Only one of
those whimsical little incidents which will happen when you have
four million human beings all jostling each other within the
space of a few square miles. Amid the action and reaction of so
dense a swarm of humanity, every possible combination of events
may be expected to take place, and many a little problem will be
presented which may be striking and bizarre without being
criminal. We have already had experience of such."

"So much so," I remarked, "that of the last six cases which I
have added to my notes, three have been entirely free of any
legal crime."
\end{adjmulticols}
\end{document}

This produces the following output, which is obviously not so good. As a side bonus, how do I get this note to be on the other side? I know it should be easy, but I haven't found it yet in the docs. Ugly Margin Note

3

This solution provides a possible workaround. Use of adjustwidth from changepage package. Within an adjustwidth environment the left and right margins can be adjusted. The environment takes two required length arguments:

\begin{adjustwidth}{<leftmargin>}{<rightmargin>} ... \end{adjustwidth}

A positive length value will increase the relevant margin (shortening the text lines) while a negative length value will decrease the margin (lengthening text lines). An empty length argument means no change to the margin. At the end of the environment the margins revert to their original values.

Here a \mymarginnote macro taking 3 arguments is defined. #1=leftmarigin, #2=rightmargin and #3= text content. Red text are the situation needs improvment while blue text are proposed corrections.

enter image description here

Code

\documentclass{article}
\usepackage{lipsum,multicol}
\usepackage{marginnote,xcolor}
\usepackage{changepage}
\usepackage{adjmulticol}

\newcommand{\mymarginnote}[3]{\marginnote{\begin{adjustwidth}{#1}{#2} 
\color{blue}            % This is for clarity purpose, can be removed 
#3
\end{adjustwidth}}
}
\begin{document}
Here I have some text that is in a single regular column.
 It is not very interesting, but it should illustrate the purpose here.
 \marginnote{Here is a margin note, that should look fine}
 I'm sure you can come up with something more interesting, but 
 that isn't the point here, it is just to have some text in a single column.
 Just so you don't have to read this crap the whole time, I'll give you
 something worth reading.
\begin{adjmulticols}{2}{-7.5 ex}{-7.5ex}
I had called upon my friend Sherlock Holmes upon the second
morning after Christmas, with the intention of wishing him the
compliments of the season. He was lounging upon the sofa in a
purple dressing-gown, a pipe-rack within his reach upon the right, and a pile of
crumpled morning papers, evidently newly studied, near at hand. Beside the couch was
a wooden chair, and on the angle of the back hung a very seedy and disreputable
\marginnote{\begin{adjustwidth}{}{}% no change of margin
\color{red}This is an ugly hat, and an ugly margin note
\end{adjustwidth}}
\mymarginnote{6ex}{} 
{This is an ugly hat, and an ugly margin note}[1.5cm] % increase the left margin
\reversemarginpar % to show on the other side
\mymarginnote{-5ex}{6ex}
{This is an ugly hat, and an ugly margin note}[1.5cm] % decrease the left margin and increase the right margin 
hard-felt hat, much the worse for wear, and cracked in several
places. A lens and a forceps lying upon the seat of the chair
suggested that the hat had been suspended in this manner for the
purpose of examination.

"You are engaged," said I; "perhaps I interrupt you."

"Not at all. I am glad to have a friend with whom I can discuss
my results. The matter is a perfectly trivial one"--he jerked his
thumb in the direction of the old hat--"but there are points in
connection with it which are not entirely devoid of interest and
even of instruction."

I seated myself in his armchair and warmed my hands before his
crackling fire, for a sharp frost had set in, and the windows
were thick with the ice crystals. "I suppose," I remarked, "that,
homely as it looks, this thing has some deadly story linked on to
it--that it is the clue which will guide you in the solution of
some mystery and the punishment of some crime."

"No, no. No crime," said Sherlock Holmes, laughing. "Only one of
those whimsical little incidents which will happen when you have
four million human beings all jostling each other within the
space of a few square miles. Amid the action and reaction of so
dense a swarm of humanity, every possible combination of events
may be expected to take place, and many a little problem will be
presented which may be striking and bizarre without being
criminal. We have already had experience of such."

"So much so," I remarked, "that of the last six cases which I
have added to my notes, three have been entirely free of any
legal crime."
\end{adjmulticols}
\end{document}
1
  • 1
    This works very well for my purposes, Thank you! – Zool Aug 10 '14 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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