Sujet : Re: [LaTeX][PGF/TikZ] Undefined control sequence error for PGF intersections.
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.text.texDate : 30. Aug 2024, 13:20:12
Autres entêtes
Organisation : Stefan Ram
Message-ID : <loop-20240830131903@ram.dialup.fu-berlin.de>
References : 1
Annada Behera <
segfault@tilde.green> wrote or quoted:
\foreach \n in {1,...,\t} {
\path ({i-\n}) coordinate (i\n); % <--- Error Here
\fill[black] (i\n) circle (2pt);
\draw[dashed] (i\n) -- (i\n |- 0,0);
\draw[dashed] (i\n) -- (0,0 -| i\n);
}
I'm about as familiar with LaTeX as I am with surfing Pipeline
- which is to say, not at all. And this tikz thing? Totally
off my radar. But after messing around like a bear in a honey
factory, I stumbled onto something. Turns out, if you unravel
that last loop and use the following code, it's all gravy here.
\path ({i-1}) coordinate (i1);
\fill[black] (i1) circle (2pt);
\draw[dashed] (i1) -- (i1 |- 0,0);
\draw[dashed] (i1) -- (0,0 -| i1);
\path ({i-2}) coordinate (i2);
\fill[black] (i2) circle (2pt);
\draw[dashed] (i2) -- (i2 |- 0,0);
\draw[dashed] (i2) -- (0,0 -| i2);
\path ({i-3}) coordinate (i3);
\fill[black] (i3) circle (2pt);
\draw[dashed] (i3) -- (i3 |- 0,0);
\draw[dashed] (i3) -- (0,0 -| i3);
\path ({i-4}) coordinate (i4);
\fill[black] (i4) circle (2pt);
\draw[dashed] (i4) -- (i4 |- 0,0);
\draw[dashed] (i4) -- (0,0 -| i4);
| /H H
| :$ .;XM
| =$ +%$@=
| =$ .+$//H:
| =$ .+$+ +H=
| =$ ,+%+ XH
| =$ ,+$/ /H$
| =$ .+%; /XX=
| =$ .--,+HX$/+$X$:
| =$ ;$X$%X@#M+++/:
| =$ %HX/.-+%;-
| =$ :HX, ,+%/ ;: .
| =$ $H: -%%; ;=
| =$ HX -%%; ;=
| =$ .H$-%%; ;=
| :$ HX+$; ;=
| %@H+: ;=
|;/::::::::::::::::;:::::::::::::;:-X#@+:=;:::::::::::%+:::::::::::::::;
|X/---------------=%------------,,/X#M ---------------------------------
|$, / :%$M;/
|$- / ;%%%H:-$
|$- / ;%%-/H= :$
|$- / ;%%- $H, =$
|$- + ;%%- =HX =$
|$- .+ ;%+, ,XH/ =$
|$- ;;%+=-+XX% =$
|$- .;%%%$@#@X%$$%: =$
|$- :XX$;:%$%: =$
|$- -XH/ ;%+, =$
|$- +H+ /$+, =$
|$- XH +%+, =$
|$- H$ /$+, =$
|$-.H$/$+. =$
|+,@H%+. =$
|@#H;. :$
|##;/+++++++++++++++++++++++++++++++X@++++++++++++++++++++++++++++++++++