4

I am not familiar with TikZ but I need a visualisation of Galois correspondance for my paper by creating figures using TikZ. I read the manual then I got lost. However, I used TikzMaker to somehow realize what I needed but not perfectly at all.

Here is the visualisation supposed to be: enter image description here

While here is what I so far have had, and I find it too big on the page, too: enter image description here

\begin{figure}[!ht]
\centering
\resizebox{1\textwidth}{!}{%
\begin{circuitikz}
\tikzstyle{every node}=[font=\normalsize]
\draw  (6.25,11.25) circle (1.25cm) node {\normalsize $F = \mathbb{Q}$} ;
\draw  (6.25,11.25) circle (2.75cm);
\draw  (6.25,11.25) circle (4.25cm);
\node [font=\normalsize] at (6.25,13) {$E = \mathbb{Q}(\sqrt{5})$};
\node [font=\normalsize] at (6.25,14.5) {$K = \mathbb{Q}(\sqrt{5},i)$};
\draw [ -Stealth] (8.25,10.5) -- (8.25,12);
\draw [ -Stealth] (9.75,10.5) -- (9.75,12);
\end{circuitikz}
}%

\label{fig:my_label}
\end{figure}

So please help me make it smaller and the curvature of the arrow more circular. Thank you.

4
  • 3
    Welcome. // Please make it a habit to supply code, which compiles after being copied. Please try for yourself on your code snippet and kindly add the missing parts, which are mainly the packages relevant here. Thank you
    – MS-SPO
    Commented Jul 12, 2023 at 17:19
  • 2
    Welcome to TeX.SX! You don't need to use a circuitikz environment, just a tikzpicture is already good. The package circuitikz is built upon TikZ. You should use \tikzset{} and not tikzstyle, so replace \tikzstyle{every node}=[font=\normalsize] with \tikzset{every node/.append style={font=\normalsize}}. If you want to scale the whole thing, add the option scale to the \tikzset command and add a value lower than 1. Finally, for the curved arrows, I would suggest that you use an arc and polar coordinates. Commented Jul 12, 2023 at 17:31
  • 2
    a better (more descriptive) title would be: a TikZ visualisation of Galois correspondance
    – Black Mild
    Commented Jul 12, 2023 at 20:14
  • Looks like you have some MS-Word history, as many of us do have. I suggest to abandon the WYSIWYG credo of "placing the drawing exactly HERE", and adopt Latex' approach to place floating figures whereever they fit. Using references, as I show in my holistic answer, will be useful. Overall it makes work much easier, and looks more professional (well, many authors used Latex for printed books, printed publications etc.).
    – MS-SPO
    Commented Jul 13, 2023 at 7:04

5 Answers 5

9

Some hints for your diagram:

  • You use a circuitikz environment, but you don't really use any shapes or commands that are provided by the circuitikz package. So, I would suggest that you simply load the tikz package (which is loaded by the circuitikz package as well, so if you need this package, you don't need to load tikz separately), and just use a simple tikzpicture environment. You would also need to load the arrows.meta library, in order to be able to use -Stealth.

  • The command \tikzstyle should not be used any more. Instead use \tikzset. The syntax is a bit different, but the key-value pairs for the options are pretty much the same (as shown in the example below). You can add a scale option here with a value of, say, 0.75 to scale the whole diagram. If you set every node/.append style={font=\normalsize}, you don't need to set font=\normalsize to the individual nodes (or inside the node text).

  • I would center the circles around the coordinate (0,0) which enables you to use simple polar coordinates to position the nodes and draw the curved arrows. Polar coordinates take an angle at the fist position (zero being eastward) and a distance from the origin at the second position, both positions being separated by a colon (:).

  • Use the newer syntax for circle: circle[radius=1.25] instead of circle (1.25cm). You can omit cm, since the default unit in TikZ is 1cm anyways.

  • To draw the curved arrows, use an arc as shown in the below example.


\documentclass[border=10pt]{standalone}
\usepackage{tikz, amsfonts}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}
\tikzset{every node/.append style={font=\normalsize}, scale=0.75}
\draw (0,0) circle[radius=1.25] node {$F = \mathbb{Q}$};
\draw (0,0) circle[radius=2.75cm];
\draw (0,0) circle[radius=4.25cm];
\node at (90:1.75) {$E = \mathbb{Q}(\sqrt{5})$};
\node at (90:3.25) {$K = \mathbb{Q}(\sqrt{5},i)$};
\draw[-Stealth] (-45:2) arc[start angle=-45, end angle=0, radius=2];
\draw[-Stealth] (-45:3.5) arc[start angle=-45, end angle=0, radius=3.5];
\end{tikzpicture}
\end{document}

enter image description here

0
6

It can be draw in simple way: the left part is just 3 concentric circles with some nodes for labelling, and arrow arcs; the right part is just nodes linked by arrows, and all are shifted to the right. The scale allows you control the size

