I'm getting underfull \hbox warnings that I don't understand when using \inmargin commands.

For example:

\setuppapersize[A5] %%148mm x 210mm
\setuplayout[width=104mm, height=185mm, margin=20mm, backspace=24mm, topspace=12.5mm]
\setuppagenumbering[alternative=doublesided, location=right]



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam at venenatis nulla, eu placerat elit. Sed nec nunc vitae neque faucibus congue. Nullam fringilla leo ut libero semper vulputate. Fusce pulvinar ligula lacinia justo mattis consequat. Sed non mauris et turpis bibendum ornare at ut diam. Aenean porttitor, tortor sed faucibus feugiat, risus eros convallis lacus, quis interdum mi augue et sem. Nullam quam lorem, venenatis non mauris sit amet, suscipit pharetra nibh. Sed gravida ante felis, cursus pharetra risus pellentesque sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean porta nunc sit amet urna auctor, vitae imperdiet leo porta. Pellentesque a elit ut mi suscipit ultricies. Aenean metus urna, interdum vel auctor ut, congue id libero. Pellentesque aliquam, nunc ac tristique accumsan, dui dui volutpat erat, eget efficitur neque velit sed purus.

Curabitur erat sem, ullamcorper ac ipsum in, dictum rutrum enim. Curabitur eu nisl ultrices, aliquam ante at, faucibus nunc. Nam orci lacus, accumsan in tortor faucibus, interdum tincidunt libero. Morbi et orci vel quam feugiat fermentum non id nisl. \pg{2}Sed aliquam libero in nisl aliquet, a tincidunt elit egestas. Mauris ut congue ligula. Morbi pellentesque est ac varius consequat. Vestibulum lobortis turpis ut lectus posuere, non venenatis nisl aliquet. Vestibulum tincidunt mattis augue et fringilla. Curabitur vehicula sodales sapien ac viverra. Donec vel bibendum velit. Quisque dapibus bibendum convallis. Proin efficitur tellus turpis, nec faucibus orci euismod ac. Proin at iaculis risus. Mauris finibus nisl ac est commodo molestie. Sed ac erat mauris.

Ut auctor eu enim nec iaculis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed eu mi est. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In volutpat elit in sapien auctor luctus. Morbi venenatis efficitur lorem et facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris elementum ex accumsan maximus feugiat. Nunc pretium eget enim quis luctus. Duis ut luctus tortor, quis tempus turpis. Proin justo arcu, lobortis ut convallis vitae, condimentum quis purus. Fusce auctor mi sit amet cursus lobortis. In hac habitasse platea dictumst. Donec pulvinar nisl sed quam tincidunt, non aliquet arcu dictum. Duis laoreet ullamcorper elit vitae luctus. Vestibulum rutrum pellentesque nisl, sit amet maximus purus gravida vitae.

Donec nec congue magna, sit amet egestas dui. Maecenas efficitur tortor eros. Sed gravida molestie diam vitae facilisis. Pellentesque ultrices arcu sit amet tellus faucibus luctus efficitur sit amet risus. Nulla tempor, est in varius rutrum, lacus mauris rutrum tellus, quis ullamcorper diam ex nec purus. Proin eu magna mauris. Pellentesque feugiat tincidunt ante vel viverra.

Proin a odio non nisl hendrerit fringilla eleifend quis augue. Proin volutpat lorem quis mauris vehicula posuere. Mauris luctus a purus a rutrum. Mauris pharetra gravida mi, quis \pg{3} aliquet ligula finibus vel. Nullam odio arcu, faucibus vel orci ullamcorper, vestibulum fermentum urna. Duis vitae dignissim lectus, et interdum nibh. Curabitur et turpis a neque sagittis egestas et ac dui. Morbi condimentum sed metus ut ullamcorper. Mauris.

When I uses \inouter (as here), I get the error on right pages; with \ininner, I get it on left pages; and with \inmargin I get it on both.

This seems to happen only when both of the following are true:

  • font size is < 12pt
  • the document is doublesided

I tried playing around with various configurations of \startalignment, but everything I tried either didn't work or messed up the placement of the margin notes.

If someone could explain what is happening here, I would be very grateful. Thanks!

1 Answer 1


You get the warning when you have a short right aligned text which doesn’t exceed more than one line.

When you run the following example


you get the same warning as in your own example.

Underfull \hbox (badness 2608) in paragraph at lines 2--2
 [][]\3>modern-designsize-12pt-rm-tf-0--0 (lmroman12-regular) M[]

When you’re certain the content of your texts fit into a single line you can add the line keyword to the align key.


You can apply this solution to your example by creating a own margin command named pg where you apply to alignment settings from the example above.


\definemargindata   [pg] [inouter] [style=\tfx,command=\groupedcommand{[}{]}]
\definemarginframed [pg] [inouter] [align={inner,line}]

  • That's very helpful, thank you. Is there a reason this warning is issued with right-aligned boxes but not left-aligned?
    – MalFet
    Jan 14, 2018 at 1:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .