ギリシャ文字とtikz

ギリシャ文字とtikz

V_0 と C_t の代わりにギリシャ文字を挿入する必要がありますが、何も機能しないようです。何かヒントはありますか?

\documentclass[11pt,a4paper]{article}

\usepackage{tikz}

% tikzstyle è deprecato: 
% http://tex.stackexchange.com/q/52372/13304
\tikzset{bag/.style={text width=2em, text centered}}% align=center

\begin{document}

\begin{tikzpicture}
\draw[|-stealth] (0,0) -- (8,0) node[right]{$t$};

\foreach \x/\testosopra/\testosotto in {0/V_0/{0},7/C_t/t}{
 \draw(\x,0.1)--(\x,-0.1);
 \node[above,font=\scriptsize]at (\x,0.1) (\testosopra) {$\testosopra$};
 \node[below,font=\scriptsize]at (\x,-0.1) {$\testosotto$};
}


\end{tikzpicture}

\end{document}

答え1

問題はマクロ(\testosopra)にあります\draw。これはノードの内部ラベルであると私は考えます ( を知らずに)。結論としては、内部ラベルはギリシャ語マクロにはなり得ません。ここでは、 「0」や「7」などの内部ラベルが許可されているため、を にtikz置き換えます。(\x)(\testosopra)

V_0こうすれば、を に\alphaC_tを に置き換えても問題はありません\beta

\documentclass[11pt,a4paper]{article}

\usepackage{tikz}

% tikzstyle è deprecato: 
% http://tex.stackexchange.com/q/52372/13304
\tikzset{bag/.style={text width=2em, text centered}}% align=center

\begin{document}

\begin{tikzpicture}
\draw[|-stealth] (0,0) -- (8,0) node[right]{$t$};

\foreach \x/\testosopra/\testosotto in {0/\alpha/{0},7/\beta/t}{
 \draw(\x,0.1)--(\x,-0.1);
 \node[above,font=\scriptsize]at (\x,0.1) (\x) {$\testosopra$};
 \node[below,font=\scriptsize]at (\x,-0.1) {$\testosotto$};
}


\end{tikzpicture}

\end{document}

ここに画像の説明を入力してください

関連情報