4

I want to have the following layout: enter image description here

What I have is the following code:

\documentclass[12pt,a4paper,final,twocolumn]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usepackage{fontspec}
\usepackage{graphics}
\usetikzlibrary{shapes,snakes}
\usepackage{pgf}

\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}

\setmainfont{Source Sans Pro}
\setsansfont{Source Sans Pro}

\begin{document}

    \begin{tikzpicture}
        \draw (2,2) circle (2.5cm);
        \node[inner sep=0pt] (myfirstpic) at (2,2.6) {\includegraphics[width=.09\textwidth]{info.png}};
        \node at (2,1) {{\LARGE Andreas}};
    \end{tikzpicture}



\end{document}

This is working, but sometimes I don't know what contents are placed inside the circle. I'd like to know if there is a simpler or cleaner way of doing this.

5
\documentclass[12pt,a4paper,final,twocolumn]{article}
\usepackage[margin=2.00cm]{geometry}

\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}
    \begin{tikzpicture}
\node[inner sep=0pt,above] (n1) {\includegraphics[width=.09\textwidth]{example-image-duck}};
\node [font=\LARGE,below] (n2) {Andreas};
\node [draw, circle, minimum size=5cm, fit= (n1) (n2)] {};
    \end{tikzpicture}
\end{document}

Size of circle is determined by `minimum size which is equal to diameter of circle.

enter image description here

Addendum: A simpler solution without use of fit libraries:

\documentclass[12pt,a4paper,final,twocolumn]{article}
\usepackage[margin=2.00cm]{geometry}

\usepackage{graphicx}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[node distance=1mm]
\node[inner sep=0pt,above] (n1) {\includegraphics[width=.09\textwidth]{example-image-duck}};
\node [font=\LARGE, below] (n2) {Andreas};
\draw(0,0) circle[radius=2.5cm];
    \end{tikzpicture}
\end{document}

Result is the same as above, width of circle is now determined with radius of circle

  • This is working fine. Can I set the circle to a fixed width as well? – AndiLeni Sep 6 at 14:36
  • @AndiLeni, circle has width defined with minimum size=5cm. Now i add even simpler solution. – Zarko Sep 6 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.