Commutative function diagrams in LaTeX

Click For Summary

Discussion Overview

The discussion revolves around creating commutative function diagrams in LaTeX, with a focus on using TikZ and alternative methods. Participants explore various formatting options and seek solutions for diagram representation, including rectangular and triangular layouts.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant, Dan, expresses a desire to create commutative diagrams without using arrays and asks about triangular diagrams.
  • Another participant shares a solution using aligned environments but notes it is not the best solution.
  • Dan acknowledges the utility of a specific formatting technique involving the symbol χ and seeks clarification on its placement relative to arrows.
  • There is a suggestion that using TikZ might be the best approach, with a recommendation to use WYSIWYG TeX editors or online platforms like Overleaf.
  • Dan mentions financial constraints affecting his ability to use certain tools but shares his experience with free editors and coding directly in LaTeX.
  • Dan describes a low-budget setup involving TeXStudio and a screenshot editing method for creating images of diagrams.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for creating commutative diagrams, with multiple approaches and tools being discussed. Some participants express preferences for TikZ, while others explore alternative methods.

Contextual Notes

There are limitations regarding the clarity of diagram representation and the effectiveness of different LaTeX environments. The discussion reflects varying levels of familiarity with LaTeX and available tools.

Who May Find This Useful

Individuals interested in creating diagrams in LaTeX, particularly those looking for alternatives to TikZ or seeking budget-friendly solutions for diagramming in mathematical contexts.

topsquark
Science Advisor
Homework Helper
Insights Author
MHB
Messages
2,020
Reaction score
843
TL;DR
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
 
Physics news on Phys.org
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}
 
  • Like
Likes   Reactions: topsquark
fresh_42 said:
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
 
topsquark said:
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.
 
  • Like
Likes   Reactions: topsquark
Ever since I taught in High School I've gotten my left and right screwed up!

Thanks!

-Dan
 
  • Haha
Likes   Reactions: fresh_42
topsquark said:
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/
 
  • Like
Likes   Reactions: topsquark
pbuk said:
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
 
topsquark said:
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:
  • Like
Likes   Reactions: topsquark

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K