Dear stackoverflowers,
recently, while playing around with the METAPOST enviroment, I encountered a problem. While drawing something using the loop 'for' macro I needed the value of the loop variable to be correctly displayed inside a label, however I could not figure out how to do that and Mr.Google was unable to help me. Below is an example of the code I used:
for i=1 upto N: label(btex $here should be the value of i$, some_position); endfor;
Any kind of help will be appreaciated :]
at first there's a
etexmissing before, some_position. All betweenbtexandetexis taken as a string. It is not interpreted. For this purpose the contents of the string has to be calculated first byTEX(). Example:If You want to use LaTeX-Struktures, you have to modify the original TEX() in this way:
Hope that helps
V. W.