如果我使用类似 \begin{tikzpicture} ... \end{tikzpicture} 的代码
\begin{tikzpicture} ... \end{tikzpicture},这是我的结果
但是,我希望这些 tikzpicture 水平对齐。你能帮我解决这个问题吗?非常感谢!这是我的代码:
\begin{tikzpicture}[scale=1][baseline={(0,0)}]
\draw [rotate around={0.99:(0,0)},thick] (0,00) ellipse (3cm and 1.5cm);
\draw [thick] (-2.34,0)-- (2.34,0);
\draw [thick] (1,1.42)-- (-2.34,0);
\draw [thick] (1,1.42)-- (2.34,0);
\begin{scriptsize}
\draw [fill=white] (-2.34,0) circle (1pt);
\draw[color=black] (-2.34,0) node[below] {$F_1$};
\draw [fill=white] (2.34,0) circle (1pt);
\draw[color=black] (2.34,0) node[below] {$F_2$};
\draw [fill=white] (1,1.42) circle (1pt);
\draw[color=black] (1,1.42) node[above] {$M$};
\end{scriptsize}
\end{tikzpicture}
\begin{tikzpicture}[x=1.0cm,y=1.0cm,scale=1][baseline={(0,0)}]
\draw [rotate around={0.99:(0,0)},thick] (0,00) ellipse (3cm and 1.5cm);
\draw [thick] (-2.34,0)-- (2.34,0);
\draw [-stealth,thin] (-3.7,0) -- (4.4,0)node[below left] {$x$};
\draw [-stealth,thin] (0,-2.1) -- (0,2.7)node[below left] {$y$};
\draw [thick] (1,1.42)-- (-2.34,0);
\draw [thick] (1,1.42)-- (2.34,0);
\begin{scriptsize}
\draw [fill=white] (-2.34,0) circle (1pt);
\draw[color=black] (-2.34,0) node[below] {$F_1$};
\draw [fill=white] (2.34,0) circle (1pt);
\draw[color=black] (2.34,0) node[below] {$F_2$};
\draw [fill=white] (1,1.42) circle (1pt);
\draw[color=black] (1,1.42) node[above] {$M$};
\draw [fill=white] (0,0) circle (1pt);
\draw[color=black] (0,0) node[below left] {$O$};
\end{scriptsize}
\end{tikzpicture}
答案1
这里的根本问题是\begin{tikzpicture}
只有一个可选参数;该参数的值被传递给\tikzset{}
宏。
所以你\begin{tikzpicture}[x=1.0cm,y=1.0cm,scale=1][baseline={(0,0)}]
错了;你的日志文件中应该有这个:
Missing character: There is no [ in font nullfont!
Missing character: There is no b in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no s in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no = in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no ] in font nullfont!
因为第二个括号内的参数实际上是作为普通文本读取的(它不能出现在tikzpicture
.
正确的命令是
\begin{tikzpicture}[x=1.0cm,y=1.0cm,scale=1,baseline={(0,0)}]
它具有您所期望的效果。