# What does the warning about “moved marginpar” mean?

I repeatedly get the LaTeX warning:

LaTeX Warning: Marginpar on page x moved.


What does this mean? Is that a problem? How can I fix the corresponding problem?

-

## migrated from stackoverflow.comJul 24 '11 at 10:30

This question came from our site for professional and enthusiast programmers.

Thank you for the answers! I add my own since I found it on the todonotes package author's blog page:

http://midtiby.blogspot.com/2008/05/updated-todonotes-package.html?showComment=1215360900000#c7770492295748791763

Your problem with the "Marinpar in page x moved" is probably caused by placing several todonotes on one page. If two todonotes (they are in fact marginnotes) are goin to overlap, latex will try to move the todonotes up and down on the page to avoid the overlap. To let the user know that the marginpars have been moved, the warning is issued.

In fact, just deactivating the todonotes packages makes the warning go away. This is fine since those notes are only useful for the draft version.

-
if the todonotes package, which i really, really like, is giving you marginpar problems, you should consider using the inline option of the todonotes package: \todo[inline]{to do text} –  Mica Feb 9 '10 at 16:19

Alternate explanation:

Do you have multiple marginpars? It may be that placed in their natural position they would overlap each other, so one (or move) was moved a bit to make room.

I've used marginpars for a internal FIXME tool before, and using a lot can result in some being displaced from their associated text.

-
The warnings do not go away. It happens indeed when two notes are close to each other on the same page. –  Olivier Feb 9 '10 at 15:39

It has nothing to do with overlapping margin notes. TeX's \marginpar is treated like a float; the page-breaking mechanism is independent of the paragraph layout, so if a paragraph containing a marginpar is broken across pages, the page break can occur before the marginpar gets output, and since it can't back up and output stuff on the previous page, the note ends up at the top of the following page rather than alongside the line where the command occurred; that's when you get the warning. (\usepackage{marginnote} will get you a non-floating \marginnote which solves this problem)

-

It means that you have a marginal note (marginpar) which was in one place on your last compile, and is now someplace else.

-
I'm not sure about this... I get exactly the same warning at each compile, at exactly the same pages, so it does not seem to be related to any previous compile. In fact, it shows up even for the first compile, after I cleared the auxiliary files. –  Olivier Feb 9 '10 at 15:17
Check your marginal notes. Are they all showing up in the places you expect? Do they jump around on successive compiles? –  uckelman Feb 9 '10 at 15:22
Not exactly, but now I see where this comes from: the todonotes package. It happens when two notes are close to each other. –  Olivier Feb 9 '10 at 15:39
No. It's when two marginal notes would naturally overlap and one has to move –  Rob Hyndman Feb 9 '10 at 23:31
Yes. todonotes ARE marginal notes. –  naught101 Apr 28 '12 at 4:59
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7357913851737976, "perplexity": 1913.2475816874214}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-35/segments/1440644063881.16/warc/CC-MAIN-20150827025423-00313-ip-10-171-96-226.ec2.internal.warc.gz"}