After calculating \pgfmathresult and turning the output as an integer:
\pgfmathprintnumber{\pgfmathresult}
Which for example is 10, I want to iterate instead of
\foreach \i in {1,...,10}{%
some iteration
}
,with something like this
\foreach \i in {1,...,\pgfmathprintnumber{\pgfmathresult}}{%
some iteration
}
Unfortunately it doesnt work. How can I approach this, any ideas?
THX a lot!
\pgfmathparse{int(<your calculation>)}and then\foreach \i in {1,...,\pgfmathresult}{... – Jasper Habicht Nov 16 '22 at 14:27\foreach[parse=true] \i in {1, ..., int(<your calculation>)}but we'd need to know more about your actual calculation to figure out what's best.\pgfmathprintnumbercertainly won't work. – Qrrbrbirlbel Nov 16 '22 at 14:32So basically, i wantet to calculate first the number of lines in a paragraph, and then with this integer, iterating through some stuff.
– Bilal Yilmaz Nov 16 '22 at 15:20