# How to write inclusion symbols diagonally?

I have two sequences of inclusions, say $A \subset B \subset C$ and $A \subset D \subset C$, and I want to combine these into one sequence. I don't know how to explain this very well, but the combined sequence should look like "a diamond" of inclusions. How can I do this in LaTeX?

EDIT: What I have in mind is something like this:

-
Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – mvkorpel Jul 15 '14 at 9:39
Ok, sorry, it's my first time here! Anyway, I'm looking for some code that would allow me to write the "diamond" of inclusions I was describing above. – user59115 Jul 15 '14 at 9:41
Can you make a hand-drawn of what you want and post it here? – Pouya Jul 15 '14 at 9:47
see the new edit – user59115 Jul 15 '14 at 10:17

For example (some spacing correction may be needed):

\documentclass{article}
\usepackage{graphicx}

\begin{document}

$\rotatebox{45}{ \begin{array}{ccc} \rotatebox{-45}{A} & \subseteq & \rotatebox{-45}{B} \\ \rotatebox{-90}{\subseteq}& &\rotatebox{-90}{\subseteq}\\[9pt] \rotatebox{-45}{C} & \subseteq &\rotatebox{-45}{ D} \end{array} }$

\end{document}

-
Thanks! That's exactly what I had in mind – user59115 Jul 15 '14 at 10:54

Maybe too many features, but whenever it's possible to simplify input, it's better doing it.

\documentclass{article}
\usepackage{amsmath,graphicx,xparse}

\NewDocumentCommand{\diamondinclusion}{m >{\SplitArgument{1}{\\}}m m}
{%
\dodiamondinclusion{#1}#2{#3}%
}
\NewDocumentCommand{\dodiamondinclusion}{mmmm}
{%
\begingroup
\setlength{\arraycolsep}{0pt}%
\renewcommand{\arraystretch}{-2}%
\begin{matrix}
&& #2 \\
& \rsubseteq{45} && \rsubseteq{-45} \\
#1 &&&& #4 \\
& \rsubseteq{-45} && \rsubseteq{45} \\
&& #3
\end{matrix}%
\endgroup
}
\NewDocumentCommand{\rsubseteq}{m}
{%
\rotatebox[origin=c]{#1}{$\subseteq$}%
}

\begin{document}
$\diamondinclusion{A}{B\\C}{D}$
\end{document}

Just modify the definition of \dodiamondinc if you need changes.

-

A solution that uses pstricks and the psmatrix environment from pst-node. It is compilable with pdflatex if you set the --enable-write18 (MiKTeX) or --shell-escape (TeXLive, MacTeX).

\documentclass[a4paper,11pt, pdf]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}%
\usepackage{lmodern}

\usepackage{pst-node}

\newpsobject{ncemptyline}{ncline}{linestyle=none}
\newcommand*\ncsubset[2]{\ncemptyline{#1}{#2}\ncput[nrot=:U, npos=0.45]{\subset}}

\pagestyle{empty}

\begin{document}

$\begin{psmatrix}[rowsep=0.4, colsep=0.5] & [name = C] C \\ [name = B] B & & [name = D] D \\ & [name = A] A \\ \ncsubset{A}{B}\ncsubset{A}{D} \ncsubset{B}{C}\ncsubset{D}{C} \end{psmatrix}$

\end{document}

-

\documentclass[tikz]{standalone}
\usetikzlibrary{calc}

\newcommand{\rotsym}[1]{%
\rotatebox{#1}{$\subseteq$}%
}

\begin{document}

\begin{tikzpicture}
\node (a) at (0,0) {A};
\node (b) at (.75,.75) {B};
\node (c) at (1.5,0) {C};
\node (d) at (.75,-.75) {D};
%% TikZ documentation section 13.5.3:
\node at ($(a)!0.5!(b)$) {\rotsym{45}};
\node at ($(b)!0.5!(c)$) {\rotsym{315}};
\node at ($(c)!0.5!(d)$) {\rotsym{45}};
\node at ($(d)!0.5!(a)$) {\rotsym{315}};
\end{tikzpicture}

\end{document}

There may be more compact ways of doing this, but I like the clarity and editability of this. YMMV.

-