TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm playing with coffins for a title page and would like to have a square framed box that aligns with the topline and baseline of text within a rotated coffin. I have a couple of issues with this so far that I need some help with:

  1. There appears to be a margin to the left and right of the frame that produces space between the handles and the frame. Why is this here and how can I fix it?

  2. The framed box, in addition to not being square, is too large. How can I set the size of the framed box to match the height of the text?

enter image description here

From the image (edited a bit to show the problem) the handles on the text appear to be where I would expect as are the handles on the top and bottom of the framed box. MWE below.


    \NewCoffin \result
    \NewCoffin \TRBlock
    \NewCoffin \LeftMar

    \SetHorizontalCoffin \result {}

    \SetHorizontalCoffin \LeftMar {\fontsize{52}{50}\selectfont\color{gray}D}
    \SetHorizontalCoffin \TRBlock {
        \fbox{\begin{minipage}[c][\CoffinHeight\LeftMar]{\CoffinHeight\LeftMar}\centering A\end{minipage}}

    \RotateCoffin \LeftMar {90}
    \JoinCoffins\result[\LeftMar-B,\LeftMar-r] \TRBlock[r,b]
    \TypesetCoffin \result
share|improve this question
As standard, \fbox adds a margin: try setting \fboxsep = 0 pt . Also, watch for additional spaces: you need a % after the { in the \SetHorizontalCoffin \TRBlock line, for example. – Joseph Wright Jun 9 '12 at 7:37
If you're thinking of doing additional precision-fitting of ink into coffins, this question may also be helpful. – Brent.Longborough Jun 9 '12 at 10:07
@JosephWright Thanks Joseph, that did the trick. I should have thought of the space, but didn't know about the fboxsep. Would you mind posting that as an answer so that I can accept it? – Scott H. Jun 9 '12 at 16:27
up vote 2 down vote accepted

[Something of a comment made into an answer.]

As standard, \fbox adds a margin: try setting \fboxsep = 0 pt. Also, watch for additional spaces: you need a % after the { in the \SetHorizontalCoffin \TRBlock line, for example:

\SetHorizontalCoffin \TRBlock {%
    \fboxsep = 0 pt %
    \fbox{\begin{minipage}[c][\CoffinHeight\LeftMar]{\CoffinHeight\LeftMar}\centering A\end{minipage}}
share|improve this answer

Your Answer


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.