TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}  
share|improve this question
up vote 3 down vote accepted

use

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

Or use:

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

Just another way:

\draw[->] (0,0) arc (-90:90:\dimexpr.5\BLS\relax\space and 2cm) ;
share|improve this answer
    
The extra keystrokes are not deliberately added. – kiss my armpit Apr 28 '14 at 19:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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