Code: Select all
\newcommand{\myput}[3]{\put(#1){\makebox(0,0){\hyperlink{#2}{#3}}}}
Code: Select all
\myput{550,300}{lnkB.2}{$\rightarrow $}
Code: Select all
! Illegal unit of measure (pt inserted).
Thanks in advance for any help.
Code: Select all
\newcommand{\myput}[3]{\put(#1){\makebox(0,0){\hyperlink{#2}{#3}}}}
Code: Select all
\myput{550,300}{lnkB.2}{$\rightarrow $}
Code: Select all
! Illegal unit of measure (pt inserted).
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass{article}\usepackage{a4}\usepackage{multido}\usepackage{listofitems}\newcommand{\myput}[3]{\put(#1){\makebox(0,0){\hyperlink{#2}{#3}}}}\newcommand{\hyperlink}[2]{#2 to #1}% the original document uses the hyperref package\newcommand{\addlink}[1]{\myput{#1}{p.2}{$\rightarrow $}}\newcommand{\addlinks}{% this works as expected\multido{\ix=3+6}{2}{%\multido{\iy=3+5}{2}{\addlink{\ix,\iy}}%}%}\newcommand{\addlist}[1]{% the argument has the form x1,y1;x2,y2;...\setsepchar{;,}\readlist\lOfItems{#1}% creates a list of lists ((x1 y1) (x2 y2) ...)\multido{\ik=1+1}{\lOfItemslen}{% iterates on the top level list\addlink{\lOfItems[\ik,1],\lOfItems[\ik,2]}% uses coordinates x,y}%}\begin{document}\setlength{\unitlength}{1cm}\begin{center}\begin{picture}(18,10)\addlink{6,6} \addlinks % ok\addlist{1,2;7,4}% list of x,y coordinates\end{picture}\end{center}\end{document}
Code: Select all
! Illegal unit of measure (pt inserted).<to be read again>]l.34 \addlist{1,2;7,4}% list of x,y coordinates
Code: Select all
\newcommand{\addlist}[1]{%\setsepchar{;}\readlist\lOfItems{#1}%\multido{\ik=1+1}{\lOfItemslen}{%\addlink{\lOfItems[\ik]}}%}
Code: Select all
Runaway argument?\lOfItems [\ik ] ){\makebox (0,0){\hyperlink {p.2}{$\rightarrow \ETC.! File endedRunaway argument?
Code: Select all
\newcommand{\addlist}[1]{%\setsepchar{;/,}\readlist\lOfItems{#1}%\multido{\ik=1+1}{\lOfItemslen}{%\addlink{\lOfItems[\ik,1],\lOfItems[\ik,2]}}%}
Code: Select all
\newcommand{\addlist}[1]{%\setsepchar{;/,}\readlist\lOfItems{#1}%\multido{\ik=1+1}{\lOfItemslen}{%\itemtomacro\lOfItems[\ik,1]\xcoord%\itemtomacro\lOfItems[\ik,2]\ycoord%\addlink{\xcoord,\ycoord}}%}
NEW: TikZ book now 40% off at Amazon.com for a short time.