我想在 math.stack 中添加这个图形,并通过在 latex 中将其添加到我的文档中
- 如何让它看起来好看又有风格
\documentclass[tikz,border=2pt,png]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);
\end{tikzpicture}
\end{document}
任何帮助,将不胜感激
答案1
\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{intersections}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\draw (-0.5,5) -- (0,5) -- (0,0) -- (5,0) -- (5,5) -- (5.5,5);
\draw[name path=A] (0,0)coordinate(o) -- (5,4.5)node[pos=0.8,sloped,auto]{\SI{10}{\meter}};
\draw[name path=B] (0,3) -- (5,0)node[pos=0.2,sloped,auto]{\SI{8}{\meter}};
\path[name intersections={of=A and B,by={a}}];
\draw[dashed] (a)node[right=1mm]{M} -- (a|-o)node[pos=0.7,auto]{\SI{3}{\meter}};
\end{tikzpicture}
\end{document}