Bob Lounsbury wrote:
Hi all,

Shouldn't using 100% textwidth in a minipage align the minipage box
with the page margins? A simple LyX Note/framed aligns properly to the
page margins or am I doing something wrong.

I've attached a simple example, along with a picture showing the
minipage box extending into the margin.
The minipage inside the frame has exactly the same width as the
room between margins. You can verify that by putting

A---horizontal fill---B
inside the minipage.

Put the same construct outside the minipage too, and see how
the distance between "A" and "B" is the same in both cases.

The problem is that the frame needs space too, some space for
the lines and some space between line and contents so the
lines doesn't touch the edges of the text. (The framing has
internal margins)

All this extra spacing is added outside the minipage, so the resulting
framed box is then slightly wider than the minipage. And too big, if the minipage
is 100% of the space between margins.


Solutions:
* Use a narrower box, and center the paragraph containing it so the box
  centers between the margins.
* Use the framed note which seems to do what you want - except that
  it doesn't have that double border.
* Figure out exactly how much widt the framing needs, and set the box width
to whatever "text widt" minus "framing spacing" is. Cumbersome, especially if
  you later change the type of framing.
* Ask around in latex forums - perhaps a better solution exists. You may have
  to use ERT to use them though.


Helge Hafting

Reply via email to