1

With the code:

$$A=\msq{\mat{ccccc}
2 & -1 & & \multi[2][2]{\Huge{$0$}} \\
-1& 2 & -1 \\
& \ddots & \ddots & \ddots \\
\multi[2][2]{\Huge{$0$}} & \ddots & \ddots & \ddots \\
& & & -1 & 2
\emat}.$$

I get:

Overfull \vbox (6.0pt too high) detected at line 45

Overfull \vbox (6.0pt too high) detected at line 45

where the code ends at line 45. How can I fix that?

NB \multi is as in Problem with abbreviation of `\multirow` and `\multicolumn` (LaTeX), \msq is \msq{#1}=\left[\!\!\!\!#1\!\!\!\!\right] and \mat=\begin{array}, \emat=end{array}.

MickG
  • 5,426
  • Is this at the bottom of the page? What is \multi and \emat? Have you seen Why is \[\] preferable to $$?? Instead of a code snippet like this, it is always better provide full, compilable code in the form of a minimal working example (MWE). – Werner Apr 13 '14 at 13:58
  • Please, make a complete minimal working example (MWE). The code snippet does not even make clear, whether plain TeX or LaTeX is used: $$ should not be used in LaTeX, thus it might be plain TeX. \Huge might be a hint for LaTeX. \msq, \mat#1#2\emat, \multi[#1][#2]#3 seem to be private macros. A MWE clarifies all these issues. – Heiko Oberdiek Apr 13 '14 at 14:00
  • I can only conjecture that the problem is in what \multi[2][2]{\Huge{$0$}} does. Probably a fixed height vertical box, which a \Huge zero can't fit in. Use \huge or a smaller size. – egreg Apr 13 '14 at 16:16
  • I'm using LaTeX. As for the rest, see the edit. And I just can't get used to \[\] instead of $$. I have seen http://tex.stackexchange.com/questions/503/why-is-preferable-to many times, but 1) I can't get used to the change because $$ is automatic and I need speed typing in notes, and 2) it seems from that question that the difference is seen only in a few rare cases and is rarely any big issue, correct me if I'm wrong, so I don't see why I should change. – MickG Apr 14 '14 at 12:55
  • I'm afraid I can't reduce the size: the \Huge{$0$} has to fill a 2x2 block and it's just the right size as \Huge; in fact, if anything I'd make it bigger. Could I use \vbox to … to solve this in any way? – MickG Apr 14 '14 at 16:18
  • 1
    you might try \smash{\Huge{$0$}} to make the "apparent" height and depth zero. you might have to fiddle with the vertical position. (sorry; this is unchecked, so it might not really work as i expect.) – barbara beeton Apr 14 '14 at 16:42
  • @barbarabeeton yes it works and yes I have to fiddle with the position, which is no big deal since I was anyway already doing it both vertically and horizontally, so perfect solution :). – MickG Apr 22 '14 at 11:48

1 Answers1

1

try \smash{\Huge $0$} to make the "apparent" height and depth zero.

you might have to fiddle with the vertical position.

sorry i can't show output, but i'm on the road without any tex resources to test.