Specifically I want the code for this diagram. I am very new to latex…Please help
3 Answers
I suggest tikz-cd for this diagram. Use arrow type - for the lines, and <-> for the bijection.
The package amsmath (probably already in your document) is needed for \DeclareMathOperator, to get proper spacing and shape of Gal.
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\DeclareMathOperator{\Gal}{Gal}
\begin{document}
Let $K/F$ be a Galois extension and set $G=\Gal(K/F)$. Denote by $E$ the subfields of $K$ containing $F$ and $H$ the subgroups of $G$. Then there is a bijection:
[
\begin{tikzcd}
K\arrow[d, -] & 1\arrow[d, -]\
E\arrow[d, -]\arrow[r, <->] & H\arrow[d, -]\
F & G
\end{tikzcd}
]
given by the correspondence
\end{document}
- 42,558
One solution is given by tikz-cd package like this example.
\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}
\[\begin{tikzcd}[column sep =-1.2]
K & & 1 \\
E \arrow[u, no head] & \leftrightarrow & H \arrow[u, no head] \\
F \arrow[u, no head] & & G \arrow[u, no head]
\end{tikzcd}\]
\end{document}
- 54,118
Without “fancy” packages and avoiding the inconsistency appearing in the image,
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Gal}{Gal}
\begin{document}
Let $K/F$ be a Galois extension and set $G=\Gal(K/F)$.
Denote by $E$ the subfields of $K$ containing $F$ and $H$
the subgroups of $G$. Then there is a bijection
[
\begin{array}{ccc}
K && 1 \
\Bigl| && \Bigl| \ \noalign{\vspace{2pt}}
E & \leftrightarrow & H \
\Bigl| && \Bigl| \ \noalign{\vspace{2pt}}
F && G
\end{array}
]
given by the correspondence
[
\begin{aligned}
E &\rightarrow {\text{elements of $G$ fixing $E$}} \
{\text{the fixed field of $H$}} &\mspace{-1mu}\leftarrow H
\end{aligned}
]
\end{document}
Note the \mspace{-1mu} that's needed to avoid the impression that the arrows are not aligned. Note also the usage of math mode inside \text to have proper italic letters, not the wrong upright ones in the image.
However, since you will be probably needing other diagrams, maybe more complex than the one above, learning the basics of tikz-cd is much better.
- 1,121,712



arrayenvironment. – Alan Munn Nov 05 '22 at 19:06