enter image description here

\documentclass{article}
\usepackage[margin=3cm]{geometry}
\usepackage{amssymb,amsmath}
\usepackage{lipsum}   % >>> for dummy texts
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\lipsum[1]
\begin{center}  
\begin{tikzpicture}[>={Straight Barb[angle=60:5pt 2]}] 
% change the scale as desired
\begin{scope}[scale=1.2] % the left part
\draw[thick] 
(0,0) circle(1) node{$F=\mathbb{Q}$}
(0,0) circle(2) +(90:1.5) node{$E=\mathbb{Q}(\sqrt{5})$}    
(0,0) circle(3) +(90:2.5) node{$K=\mathbb{Q}(\sqrt{5},i)$}
;
\draw[->,gray] (-45:1.5) arc(-45:45:1.5);
\draw[->,gray] (-45:2.5) arc(-45:45:2.5);
\end{scope}

\begin{scope}[shift={(5.5,0)}] % the right part
\path
(0,0)   node (F) {$F$} +(3.5,0) node (KF) {$\rm{Gal}(K/F)$}
(0,1.5) node (E) {$E$} +(3.5,0) node (KE) {$\rm{Gal}(K/K)$}
(0,3)   node (K) {$K$} +(3.5,0) node (KK) {$\rm{Gal}(K/K)$}
; 
\draw[->] (F)--(E);
\draw[->] (E)--(K);
\draw[->] (KK)--(KE);
\draw[->] (KE)--(KF);
\draw[dashed] (F)--(KF) (E)--(KE) (K)--(KK);
\end{scope}
\end{tikzpicture}
\end{center}
\lipsum[5]
\end{document}
4

Same approach as from Jasper, i.e. doing the minimum, with some differences.

I find it always a good idea to start with a standalone class for drawings. You can modify the class, copy the code or do similar things later.

To assist your learning process I suggest doing the following, perhaps repeating a few times to master this powerful tool:

  • study at least one of the examples in part 1 of the manual, i.e. the tutorials
  • in parallel look up all tikz-statements, e.g. from my code below (use the search function)

result

\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}% for the arrows in first diagram
\usetikzlibrary{positioning}% for the mapping diagram
\usepackage{amssymb}

\begin{document}
 \begin{tikzpicture}[
    execute at begin node=$,
    execute at end node=$,% this way you can omit the $..$
    > = {stealth}]
    % ~~~ circles ~~~~~~~~~~~~~~
    \draw (0,0) circle(1.25);
    \draw (0,0) circle(2.75);
    \draw (0,0) circle(4.25);
    
    % ~~~ Text / nodes ~~~~~~
    \node at (0,0)      {F = \mathbb{Q}};
    \node at (0,1.8)    {E = \mathbb{Q}(\sqrt{5})};
    \node at (0,3.5)    {K = \mathbb{Q}(\sqrt{5},i)};
    
    % ~~~+ arcs ~~~~~~~~~~~~~~~~
    % [->] draws a line with an arrow, while [gray] and [dotted] indicate ideas for you
    \draw [->,gray] (-45:1.8) arc[start angle=-45,end angle=0,radius=1.8];
    \draw [->,dotted] (-45:3.5) arc[start angle=-45,end angle=0,radius=3.5];
 \end{tikzpicture}
 
 \begin{tikzpicture}[> = {Stealth}]
    % ~~~ nodes ~~~~
     \node              (K)  {K};% node's name is K, to be referenced later
     \node[below=of K]  (E)  {E};
     \node[below=of E]  (F)  {F};
     
     \node[right=of K]  (GK) {Gal(K/K)};
     \node[right=of E]  (GE) {Gal(K/E)};
     \node[right=of F]  (GF) {Gal(K/F)};
     
     % ~~~ lines ~~~~~~~~~~~
    \draw[dashed] (K) -- (GK);% () means: recall positions of nodes named K, GK etc.
    \draw[dashed] (E) -- (GE);   
    \draw[dashed] (F) -- (GF);   
     
    \draw[->] (F) -- (E);
    \draw[->] (E) -- (K);
    
    \draw[->] (GK) -- (GE);
    \draw[->] (GE) -- (GF);
 \end{tikzpicture}

\end{document}
0

So far answers focused on several ways to draw your diagrams with tikz. This answer will focus on a more holistic approach to create and maintain your document to address the question shown, but not verbally asked. Again, this is just one way to do it.

This is what we want to achieve in the end: intended result

1) Have 1 file for each tikz-drawing

Pick any of the previous solutions, e.g. mine. Create and run/compile circles.tex:

\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}% for the arrows in first diagram
\usepackage{amssymb}

