6

A follow up to the answer of @TomBombadil on Circular Arrows and Text on Path. I am trying to tweak the text's size and/or color and the compilation gets stuck on:

(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

In particular, I tried to replace the text={#8} in the last line of the definition of the macro \arcarrow to something like \text={\large #8} but it didn't work. Any ideas?

For completeness, here is the code I try to compile:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\newcommand{\arcarrow}[8]% inner radius, middle radius, outer radius, start angle, end angle, tip protusion angle, options, text
{   \pgfmathsetmacro{\rin}{#1}
  \pgfmathsetmacro{\rmid}{#2}
  \pgfmathsetmacro{\rout}{#3}
  \pgfmathsetmacro{\astart}{#4}
  \pgfmathsetmacro{\aend}{#5}
  \pgfmathsetmacro{\atip}{#6}
  \fill[#7] (\astart:\rin) arc (\astart:\aend:\rin) -- (\aend+\atip:\rmid) -- (\aend:\rout) arc (\aend:\astart:\rout) -- (\astart+\atip:\rmid) -- cycle;
  \path[decoration={text along path, text={\large #8}, text align={align=center}, raise=-0.5ex},decorate] (\astart+\atip:\rmid) arc (\astart+\atip:\aend+\atip:\rmid);
}

\begin{document}
\begin{tikzpicture}
  \arcarrow{3}{4}{5}{10}{110}{10}{red,draw=red!20!black,very thick}{Parameterization}
  \arcarrow{3}{4}{5}{130}{230}{10}{red,draw=red!20!black,very thick}{Approximation}
  \arcarrow{3}{4}{5}{250}{350}{10}{red,draw=red!20!black,very thick}{Implementation}
\end{tikzpicture}
\end{document}
3

I found a solution like this: Use |\large|, |\Huge| , etc., for font declaration:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\tikzstyle{line node} = [font=\large ]
\newcommand{\arcarrow}[8]% inner radius, middle radius, outer radius, start angle, end angle, tip protusion angle, options, text
{   \pgfmathsetmacro{\rin}{#1}
  \pgfmathsetmacro{\rmid}{#2}
  \pgfmathsetmacro{\rout}{#3}
  \pgfmathsetmacro{\astart}{#4}
  \pgfmathsetmacro{\aend}{#5}
  \pgfmathsetmacro{\atip}{#6}
  \fill[#7] (\astart:\rin) arc (\astart:\aend:\rin) -- (\aend+\atip:\rmid) -- (\aend:\rout) arc (\aend:\astart:\rout) -- (\astart+\atip:\rmid) -- cycle;
  \path[decoration={text along path, text={|\Huge| #8}, text align={align=center}, raise=-0.5ex},decorate] (\astart+\atip:\rmid) arc (\astart+\atip:\aend+\atip:\rmid);
}

\begin{document}
\begin{tikzpicture} 
  \arcarrow{3}{4}{5}{10}{110}{10}{red,draw=red!20!black,very thick}{Parameterization}
  \arcarrow{3}{4}{5}{130}{230}{10}{red,draw=red!20!black,very thick}{Approximation}
  \arcarrow{3}{4}{5}{250}{350}{10}{red,draw=red!20!black,very thick}{Implementation}
\end{tikzpicture}
\end{document}

enter image description here

  • Seems like this is documented in the PGF's manual under /pgf/decoration/text=⟨text⟩. – Dror Apr 28 '14 at 12:32

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.