Whenever I write a displayed equation like

$$0\longrightarrow A\longrightarrow B$$

the top margin is much bigger than the bottom margin (around four times larger). I am trying to make the bottom margin as big as the top margin, but I don't know how. Can this be adjusted globally?

This happens with tikzcd, too, for example with

 \begin{tikzcd}[column sep=small]
{}&\overset{3}{\scriptstyle \bullet} \arrow[dl,swap,"\alpha" ]&{}\\
{} \underset{4}{\scriptstyle \bullet} &{}& \underset{2}{\scriptstyle \bullet}\arrow[ll,"\delta"]\arrow[ul,swap,"\beta"] & & \underset{1}{\scriptstyle\bullet}\arrow[ll,"\alpha"]

but in this case no separation from the text is produced, and it looks awful.

  • 4
    As this doesn't happen normally, you may have to provide a MWE. See minimal working example (MWE) BTW, if you are using LaTeX, use \[...\] over $$...$$. – user11232 Sep 10 '15 at 4:04
  • 3
    That's not an inline equation. For inline equations you should use single $'s. For displayed equations, use something like \begin{equation} or \begin{gather}. – JPi Sep 10 '15 at 4:05
  • @HarishKumar I have provided an example of a tikz code I want centered and displayed. – Pedro Tamaroff Sep 10 '15 at 4:10
  • 2
    Please start the code with \documentclass{...} and end at \end{document} so that the problem you are describing can be reproduced. It is difficult to recreate your situation from scratch. I get this: i.stack.imgur.com/TskdH.png – user11232 Sep 10 '15 at 4:39
  • 1
    add the example into your question (make it complete but small enough to just add inline). If you have a blank line before your equation, that is th eerror, but without seeing any example, hard to guess. – David Carlisle Sep 10 '15 at 6:59

I don't see a problem with tikz-cd, other than all the hoops I had to jump through to put it into a \fbox.


{\[ 0\longrightarrow A\longrightarrow B \]}}

\setbox\tempbox=\hbox{\begin{tikzcd}[column sep=small]
{}&\overset{3}{\scriptstyle \bullet} \arrow[dl,swap,"\alpha" ]&{}\\
{} \underset{4}{\scriptstyle \bullet} &{}& \underset{2}{\scriptstyle \bullet}\arrow[ll,"\delta"]\arrow[ul,swap,"\beta"] & & \underset{1}{\scriptstyle\bullet}\arrow[ll,"\alpha"]


boxed items

I should mention that once you have something in \fbox you can set \fboxrule=0pt and adjust \fboxsep to create larger margins.

|improve this answer|||||
  • The comparison should use \fbox{\parbox{\textwidth}{\[\begin{tikzcd}...\end{tikzcd}\]}} – egreg Sep 10 '15 at 17:37
  • @egreg - It's not a comparison; two separate problems.. – John Kormylo Sep 10 '15 at 20:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.