# How do I type a \subset but facing upward?

I am trying to draw a commutative diagram using tikz-cd. I have two sets A,B, placed in an up-down manner. Now I want to typeset $A\subset B$, but given their relative positions the \subset notation must face upward. How can I do that?

p.s. It does matter whether the notation appears as an arrow object or an entry.

My program is something like this

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd} B\ar[rdd]&\\ \subset&\\ A\ar[r,hook]&C\\ \end{tikzcd}$
\end{document}


And what I am trying to achieve is to make the \subset face upward.

• Could you please add a small complete document that shows your diagram? – Marijn Sep 21 '19 at 8:47
• Take a look here: tex.stackexchange.com/questions/184576/… – pdanese Sep 21 '19 at 8:57
• @Marjin I've updated my question. – trisct Sep 21 '19 at 9:07
• You add only code fragment. You were asked for complete document, which we can test as it is (missed are document preamble, etc ... – Zarko Sep 21 '19 at 9:50
• @Marjin Thanks for the comment. I didn't have a computer with me at the time and I had to post the code with my cellphone. Will pay more attetion next time. – trisct Sep 21 '19 at 16:15

Borrowing Larifari's code from https://tex.stackexchange.com/a/280775/4427

\documentclass{article}
\usepackage{tikz-cd}

\tikzset{%
symbol/.style={
draw=none,
every to/.append style={
edge node={node [sloped, allow upside down, auto=false]{$#1$}}
},
},
}

\begin{document}

$\begin{tikzcd} B\arrow[rd] \\ A\arrow[r,hook] \arrow[u,symbol=\subset] & C \end{tikzcd}$

\end{document}


Note that the package is tikz-cd, but the environment is tikzcd.

it is not very clear what you like to obtain. something like this?

\documentclass[margin=3mm]{standalone}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}  % <---
B\ar[rdd]   &       \\
\cup       &       \\ % <---
A\ar[r,hook]&   C
\end{tikzcd}
\end{document}


Addendum: Maybe you like the following solution:

\documentclass[margin=3mm]{standalone}
\usepackage{graphicx}
\newcommand\rot[1]{\rotatebox[origin=c]{270}{#1}}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}[row sep=-3pt]
\rot{B}\ar[rdd]   &       \\
\cup       &       \\
\rot{A}\ar[r,hook]&   C
\end{tikzcd}
\end{document}

• Yeah, something like this. I gotta say this is an interesting suggestion. Although, it would be better if there is a way to do this for other notations as well. – trisct Sep 21 '19 at 10:47

Is it possibile to realize your commutative diagram also with xy package. With the option cmtip you have the same style of the arrows of tikz-cd. Here there is a MWE with the relative image.

\documentclass[a4paper,12pt]{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\xymatrix@R=.5pc@C=3pc{B \ar[ddr]&\\
\cup &\\
A \ar@{^{(}->}[r]& C
}
\end{document}

• I would...but the hook arrow in xymatrix is too ugly. – trisct Sep 23 '19 at 3:38