2

This question is related to my previous post (the MWE can be reused from there), and the links provided there.

I'm trying to draw a (complicated) diagram using tikz-cd, including big, curved arrows, which are causing the bounding box to be too large. I tried implementing the answers to the question that my prevous post was (marked as) a duplicate of, but was unable to do so because the \path[use as bounding box] command has some unexpected behavior inside a tikz-cd environment: Only part of the diagram was affected, and not in a way that seemed logical to me, so I was not able to make much use of it.

Hence, I'm looking for one of the following:

  • A way to implement the \path[use as bounding box] command in a simple, natural way to adjust the bounding box of my (complete) diagram.

  • A different solution to adjust the bounding box inside a tikz-cd diagram.

Danu
  • 968

1 Answers1

1

Here's one way which involves using the tikzpicture environment as described in tikz-cd's manual around page 12 with TikZ's pgfinterruptboundingbox environment. It isn't very elegant, but it does work.

\documentclass[tikz, border=5pt, multi]{standalone}
\usepackage{tikz-cd,amsmath}
\begin{document}
\begin{tikzpicture}[commutative diagrams/every diagram]% page 12
  \matrix [matrix of math nodes, name=m, commutative diagrams/every cell]
  {
    & A
    & B \\
    & C
    & D\\
    E(\text{BIG THING}) & & \\
    & F(\text{BIG THING HERE, TOO})
    & \\
  };
  \begin{pgfinterruptboundingbox}
    \path [commutative diagrams/.cd, every arrow, every label]
    (m-1-2.west) .. controls +(-7,0) and +(-7,0) .. (m-4-2.west)
    ;
  \end{pgfinterruptboundingbox}
  \node (c) at (-5.5,0) {};
\end{tikzpicture}
\end{document}

interrupt the bounding box

cfr
  • 198,882