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 am putting marginpars into the text to help the reader find important terms in my text.

Now, where am I supposed to put the marginpar so that it aligns with the term?

Let us define \marginpar{Ipsum}\emph{Ipsum}: ...

or

Let us define \emph{Ipsum}\marginpar{Ipsum}: ...

(Bonus: Will putting it after the colon mess anything up?)

Let us define \emph{Ipsum}:\marginpar{Ipsum} ...

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I've just tried experimenting and although my experiments were perhaps simplistic, I could not detect any difference in the three cases so long as there was no space between the item and the marginpar.

My experiment was the following code:

\documentclass{article}

\newlength\shove
\setlength{\shove}{23.57pt}

\begin{document}

How much is that doggie in the window?\hspace{\shove}
The one with the waggly tail?
How much is that doggie in the window?
I do hope that doggie's for sale!


How much is that doggie in the window?\hspace{\shove}
The one with the waggly tail?\marginpar{That's ``tail'' not ``tale''}
How much is that doggie in the window?
I do hope that doggie's for sale!

How much is that doggie in the window?\hspace{\shove}
The one with the waggly \marginpar{That's ``tail'' not ``tale''}tail?
How much is that doggie in the window?
I do hope that doggie's for sale!


How much is that doggie in the window?\hspace{\shove}
The one with the waggly tail\marginpar{That's ``tail'' not ``tale''}?
How much is that doggie in the window?
I do hope that doggie's for sale!

\end{document}

By trial-and-error, \shove was the maximum space that could be added there without shoving the "tail?" on to the next line. All three looked exactly the same in terms of positioning and spacing.

(Of course, there's probably an argument as to where to put it for semantic reasons, but I'll leave that to someone else as I don't know of a hard-and-fast rule to apply in this case so my opinion would be just that: an opinion.)

share|improve this answer
    
Thanks Andrew for the experimentation! I repeated that test with some own text and it seems that adding the marginpar before the word adds a tiny amount of spacing (maybe 5 pixels at 800% zoom) –  Christopher Oezbek Aug 6 '10 at 9:12
    
@Christopher Oezbek: I think I could live with that! –  Loop Space Aug 6 '10 at 9:37

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.