#### 4.2.4 Macros returning a string

The definition of the following macros can be found in the file TeXgraph.mac.

• coord( <z> [, decimal places] ): returns the point coordinates whose affix is <z> as a couple $\left(x,y\right)$ with the maximum <decimal places> asked (4 by default). This macro can be used as a string in functions or macros that can handle strings as argument. Example : Label(z,@coord(z)).
• engineerF( <x> ): returns the real <x> as a string in engineer size, that is to say $±m×1{0}^{n}$ with $m$ in the interval $\left[1;1000\left[$ and $n$ an integer multiple of $3$. This macro can be used as a string in functions or macros that can handle strings as argument.
• epsCoord( <z> [, decimal places] ): returns the point coordinates whose affix is <z> in the format:$x\phantom{\rule{1em}{0ex}}y$ (eps format coordinates) with the maximum <decimal places> asked (4 by default). This macro can be used as a string in functions or macros that can handle strings as argument.
• label( <expression> ): the expression is alphanumerically evaluated delimited with the symbol \$ if the variable dollar has the value $1$. The macro is returning the resulting string. For example : [dollar:=1, @label(2+2) ] returns "$4$".

This macro is used by the macro: GradDroite.

• svgCoord( <z> [, decimal places] ): returns the point coordinates whose affix is <z> with the format $x\phantom{\rule{1em}{0ex}}y$ (svg coordinates) with the maximal <decimal places> asked (4 by default). This macro can be used as a string in functions or macros that can handle strings as argument.

That macro is handling the current transforming matrix.

• texCoord( <z> [, decimal places] ): returns the point coordinates whose affix is <z> as the couple $\left(x,y\right)$ (tex format coordinates tex) with the maximal <decimal places> as asked (4 by default).This macro can be used as a string in functions or macros that can handle strings as argument.

That macro is handling the current transforming matrix.

• ScriptExt(): returns the string ".bat" under windows and ".sh" if not. (shell script files extension).
• StrNum( <numeric value> ): replace the decimal point by a comma if the predefined variable usecomma is set to $1$ and return the resulting string. The number of decimal places is determined by the variable nbdeci, and the display format with numericFormat (0: default format, 1: scientific, 2: engineer).

Example: [usecomma:=1, nbdeci:=10, Message(@StrNum(10000*sqrt(2)) )] displays: 14142,135623731.

Example: [usecomma:=1, nbdeci:=10, numericFormat:=1, Message(@StrNum(10000*sqrt(2)) )] displays: 1,4142135624E4.

Example: [usecomma:=1, nbdeci:=10, numericFormat:=2, Message(@StrNum(10000*sqrt(2)) )] displays: 14,1421356237E3.

That macro is used by the macro GradDroite.