
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
. 나는 tikz
이것이 노드의 내부 레이블이라고 생각하며(모르는 ) 내부 레이블은 그리스 매크로가 될 수 없다는 결론을 내립니다. 여기서는 "0" 및 "7"과 같은 내부 레이블이 허용되므로 (\x)
을 대신합니다.(\testosopra)
V_0
이렇게 하면 \alpha
및 C_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}