1

I woulg like get to get some way to be able to write pretty non-arrow symbols (isomorphism \cong or \simeq but also \neq or \subset and so on) in commutative diagrams.

For this pourpose I think TikZ package is the best solution. In this blog there ar some solutions, for example to \simeqsymbol: Isomorphisms in commutative diagrams in TikZ However, the result is quite ugly. Since LaTeX can achived very fine result, I am sure there is a way to be able to define these symbols.

For completeness, I write a mwe with a common diagram using TikZ.

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{stmaryrd}
\usepackage{tikz-cd}% diagramas
\usetikzlibrary{babel}
\begin{document}

\[
\begin{tikzpicture}
\matrix(m)[matrix of math nodes,
row sep=4em, column sep=4em,
text height=1.5ex, text depth=0.25ex]
{
A   &   B \\
C   &   D \\};
\path[->]
(m-1-1) edge node[auto] {$a$} (m-1-2);
\path[->]
(m-1-1) edge node[left] {$c$} (m-2-1);
\path[->]
(m-1-2) edge node[right] {$b$} (m-2-2);
\path[->]
(m-2-1) edge node[auto] {$d$} (m-2-2);
\end{tikzpicture}
\]

\end{document}

Thanks.

4
  • You mean substituting the arrow with a “long \cong” symbol? The result will never be pretty, I'm afraid.
    – egreg
    Oct 20, 2017 at 10:36
  • Yes @egreg, this is precesily what I want. "long \cong, \simeq, \noteq and so on. Whay is it not possible?
    – Dog_69
    Oct 20, 2017 at 12:25
  • It's possible, but getting it pretty isn't.
    – egreg
    Oct 20, 2017 at 12:27
  • Sorry, I understood you. I want to mean why is it not possible get pretty results.
    – Dog_69
    Oct 20, 2017 at 17:48

3 Answers 3

5

I'm not sure if this is what you want. You can use the phantom option for arrows in tikzcd, then if you include a label it will appear in the arrow position. Option sloped will make the symbol follow the direction of the "arrow".

enter image description here

\documentclass[a4paper]{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}
A\arrow[r, phantom,"\ne"]\arrow[d, phantom, sloped, "\subseteq"]  &   B\arrow[d, phantom, sloped, "\simeq"] \\
C\arrow[r, phantom,"\cong"]   &   D 
\end{tikzcd}
\]
\end{document}
4

What about something like this?

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{stmaryrd}
\usepackage{tikz-cd}% diagramas
\usetikzlibrary{babel}

\begin{document}

\begin{tikzcd}[
row sep=4em, column sep=4em]
A \ar[r, "a"{yshift=5pt}, equal, "/" marking]\ar[d, swap, "\subset" description, "c"{xshift=-3pt},]  &   B \ar[d,"\simeq" description, "b"{xshift=3pt}]\\
C \ar[r, "\cong" description, "d"{yshift=-2pt}, swap]  &   D;
\end{tikzcd}

\end{document}

enter image description here

2

Another solution with xy package.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage[all,cmtip]{xy}
 
\begin{document}
\xymatrix@R=4pc@C=4pc{ A \ar@{=}|{/}[r]^a \ar[d]_{c}|{\subset} & B 
\ar[d]^b|{\cong} \\
 C \ar[r]_d|{\cong} & D;}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .