
我參與其中\documentaclass[landscape]{article}
,並試圖弄清楚如何將我在本文檔中創建的一堆圖表(在 TSE 用戶的慷慨幫助下)組合在一起。
我想做的是這個
我嘗試過使用幫助網格至少讓箭頭就位,但每次我添加內容時網格都會不斷移動。
\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[landscape]{article}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{shapes.geometric}
\usepgflibrary{decorations.shapes}
\usetikzlibrary{decorations.shapes, arrows, decorations.markings, shapes, fit, arrows, positioning, trees, mindmap, calc}
\begin{document}
\begin{tikzpicture}
% figures
% text
% figures
% text
% and last time down
\end{tikzpicture}
\end{document}
由於我沒有最小的工作程式碼,因此我不希望神奇地為我解決這個問題,但任何建議或範例都會有所幫助。
答案1
如果您有某種圖像檔案(包括 PDF 等)形式的圖形,則可以簡單地includegraphics
在節點文字中使用。例如:
\documentclass{article}
\usepackage{tikz,graphicx}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}[auto]
\node (center) {some text here};
\node[above left=of center] (fig1) {\includegraphics{smile.pdf}};
\node[below left=of center] (fig2) {\includegraphics{smile.pdf}};
\node[above right=of center] (fig3) {\includegraphics{smile.pdf}};
\node[below right=of center] (fig4) {\includegraphics{smile.pdf}};
\node[above=of fig4,align=center] (rcenter) {some more \\ text};
\draw[double] (fig1) -- (center)
(fig3) -- (center)
(fig4) -- (rcenter);
\draw[double,-stealth] (center) -- (fig2);
\draw[double,-stealth] (center) -- (fig4);
\draw[double,-stealth] (rcenter) -- (fig3);
\end{tikzpicture}
\end{document}
程式碼編譯為:
如您所看到的,箭頭會自動對齊,因為center
預設情況下常規路徑始終錨定在錨點處。如果你的數字分別。它們的間距不規則,您可能需要查看圖層,先繪製箭頭,然後在其上繪製文字節點。
為了從 TikZ 程式碼中取得 PDF,您可以使用standalone
:
\documentclass{standalone}
\usepackage{tikz,wasysym}
\begin{document}
\begin{tikzpicture}
\node {\smiley};
\end{tikzpicture}
\end{document}
這將編譯為上面看到的笑臉圖像,特別是沒有多餘的空白。