TransWikia.com

Dedicated method of enumerating above minipages

TeX - LaTeX Asked on November 9, 2020

I want to enumerate a set of tikzpictures with the label being above and in the center of each picture. I would like to do it with an enumerate environment and not to have to insert each label manually.

The first set of pictures is what I do manually and the second set is a not-so-good enumeration.
enter image description here

MWE:

documentclass[12pt]{article}
usepackage{tikz}
usepackage{tkz-euclide}
usepackage{float}
usepackage{multicol}
usepackage{enumitem}
usepackage{caption}
captionsetup[figure]{labelformat=empty}
usepackage[cm]{fullpage}
begin{document}    
        begin{figure}[H]
            begin{minipage}[t]{0.3textwidth  }
                caption{(1)}
                centering
                begin{tikzpicture}             
                tkzDefPoint(0,0){A}        
                tkzDrawCircle[R](A,1.2 cm)                         
                end{tikzpicture}
            end{minipage}
            qquad
            begin{minipage}[t]{0.3textwidth  }
                caption{(2)}
                centering
                begin{tikzpicture}[scale=0.92]
                    tkzDefPoint(0,0){A}        
                    tkzDrawCircle[R](A,1.2 cm)             
                end{tikzpicture}
            end{minipage}
            qquad
            begin{minipage}[t]{0.3textwidth  }
                caption{(3)}   
                centering
                begin{tikzpicture}
                    tkzDefPoint(0,0){A}        
                    tkzDrawCircle[R](A,1.2 cm)         
                end{tikzpicture}
            end{minipage}          
        end{figure}         
        
        
        
        begin{multicols}{3}
            begin{enumerate}
                item 
                begin{minipage}{0.3textwidth  }
                    begin{tikzpicture}
                        tkzDefPoint(0,0){A}        
                        tkzDrawCircle[R](A,1.2 cm)         
                    end{tikzpicture}
                end{minipage}
                item 
                begin{minipage}{0.3textwidth  }
                    begin{tikzpicture}
                        tkzDefPoint(0,0){A}        
                        tkzDrawCircle[R](A,1.2 cm)         
                    end{tikzpicture}
                end{minipage}
                item 
                begin{minipage}{0.3textwidth  }
                    begin{tikzpicture}
                        tkzDefPoint(0,0){A}        
                        tkzDrawCircle[R](A,1.2 cm)         
                    end{tikzpicture}
                end{minipage}
            end{enumerate}             
        end{multicols}
    
end{document}

One Answer

With the help of the subcaption package:

documentclass[12pt]{article}
usepackage{tikz}
usepackage{tkz-euclide}
usepackage{caption}
captionsetup[figure]{labelformat=empty}
usepackage[cm]{fullpage}
usepackage{subcaption}
renewcommandthesubfigure{arabic{subfigure}}
begin{document}    
        begin{figure}
            begin{subfigure}[t]{0.3textwidth}
                caption{}
                centering
                begin{tikzpicture}             
                tkzDefPoint(0,0){A}        
                tkzDrawCircle[R](A,1.2 cm)                         
                end{tikzpicture}
            end{subfigure}
            qquad
            begin{subfigure}[t]{0.3textwidth}
                caption{}
                centering
                begin{tikzpicture}[scale=0.92]
                    tkzDefPoint(0,0){A}        
                    tkzDrawCircle[R](A,1.2 cm)             
                end{tikzpicture}
            end{subfigure}
            qquad
            begin{subfigure}[t]{0.3textwidth}
                caption{}   
                centering
                begin{tikzpicture}
                    tkzDefPoint(0,0){A}        
                    tkzDrawCircle[R](A,1.2 cm)         
                end{tikzpicture}
            end{subfigure}          
        end{figure}     
end{document}

enter image description here

Correct answer by leandriis on November 9, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP