7

I'm getting strange results when I use the cases environment in Tufte-LaTeX documents with the mathdesign package. Instead of

enter image description here

I get

enter image description here

Is there something I can do to get rid of that huge brace?


\documentclass[]{tufte-handout}

\usepackage{mathtools}

%The following appears to be the source of my problems; removing this line produces an acceptable result
\RequirePackage[bitstream-charter,expert,euro]{mathdesign}

\begin{document}

\[
a(1,j)=\begin{cases}
r^{j-1} & ;j\le n\\
f\cdot r^{j-(n+1)} & ;j>n
\end{cases}
\]

\end{document}
David Carlisle
  • 757,742
orome
  • 10,459
  • The fix is simply to set \delimiterfactor=912. That seems to be the largest value that solves the problem. Tufte-LaTeX must set it to something larger. – orome Jul 08 '12 at 22:21

1 Answers1

5

The big brace you get is built from smaller pieces and that's the minimum size as the following minimal document shows:

\documentclass{article}
\usepackage[bitstream-charter]{mathdesign}

\begin{document}

\def\test#1{$\left\{\rule{0pt}{#1pt}(#1\textrm{pt})\right.$ }

\noindent\test{6}
\test{8}
\test{10}
\test{12}
\test{14}
\test{16}
\test{18}
\test{20}
\test{22}
\test{24}
\test{26}
\test{28}
\test{30}

\end{document}

enter image description here

Up to the 18pt case the brace is a unique glyph. Beyond that point TeX must build the brace from smaller pieces and in the case of the Charter math fonts provided by mathdesign this has an unfortunate gap.

There's a fundamental difference in behaviour between tufte-book and article: the former sets the normal baselineskip to 14pt instead of the 12pt of the article class. So, with tufte-book, the array that contains the two cases is

\vbox(28.55986+5.04002)x83.62628

while with article it is

\vbox(24.47987+4.32002)x80.47983

So it's a bit wider both horizontally and vertically. Indeed, if you try

\[
a(1,j)=\begin{cases}
r^{j-1} & ;j\le n\\[4.8pt]
f\cdot r^{j-(n+1)} & ;j>n
\end{cases}
\]

with the article class, you'll see the same behavior as with tufte-book.

egreg
  • 1,121,712
  • How do I avoid tipping over that 18-20 pt gap in the example above? – orome Jul 03 '12 at 12:06
  • 2
    @raxacoricofallapatorius In that particular case, inputting r^{\smash{j-1}} avoids jumping to the next size. – egreg Jul 03 '12 at 12:44
  • 1
    Is there a general way to override LaTeX's judgment on the side of brace that should be used? And (perhaps this is a meta equation) is there a way to confirm that this is a logged bug, or get some sense of when it's likely to be fixed? – orome Jul 03 '12 at 13:06
  • 2
    @raxacoricofallapatorius You should look at \delimitershortfall and \delimiterfactor in the TeXbook or TeX by Topic. But I'm afraid that this is a limitation of the specific font, not of TeX. – egreg Jul 03 '12 at 13:16
  • Understood: my question was whether I could prevent TeX's (correct) logic (that a 20pt brace is appropriate) from kicking in an resulting in the font's too-large one. For example an 18pt brace would be better in this case (for this font). – orome Jul 03 '12 at 13:22
  • @raxacoricofallapatorius You can't, in general. You might enlarge the value of \delimitershortfall or reducing \delimitershortfall, which works for the particular case, but might give bad results for a bigger brace. The problem is precisely the gap: try the same input with the Computer Modern fonts and you won't see it. – egreg Jul 03 '12 at 13:30
  • Would it also make sense to insert a space between the two cases? Is there a good way to do that within a cases environment? – orome Jul 03 '12 at 14:05
  • 2
    @raxacoricofallapatorius It's an option: \\[<dimen>] works also in cases. – egreg Jul 03 '12 at 14:06
  • Why doesn't this problem happen in other document classes? The problem doesn't occur if I replace tuft-handout with article in my MWE? – orome Jul 08 '12 at 21:50
  • Using r^{\smash{j-1}} has no effect in my MWE. – orome Jul 08 '12 at 21:51