0

I'm trying to recreate the following diagram:

enter image description here

Thanks in advance!

Infimum
  • 43

3 Answers3

5

A matrix works

\documentclass{article}
\usepackage{amsmath}
\begin{document}

$\begin{matrix} N&\subset&M \ \cup&&\cup \ Q&\subset&P \end{matrix}$

\end{document}

output

plante
  • 1,349
2

A very short code with pstricks:

     \documentclass[a4paper,11pt, pdf]{article}
\usepackage{pst-node}

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

\pagestyle{empty}

\begin{document}

\[ \begin{psmatrix}[rowsep = 0.1, colsep = 0.3]
N & \subset & M \\
\rput{*90}{\subset} & & \rput{*90}{\subset} \\[1ex]
Q & \subset & P
\end{psmatrix} \]

\end{document} 

enter image description here

Bernard
  • 271,350
1

You can use matrix for a naïve solution, but you should realize that \subset and \cup are generally not the same symbol with a rotation.

I suggest to rotate \subset, but also to modify the vertical spacing.

A different solution uses tikz-cd; I show also how to change the spacing in a simpler way.

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx} % for the first solution
\usepackage{tikz-cd} % for the second solution

% for the second solution, see https://tex.stackexchange.com/a/216042/4427 \tikzset{ symbol/.style={ draw=none, every to/.append style={ edge node={node [sloped, allow upside down, auto=false]{$#1$}}} } }

\begin{document}

[ \renewcommand{\arraystretch}{0} \begin{matrix} N & \subset & M \[2ex] \rotatebox[origin=c]{90}{$\subset$} && \rotatebox[origin=c]{90}{$\subset$} \[2.5ex] Q & \subset & P \end{matrix} ]

[ \begin{tikzcd} N \arrow[r,symbol=\subset] & M \ Q \arrow[r,symbol=\subset] \arrow[u,symbol=\subset] & P \arrow[u,symbol=\subset] \end{tikzcd} ]

[ \begin{tikzcd}[row sep=1em,column sep=1em] N \arrow[r,symbol=\subset] & M \ Q \arrow[r,symbol=\subset] \arrow[u,symbol=\subset] & P \arrow[u,symbol=\subset] \end{tikzcd} ]

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks! I am happy there is an answer that includes spacing. I was also concerned about \cup vs. \subset. When you say "generally not the same", does that mean there are situations where they are the same? – Infimum Jul 31 '22 at 22:06
  • @Infimum That depends on the font used for math symbols. – egreg Aug 01 '22 at 07:59