0

If I use the self-defined constant directly (\epsi), it works. But when I use the expression (\supp), it does not work.

The minimal example is as follows.

\documentclass[notitlepage, 12pt]{amsart}
\usepackage{tikz}

\usetikzlibrary{patterns,arrows,decorations.pathreplacing,calc,intersections,through,backgrounds} \usepackage[capposition=bottom]{floatrow} \usepackage{float}

\begin{document}

\begin{figure}[H] \centering

\begin{tikzpicture}[xscale=6,yscale=6]

\def\epsi{0.1}; \def\aa{0.6}; \def\supp{(\epsi)/(\epsi+2*\aa-1)};

\draw [<->] (0,1.1)--(0,0)--(1.1,0);

%\draw (\epsi,0)--(1,1); \draw (\supp,0)--(1,1);

\end{tikzpicture}

\end{figure}

\end{document}

Qrrbrbirlbel
  • 119,821
Ypbor
  • 399
  • 2
    Try \draw ({\supp},0)--(1,1);. A662447, A662462 and related. You can do also \pgfmathsetmacro\supp{(\epsi)/(\epsi+2*\aa-1)} which will evaluate the formula at that point and store the result in \supp which can then be used the same as \epsi. – Qrrbrbirlbel Aug 17 '23 at 08:59
  • 3
    You can also declare function = {supp = (\epsi)/(\epsi+2*\aa-1);} and then simply use epsi. That way you have defined a PGFmath function that, similar to your \supp, gets only evaluated when you use it (and thus changes with \epsi and \aa. Nothing wrong with using a macro, it's just one of many ways to use values and in this case avoid your original problem. – Qrrbrbirlbel Aug 17 '23 at 09:07

0 Answers0