\begin{document}
 \begin{tikzpicture}[
    execute at begin node=$,
    execute at end node=$,% this way you can omit the $..$
    > = {stealth}]
    % ~~~ circles ~~~~~~~~~~~~~~
    \draw (0,0) circle(1.25);
    \draw (0,0) circle(2.75);
    \draw (0,0) circle(4.25);
    
    % ~~~ Text / nodes ~~~~~~
    \node at (0,0)      {F = \mathbb{Q}};
    \node at (0,1.8)    {E = \mathbb{Q}(\sqrt{5})};
    \node at (0,3.5)    {K = \mathbb{Q}(\sqrt{5},i)};
    
    % ~~~+ arcs ~~~~~~~~~~~~~~~~
    % [->] draws a line with an arrow, while [gray] and [dotted] indicate ideas for you
    \draw [->,gray] (-45:1.8) arc[start angle=-45,end angle=0,radius=1.8];
    \draw [->,dotted] (-45:3.5) arc[start angle=-45,end angle=0,radius=3.5];
 \end{tikzpicture}
\end{document}

circles

Create and run map.tex:

\documentclass[10pt,border=3mm,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}% for the arrows
\usetikzlibrary{positioning}% for the mapping diagram
%\usepackage{amssymb}% not needed here

\begin{document}
 \begin{tikzpicture}[> = {Stealth}]
    % ~~~ nodes ~~~~
     \node              (K)  {K};% node's name is K, to be referenced later
     \node[below=of K]  (E)  {E};
     \node[below=of E]  (F)  {F};
     
     \node[right=of K]  (GK) {Gal(K/K)};
     \node[right=of E]  (GE) {Gal(K/E)};
     \node[right=of F]  (GF) {Gal(K/F)};
     
     % ~~~ lines ~~~~~~~~~~~
    \draw[dashed] (K) -- (GK);% () means: recall positions of nodes named K, GK etc.
    \draw[dashed] (E) -- (GE);   
    \draw[dashed] (F) -- (GF);   
     
    \draw[->] (F) -- (E);
    \draw[->] (E) -- (K);
    
    \draw[->] (GK) -- (GE);
    \draw[->] (GE) -- (GF);
 
 \end{tikzpicture}
\end{document}

map

A few remarks:

  • you'll have circles.pdf and map.pdf
  • kindly notice the standalone class
  • kindly notice the variations in packages used, as needed per drawing

2) Include these .pdf's in your main document

Create your main document, say mathDoc.tex as given below. Once you compile it, you'll have the intended result. Remarks after the code.

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}%  to include the tikz-drawings as pdf
\usepackage{subfigure}% to have subfigures

\usepackage{lipsum}%    blindtext
\usepackage{varioref}%  nice referencing; requires 2 compile cycles, too

% ~~~ some shorthand notation ~~~~
\newcommand\myfig[1]{figure \vref{fig:#1}}% referencing figures

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{document}
\lipsum[1]% some blindtext

See \myfig{demo} for more details.

 \begin{figure}[h]% tries to put figure "here"
    \centering
    \subfigure[Circles]{\includegraphics[width=.65\textwidth]{circles}}
    \subfigure[Map]{\includegraphics[width=.25\textwidth]{map}}
    \caption{The intended diagrams\label{fig:demo}}
 \end{figure}

\lipsum[2]% some blindtext

\end{document}

Kindly notice:

  • the different documentclass used
  • the packages used, only relevant for mathDoc.tex
  • the 2 subfigures
  • including the pdf's from above tikz.drawings
  • adaptation of graphics-width via \includegraphics[width=.65\textwidth]{..}

Impact on your workflow

Now you can create and adjust tikz-drawings and have them decoupled from your main document. I.e. edit and compile each tikz-diagram as long and often as you need. Finally run the main document to include the results.

Vice versa you can focus on the flow of content in your main document first and create missing tikz drawings later.

The layout burden

As you can see you encounter what every graphic designer has to deal with when doing the layout, say for a newspaper. Space is limited. So wrt drawings they'll specify at least available space: "fit your foto or drawing within x-y cm^2, while I don't care how you do it: just have it readable".

So you may need to work a bit back and forth between the diagrams width-specification and their tikz-code, to have good readability.

Improving organization

To avoid too much clutter of your main directory, you may want to work with folders, say /tikz which will provide all your tikz-drawing.

All you then need to do is telling Latex where to find your includes, like so:

\includegraphics[width=.65\textwidth]{tikz/circles}
0

In TikzMaker it is a slider for scaling the figure. It is found under figure settings on the left.enter image description here

2
  • This may only answer one part of the question. But it is not really clear by this image, if it even solves the scaling problem in the question, if we don't see the resulting code.
    – dexteritas
    Commented Aug 29, 2023 at 12:25
  • OP is using link, an online Tikz editor, in figure settings the slider shown above effects the size of the figure, for example \Resizebox{0.5\Textwidth}{!}{%.... @dexteritas Commented Aug 30, 2023 at 14:51

You must log in to answer this question.

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