1

I want to write this picture in LaTeX, what is the code?

enter image description here

mohammed
  • 151

4 Answers4

5

Using tikz:

enter image description here

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{amssymb}

\begin{document}

    \begin{tikzpicture}

    \node (Q1) at (0,0) {$\mathbb{Q}$};
    \node (Q2) at (2,2) {$\mathbb{Q}\Big[\sqrt{2}\Big]$};
    \node (Q3) at (0,4) {$\mathbb{Q}\Big[\sqrt[3]{2} \, ; \sqrt{2}\Big]$};
    \node (Q4) at (-2,2) {$\mathbb{Q}\Big[\sqrt[3]{2}\Big]$};

    \draw (Q1)--(Q2) node [pos=0.7, below,inner sep=0.25cm] {2};
    \draw (Q1)--(Q4) node [pos=0.7, below,inner sep=0.25cm] {3};
    \draw (Q3)--(Q4);
    \draw (Q2)--(Q3);
    \draw (Q1)--(Q3);

    \end{tikzpicture}

\end{document}
Milo
  • 9,440
4

I use instead....xy package... to draw the image of the user. I put a screenshot of my MWE.

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage[all]{xy}

\begin{document}

\[
\xymatrix@R+1.5pc@C-0.3pc{
    &\mathbb{Q}[\sqrt[3]{2};\sqrt{2}]\ar@{-}[ld]\ar@{-}[rd] \ar@{-}[dd]\\
    \mathbb{Q}[\sqrt[3]{2}] \ar@{-}[rd]_3 &&\mathbb{Q}[\sqrt{2}]\ar@{-}[ld]^2\\
    & \mathbb{Q} & 
}
\]
\end{document}

The lines are straight and is only an optical effect of the Papeeria display. enter image description here

Sebastiano
  • 54,118
  • 1
    @down-voter: What is the reason, please, of the downvote for me, Zarko and Milo? – Sebastiano Oct 21 '19 at 20:20
  • 1
    One reason could be that if you downvote three times you are harder to spot. Downvoting at the beginning of the week is dangerous since you can be identified rather easily unless you take some precautions. (Needless to say that it wasn't me.) –  Oct 21 '19 at 21:32
3

With use of the tikzcd package:

\documentclass[border=32mm]{standalone}
\usepackage{amssymb}
\usepackage{tikz-cd}

\begin{document}
    \begin{tikzcd}[row sep=huge]
    & \mathbb{Q}\Bigl[\sqrt[3]{2} \, ; \sqrt{2}\Bigr] 
      \ar[dl,-]\ar[dd,-]\ar[dr,-]     &                          \\
\mathbb{Q}\Bigl[\sqrt[3]{2}\Bigr]\ar[dr,"3" ',-]
    &                           & \mathbb{Q}\Bigl[\sqrt{2}\Bigr]
                                  \ar[dl,"2",-]               \\  
    & \mathbb{Q}                &
    \end{tikzcd}
\end{document}

enter image description here

Zarko
  • 296,517
3

With tikz-cd:

\documentclass{article}
\usepackage{tikz, tikz-cd}
\usepackage{amssymb}

\begin{document}

\begin{tikzcd}[arrows=dash, row sep=3.5em, column sep=1.5em]
& \mathbb{Q}\Bigl[\sqrt[3]{2},\sqrt{2}\Bigr] \dlar\arrow[dd] \drar\\
\mathbb{Q}\Bigl[\sqrt[3]{2}\Bigr] \drar["\textstyle 3",swap]& & \mathbb{Q}\Bigl[\sqrt{2}\Bigr]\dlar["\textstyle 2"]\\
& \mathbb{Q}
\end{tikzcd}

\end{document} 

enter image description here

Bernard
  • 271,350