I have a tikzcd diagram
\begin{center}
\begin{tikzcd}
F \arrow[r] \arrow[d]
& * \arrow[d] \\
X \arrow[r, "f"] & Y \\
\end{tikzcd}
\end{center}
which looks like this:
I wish to add a symbol which indicates that this is a pullback square. Having looked both here and here, I have found the solution to create my own tikz-cd symbol, and insert that into the diagram.
The code for my symbol is this:
\newcommand{\foo}[1]{%
\begin{tikzpicture}[#1]%
\draw (0,0) -- (1ex,0ex);%
\draw (1ex,0ex) -- (1ex,1ex);%
\end{tikzpicture}%
}
This is basically the bottom and right hand edge of a square.
To add this symbol into the diagram, I am changing the code for the diagram to:
\begin{center}
\begin{tikzcd}
F \arrow[r] \arrow[d]
\arrow[dr, phantom, "\foo{} " , very near start, color=black]
& * \arrow[d] \\
X \arrow[r, "f"] & Y \\
\end{tikzcd}
\end{center}
As far as I know, this should be creating an invisible arrow, and putting my symbol at its head. Indeed, something does appear, but its not my what I want:
What should appear is something like this (designed in MSpaint):
Which is the same thing except the symbol with the correct symbol.
What's going wrong? Should I be approaching this in a different way?







\scalebox(please see my update)? – Bernard Aug 09 '19 at 22:44