3

I need to construct an arc depending on a variable. Some lines of the code work some do not. Any ideas?

\documentclass[tikz]{standalone}
\begin{document}

\def\BLS{\baselineskip}

\begin{tikzpicture}

% works
\draw[->] (0,0) arc (-90:90:.5*\BLS) ;

% works
\draw[->] (0,0) arc (-90:90:\BLS{} and 2cm) ;

% don't work
\draw[->] (0,0) arc (-90:90:.5*\BLS{} and 2cm) ;

% don't work
\draw[->] (0,0) arc (-90:90:.5*\BLS and \BLS) ;

\end{tikzpicture}

\end{document}  
3

use

\draw[->] (0,0) arc (-90:90:{.5*\BLS} and 2cm);   
\draw[->] (0,0) arc (-90:90:{.5*\BLS} and \BLS);
2

Or use:

\draw[->] (0,0) arc (-90:90:\BLS{}/2 and 2cm) ;
\draw[->] (0,0) arc (-90:90:\BLS/2 and \BLS) ;
2

Just another way:

\draw[->] (0,0) arc (-90:90:\dimexpr.5\BLS\relax\space and 2cm) ;
1
  • The extra keystrokes are not deliberately added. Apr 28 '14 at 19:24

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.