3

I have coded the orange picture and the text below it in separate codes. How can I put them together in a single code to move and re-size together? (pictures have been re-scaled in the attachment.)

\documentclass[6pt,border=1mm]{standalone}
\usepackage{tikz, pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
\begin{tikzpicture}
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\end{scope}
\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\draw [path picture={ \node at (path picture bounding box.center)
{\includegraphics[height=5cm, width=5cm]{photo}};}] (0,0) circle (2);
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center}, 
text=This is some random text}}] (0,0) circle (2cm);
\end{frame}  
\end{tikzpicture}
\end{document}

photo enter image description here

1
  • 1
    Thanks to your question (and your code), I have just understood how to attach an external photo to the tex code on tex.stackexchange.com. Thank you very much! Besides, you draw very well! – AndréC Oct 28 '18 at 17:00
4

I have no idea what the purpose of the frame here is, but otherwise I think you're almost there. (Note also that photo has a different content on my machine. ;-)

\documentclass[6pt,border=1mm]{standalone}
\usepackage{tikz, pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
%\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\begin{tikzpicture}
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\clip (vecbox.center) circle(2);
\node at (vecbox.center)  {\includegraphics[height=5cm, width=5cm]{photo}};
\end{scope}
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center}, 
text=This is some random text}}] (vecbox.center) circle (2cm);
\end{tikzpicture}
%\end{frame}  
\end{document}

enter image description here

This can be transformed at will.

\documentclass[tikz,6pt,border=1mm]{standalone}
\usepackage{pgfornament, tikzrput}
\usetikzlibrary{decorations, decorations.text}
\usepackage{bookman}
\begin{document}
%\begin{frame}{Theorems, Definitions, Corollaries, etc.}
\foreach \X in {0,10,...,360}
{\pgfmathsetmacro{\SF}{0.75+0.25*cos(\X)}
\begin{tikzpicture}
\path[use as bounding box] (-3,-3) rectangle (3,3);
\begin{scope}[scale=\SF,transform shape]
\begin{scope}[color=red,
                every node/.style={inner sep=0pt}]
\node[minimum size=6cm](vecbox){}; 
\node[anchor=north west] at (vecbox.north west)
  {\pgfornament[width=1cm]{61}};
\node[anchor=north east] at (vecbox.north east)
  {\pgfornament[width=1cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
  {\pgfornament[width=1cm, symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
  {\pgfornament[width=1cm,symmetry=c]{61}};
\clip (vecbox.center) circle(2);
\node at (vecbox.center)  {\includegraphics[height=5cm, width=5cm]{photo}};
\end{scope}
\draw[color=blue, rotate=90, yshift=0cm,  xshift=0cm, postaction={decorate, 
decoration={text along path, raise=-10pt, text align={align=center},
text=This is some random text}}] (vecbox.center) circle (2cm);
\end{scope}
\end{tikzpicture}}
%\end{frame}  
\end{document}

enter image description here

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.