Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a picture I am trying to typeset with xypic using pdflatex. As a minimal example there are basically a few boxes with a curly brace under them. I try to do this with the following code:

\usepackage[pdf,color,curve,all]{xy}
% ... (Other packages, begin{document}, content, etc.) 
\xy
    (0, -8)   *=(8,8){d^{(0)}_{2,0}}*\frm{-},
    (8, -8)   *=(8,8){d^{(0)}_{2,1}}*\frm{-},
    (16, -8)  *=(8,8){d^{(0)}_{2,2}}*\frm{-},
    (24, -8)  *=(8,8){d^{(0)}_{2,3}}*\frm{-},
    (12,-4)   *=(24,16)*\frm{_\}}
\endxy

The result is as follows:

Curly Braces gone wrong

This is clearly not what I intended to do... Furthermore, LaTeX gives the following error:

A <box> was supposed to be here.

The error vanishes once I remove the last line defining the curly brace.

What am I doing wrong? Or is it because of some unloaded arguments. I have just no clue around here... Thank you for your help.

Update 1:

I just updated all packages to their current release, this did not solve the problem. Copying Exercise 21 from the XYPic reference guide to the document also fails with identical error message and similar output problems..

\xy 
    (0,0) *+++{A} ; 
    (10,7) *+++{B} **\frm{.} 
    **\frm{^\}} ; **\frm{_\}}
\endxy

Using \frm{\}} for vertical braces works fine, however frm{_(} does not work neither. I'm getting really clueless.

share|improve this question

migrated from stackoverflow.com Apr 28 '11 at 9:15

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

    
I get the same error compiling to a dvi, so I removed the pdflatex tag. Interestingly, the output looks different on my computer (even when compiling with pdflatex). –  Caramdir Apr 28 '11 at 16:45
    
Thanks for researching. Does it look correct at your computer, or just different? For me there seems to be no change no matter how I alter flags or change compilation settings. –  Thilo Apr 28 '11 at 17:26
add comment

2 Answers

The error has nothing to do with _\}, but rather that you are not dropping anything with the first *:

\begin{xy}
    (0, -8)   *=(8,8){d^{(0)}_{2,0}}*\frm{-},
    (8, -8)   *=(8,8){d^{(0)}_{2,1}}*\frm{-},
    (16, -8)  *=(8,8){d^{(0)}_{2,2}}*\frm{-},
    (24, -8)  *=(8,8){d^{(0)}_{2,3}}*\frm{-},
    (12,-4)   *=(24,18){}*\frm{_\}}
\end{xy}

I don't get any error with the input from exercise 21, but rather the expected picture, even with xypdf.

share|improve this answer
    
Thank you. This removes the error from appearing. However, the image still looks like above - do you have any idea how to resolve this as well? –  Thilo Apr 28 '11 at 17:54
    
@Thilo: Are you using XeLaTeX and unicode-math? If so, you may have an old version of the package. A problem like that happened to me some months ago and it was solved with an update to the package. With pdflatex the braces are OK. –  egreg Apr 28 '11 at 19:21
    
I just updated all my packages just to make sure something like this is not caused by an outdated package. Did not help, though. Tried XeLaTeX, pdflatex, plain latex to DVI, all produce the same. –  Thilo Apr 28 '11 at 19:48
add comment
up vote 1 down vote accepted

In case somebody else has the same problem:

I found the problem beeing the mathtools packet. This one changes the underbraces to make them look better, which, in my case, did not work out as expected.

You can use the mathtools package and still revert to the old underbraces using

\let\underbrace\LaTeXunderbrace \let\overbrace\LaTeXoverbrace

Now everything works fine.

share|improve this answer
add comment

Your Answer

 
discard

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.