如何在横向模式下生成 tikz 图形?我试图制作一个独立的图形,因为我不会将其包含在文档或文章中。这个解决方案似乎不适用于我的情况:在横向模式下使用 TikZ?。我尝试使用\usepackage[landscape]{geometry}
和\usepackage{pdflscape}
和\usepackage[pdftex]{lscape}
;但似乎都不起作用。我在编译时收到此错误消息:
!缺少 \endgroup 插入。\endgroup l.10 \begin{landscape}
当我移除它时begin{landscape}
,end{landscape}
我就只剩下一个常规的纵向方向来切断我的身影。
\documentclass{standalone}
\usepackage{tikz}
%\usepackage[landscape]{geometry}
\usepackage[pdftex]{lscape}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.misc,positioning,calc}
\tikzstyle{g} = [draw,line width=3mm]
\begin{document}
\begin{landscape}
\begin{tikzpicture}
%%%%%%%%%%%%%%PNG nodes%%%%%%%%%%%%%%
\node[inner sep=1pt] (mp) at (0,0) {\includegraphics[scale=.75] {./mortarpestle.png}}; %%%MORTAR%%%
\node[inner sep=1pt,right=2mm of mp] (crude) {\includegraphics[scale=.4]{./crude.png}}; %%%CRUDE%%%
%
\node[inner sep=1pt,anchor=base west] (tecan) at ($(crude.south)+(6,0)$){\includegraphics[scale=0.5]{./tecan_prefrac.png}} node (tecantxt) [below=5mm of tecan,text width=4.25cm,align=center] {\large{\textbf{Fractionation using Tecan robotics}}}; %%%TECAN%%%
%
\coordinate[inner sep=1pt,below=.6cm of tecantxt] (b4nci);
\node[inner sep=1pt,anchor=east] (nci) at ($(b4nci-|tecan.east)+(0,-3.25)$) {\includegraphics[scale=.4] {./onedose.png}};
%
%%%BENT NODE FOR NCI-60
\coordinate[inner sep=1pt] (topnci2) at (nci.north);
\coordinate[inner sep=1pt] (topnci1) at ($(topnci2|-b4nci)$);
%
\node[inner sep=1pt,anchor=base east] (gilson) at ($(nci.south west)+(-3.9,0)$) {\includegraphics[width=6.1cm]{./gilson.png}} node (gilsontxt) [below=5mm of gilson,text width=3cm,align=center] {\large{\textbf{Second stage fractionation}}}; %%%GILSON%%%
%
\node[inner sep=1pt,anchor=base east] (96dw) at ($(gilson.south west)+(-3.9,0)$) {\includegraphics[scale=0.7] {./DWplate_NMRtube.png}} node (platetxt) [below=5mm of 96dw,text width=3.5cm,align=center] {\large{\textbf{Selection of active fractions}}};%%%DWNMRPLATE%%%
\node[inner sep=1pt,below=1.25cm of platetxt] (nmr) {\includegraphics[scale=0.6] {./bruker_AV600.png}} node [below=5mm of nmr,text width=3cm,align=center] {\large{\textbf{NMR analysis}}}; %%%NMR INSTRUMENT%%%
%
\node[inner sep=1pt,right=1cm of nmr] (txtsearch) {\includegraphics[scale=1.5]{./txtsearch.png}};
\node[inner sep=1pt,right=2mm of txtsearch] (marinlit) {\includegraphics[scale=0.65]{./marinlit.png}};
%
\node[inner sep=1pt,right=1.5cm of marinlit.east] (hplc) {\includegraphics[scale=0.15]{./hplc.png}};
\node[inner sep=1pt,right= 1.25cm of hplc.east] (2dnmr) {\includegraphics[scale=0.3]{./2d_NMRplot.png}};
\node[inner sep=1pt,below=2mm of 2dnmr.south] (lcms) {\includegraphics[scale=0.3]{./lcms.png}};
%
%%TEXT NODES%%%%%%%%%%%%%%
\node [text width=3cm,align=center]at ($(mp)!0.5!(crude) + (0,-2)$) {\large{\textbf{Crude Extract}}};
\node [text width=3.2cm,align=center] at ($(nci.south)+(0,-1)$) {\large{\textbf{NCI-60 onedose screen}}};
%
%%ARROWS%%%%%%%%%%%%%%%
\path[g,->] ($(crude.east)+(.15,0)$) -- ($(crude-| tecan.west)$);
\path[g,->] (tecantxt) -- (b4nci.north) -- (topnci1)--(topnci2); %BENT ARROW
%
\path[g,->] ($(nci.west)+(-.15,0)$)-- ($(gilson.east|-nci.west)$);
\path[g,->] ($(gilson.west|-nci.west)$) -- ($(96dw.east|-nci.west) $);
\path[g,->] (platetxt.south) -- (nmr.north);
\end{tikzpicture}
\end{landscape}
\end{document}
答案1
该rotating
包及其sideways
环境工作(请注意,我已用 替换了您的图像example-image-a
):
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.misc,positioning,calc}
\tikzstyle{g} = [draw,line width=3mm]
\usepackage{rotating}
\begin{document}
\begin{sideways}
\begin{tikzpicture}
%%%%%%%%%%%%%%PNG nodes%%%%%%%%%%%%%%
\node[inner sep=1pt] (mp) at (0,0) {\includegraphics[scale=.75] {example-image-a}}; %%%MORTAR%%%
\node[inner sep=1pt,right=2mm of mp] (crude) {\includegraphics[scale=.4]{example-image-a}}; %%%CRUDE%%%
%
\node[inner sep=1pt,anchor=base west] (tecan) at ($(crude.south)+(6,0)$){\includegraphics[scale=0.5]{example-image-a}} node (tecantxt) [below=5mm of tecan,text width=4.25cm,align=center] {\large{\textbf{Fractionation using Tecan robotics}}}; %%%TECAN%%%
%
\coordinate[inner sep=1pt,below=.6cm of tecantxt] (b4nci);
\node[inner sep=1pt,anchor=east] (nci) at ($(b4nci-|tecan.east)+(0,-3.25)$) {\includegraphics[scale=.4] {example-image-a}};
%
%%%BENT NODE FOR NCI-60
\coordinate[inner sep=1pt] (topnci2) at (nci.north);
\coordinate[inner sep=1pt] (topnci1) at ($(topnci2|-b4nci)$);
%
\node[inner sep=1pt,anchor=base east] (gilson) at ($(nci.south west)+(-3.9,0)$) {\includegraphics[width=6.1cm]{example-image-a}} node (gilsontxt) [below=5mm of gilson,text width=3cm,align=center] {\large{\textbf{Second stage fractionation}}}; %%%GILSON%%%
%
\node[inner sep=1pt,anchor=base east] (96dw) at ($(gilson.south west)+(-3.9,0)$) {\includegraphics[scale=0.7] {example-image-a}} node (platetxt) [below=5mm of 96dw,text width=3.5cm,align=center] {\large{\textbf{Selection of active fractions}}};%%%DWNMRPLATE%%%
\node[inner sep=1pt,below=1.25cm of platetxt] (nmr) {\includegraphics[scale=0.6] {example-image-a}} node [below=5mm of nmr,text width=3cm,align=center] {\large{\textbf{NMR analysis}}}; %%%NMR INSTRUMENT%%%
%
\node[inner sep=1pt,right=1cm of nmr] (txtsearch) {\includegraphics[scale=1.5]{example-image-a}};
\node[inner sep=1pt,right=2mm of txtsearch] (marinlit) {\includegraphics[scale=0.65]{example-image-a}};
%
\node[inner sep=1pt,right=1.5cm of marinlit.east] (hplc) {\includegraphics[scale=0.15]{example-image-a}};
\node[inner sep=1pt,right= 1.25cm of hplc.east] (2dnmr) {\includegraphics[scale=0.3]{example-image-a}};
\node[inner sep=1pt,below=2mm of 2dnmr.south] (lcms) {\includegraphics[scale=0.3]{example-image-a}};
%
%%TEXT NODES%%%%%%%%%%%%%%
\node [text width=3cm,align=center]at ($(mp)!0.5!(crude) + (0,-2)$) {\large{\textbf{Crude Extract}}};
\node [text width=3.2cm,align=center] at ($(nci.south)+(0,-1)$) {\large{\textbf{NCI-60 onedose screen}}};
%
%%ARROWS%%%%%%%%%%%%%%%
\path[g,->] ($(crude.east)+(.15,0)$) -- ($(crude-| tecan.west)$);
\path[g,->] (tecantxt) -- (b4nci.north) -- (topnci1)--(topnci2); %BENT ARROW
%
\path[g,->] ($(nci.west)+(-.15,0)$)-- ($(gilson.east|-nci.west)$);
\path[g,->] ($(gilson.west|-nci.west)$) -- ($(96dw.east|-nci.west) $);
\path[g,->] (platetxt.south) -- (nmr.north);
\end{tikzpicture}
\end{sideways}
\end{document}