I am using tikzpicture the first time, trying to create a plot. As soon as I add a comma in the line which starts with %%%%%% (here just to highlighting purposes)between S_T and (,) K, latex cannot create a file. what's wrong?

thanks in advance

```
\documentclass[a4paper, 10pt]{article}
\usepackage[parfill]{parskip}
\usepackage[german]{varioref}
\usepackage{url}
\usepackage{amsmath}
\usepackage{dcolumn}
\setcounter{tocdepth}{4}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{intersections}
\begin{document
\begin{figure}[h] \centering
\begin{tikzpicture}
\draw[->] (0,0) -- (10,0);
\draw[->] (0,0) -- (0, 5);
\draw (2,0) -- (6,4);
\draw (4,0) -- (6,-4);
\draw (6,0) -- (10,4);
\draw[dashed] (4,0) -- (4,2);
\draw[dashed] (4,2) --(0,2);
\coordinate[label=left:$\text{Payoff}$] (A) at (0,3);
\coordinate[label=left:$S_T$] (A) at (10,-0.5);
\coordinate[label=center: $S_{\hat{\theta}-1}$] (K) at (2,-0.5);
\coordinate[label=left: $S_{\hat{\theta}}$] (A) at (4,-0.5);
\coordinate[label=center: $S_{\hat{\theta}+1}$] (A) at (6,-0.5);
\coordinate[label =center: $\delta$] (A) at (-0.5,2);
\coordinate[label =center: $C_T(S_T,KS_{\hat{\theta}-1})$] (A) at (4,4);
\coordinate[label =center: $C_T(S_TKS_{\hat{\theta}+1})$] (A) at (8,4);
%%%%%%\coordinate[label =center: $-2 \times C_T(S_T,KS_{\hat{\theta}})$] (A) at (7.5,-3);
\end{tikzpicture}
\end{figure}
```

## Best Answer

Apart from the missing

`}`

in`\begin{document`

and the missing`\end{document}`

...Ti

kZ treats commas as field delimiters, even if they are in math mode. So you have to hide them in a pair of`{}`

to make it work: