LaTeX help.

I’m marking up a document that uses margin notes (\marginpar{}) extensively (i.e. every paragraph has a corresponding margin note). Unfortunately, I keep getting errors from the LaTeX processor about there being too many unprocessed floats. I read that a way around this was to use \clearpage in my document and force LaTeX to process them. However, using this command creates massive gaps in my document, making it look ridiculous.

Is there a way around this other than reducing the number of margin notes?

Thanks.

Seems to me, the only way to fit more margin notes on the page is to have wider margins. Have you tried that? Or is LaTeX complaining despite having plenty of blank space in the margins?

There’s plenty of space. The margin notes consist of a few characters/numbers at most.

First, are you sure it’s the marginal notes that are the problem? (Do you have other figures or tables in the document?)

If the marginal notes are very lightweight (e.g., always a single line, so their placement is known when the first line of the paragraph is set) then you might be able to use a non-floating environment, maybe based on TeX’s \llap or \rlap commands. This won’t use up the float storage registers. I’ve done this to make short annotations like revision dates.

Base LaTeX has, if I read latex.ltx correctly, room for 18 unprocessed floats. That seems like it should be enough for you, but I might be misunderstanding how those are getting used. (Does latex choke on a page with a lot of short paragraphs? Can you count 18 unprinted \figure+ able+\marginpar at that point?)

There’s a package marginal.sty which claims to increase this stack to hold 52. (I’ve never used it, but it seems fairly straightforward. Try putting an \enlargefreelist in your preamble.)

You may want to use the trick described here: \marginpar without considering item as float

Thanks all. Omphaloskeptic, the \enlargefreelist command fixed the problem.

Such questions have a better chance of being answered at texhax@tug.org. You don’t have to be a member of TUG to subscribe or use this service. There is also the newsgroup comp.text.tex.