Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Another Minimal Non-Working Example...

\documentclass{article}
\usepackage{tikz}
\begin{document}
\newlength\mylength
\setlength\mylength{20pt}
\newcommand*\mypoint{\mylength,20pt}
\begin{tikzpicture}
    \draw (0pt,0pt) to [in=down] (\mypoint);
\end{tikzpicture}
\end{document}

Everything is fine without the [in=down] modifier. Assistance welcome! I need a fix that retains the general structure; this is a simplification of a real situation in which I have hundreds of these to [in=down] (\mypoint) line segments in my draw command, where \mypoint is a different macro in each case, and it's not feasible to create a new node for every call of the macro.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Since you stored the value of 20pt as a length, you should access its value using \the\mylength. Redefining your macro as \newcommand*\mypoint{\the\mylength,20pt} will work.

See What is the difference between \def and \newlength? for more details on using length macros.

share|improve this answer
    
Thanks! Is it not a bit bizarre that this error only appeared when the [in=down] parameter was invoked, though? –  Jamie Vicary Nov 6 '11 at 23:18
    
Yeah, it seems that the curveto handler which replaces the lineto handler if you use something like in=down or bend right handles its coordinates differently. –  Jake Nov 6 '11 at 23:23

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.