Commutative function diagrams in LaTeX

In summary, this person downloaded and used a free editor to write the code, and then took a screenshot and edited it in another program.f
  • #1

topsquark

Science Advisor
Insights Author
Gold Member
MHB
1,952
983
TL;DR Summary
How can I make this diagram a bit nicer? And is there any way to do a triangular diagram?
I know that TikZ is probably the best way to do this but most Forums don't use it. I can make a rectangular diagram, but it's a bit clunky:
Say I have the commutative function diagram:
##\begin{array}{ccccc} ~ & ~ & f & ~ & ~ \\ ~ & A & \longrightarrow & B & ~ \\ g & \downarrow & ~ & \downarrow & h \\ ~ & C & \longrightarrow & D & ~ \\ ~ & ~ & k & ~ & ~ \end{array}##

It isn't bad but is there a way to do this without using an array? And is there any way to do a triangular diagram? ie. A to B, A to C, and B to C?

Thanks!

-Dan
 
  • #2
I managed to get this, but it was certainly not the best solution.

\begin{aligned}
\mathbb{C}^2 &\;\quad \stackrel{\operatorname{M}_g}{\longrightarrow} &\mathbb{C}^2\\
\downarrow{\chi}&&\downarrow{\chi}\\
\mathbb{R}^3 &\;\quad \stackrel{\operatorname{Ad} g}{\longrightarrow} &\mathbb{R}^3
\end{aligned}

\begin{aligned}
\mathbb{C}^2 &\;\quad \stackrel{\operatorname{M}_g}{\longrightarrow} &\mathbb{C}^2\\
\downarrow{\chi}&&\downarrow{\chi}\\
\mathbb{R}^3 &\;\quad \stackrel{\operatorname{Ad} g}{\longrightarrow} &\mathbb{R}^3
\end{aligned}
 
  • #3
I managed to get this, but it was certainly not the best solution.

\begin{aligned}
\mathbb{C}^2 &\;\quad \stackrel{\operatorname{M}_g}{\longrightarrow} &\mathbb{C}^2\\
\downarrow{\chi}&&\downarrow{\chi}\\
\mathbb{R}^3 &\;\quad \stackrel{\operatorname{Ad} g}{\longrightarrow} &\mathbb{R}^3
\end{aligned}

\begin{aligned}
\mathbb{C}^2 &\;\quad \stackrel{\operatorname{M}_g}{\longrightarrow} &\mathbb{C}^2\\
\downarrow{\chi}&&\downarrow{\chi}\\
\mathbb{R}^3 &\;\quad \stackrel{\operatorname{Ad} g}{\longrightarrow} &\mathbb{R}^3
\end{aligned}
\downarrow{\chi} helps. I didn't know you could do that. Thanks!

Is there a way to put a ##\chi## to the right of the arrow, too?

-Dan
 
  • #4
Is there a way to put a χ to the right of the arrow, too?
Isn't it already to the right?
But ##{\chi}\downarrow ## ##{\chi} \downarrow ## works, too.
 
  • #5
Ever since I taught in High School I've gotten my left and right screwed up!

Thanks!

-Dan
 
  • #6
I know that TikZ is probably the best way to do this
Then do it in TikZ in a WYSIWYG ## TeX ## editor and paste an image: if you don't have a ## TeX ## editor installed then use the online editor Overleaf: https://www.overleaf.com/
 
  • #7
Then do it in TikZ in a WYSIWYG ## TeX ## editor and paste an image: if you don't have a ## TeX ## editor installed then use the online editor Overleaf: https://www.overleaf.com/
Well, as it happens, I have no money. But anyways, there are free editors out there. Actually, once I got the feel of the code it was easier to simply type it out rather than use the editor.
tikzit_image0.png


Thanks!

-Dan
 
  • #8
Well, as it happens, I have no money. But anyways, there are free editors out there. Actually, once I got the feel of the code it was easier to simply type it out rather than use the editor.
View attachment 314144

Thanks!

-Dan

I downloaded TeXStudio (https://texstudio.org/) which is perfect (and included tikz), especially in combination with AHK (https://www.autohotkey.com/download/) saves a lot of typing time.

To get an image, I take a screenshot and edit it with mspaint.exe.

This is really a low-budget scenario. I wrote a lot in this set-up.
 
Last edited:

Suggested for: Commutative function diagrams in LaTeX

Replies
3
Views
1K
Replies
4
Views
452
Replies
1
Views
1K
Replies
2
Views
313
Replies
8
Views
782
Replies
3
Views
571
Replies
1
Views
979
Replies
7
Views
707
Replies
1
Views
561
Replies
10
Views
1K
Back
Top