我们有需要交互方案的文档,因此方案不能只是一张图片
问题:
如何在乳胶中创建这样的图表?
图中具有以下设置:
- 块之间的箭头应该紧凑,如图所示(弯曲的箭头)
- 水平方案(非垂直)
- 架构中的每个项目都是一个超链接
- 需要将多个项目放在一个块中,如红色图片所示
- 这样的方案应该占一页
期望结果:
实际结果:
我只能做这样的模式
最小工作示例 使用 XeLaTeX。
\documentclass{report}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=blue,fill=blue!30]
\tikzstyle{optional}=[dashed,fill=gray!50]
\begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}]
\node {Interfaces}
child { node {In}}
child { node {NMEA OUT}}
child { node {ECDIS OUT}}
child { node {VDR OUT}}
child { node [selected] {NMEA OUT
ECDDIS OUT\\ VDR OUT}
child { node {Baud}}
child { node {Freq}}
child { node {HTD}}
child { node {RSA}}
child { node {ROR}}
child { node {ALR}}
child { node {ALA}}
child { node {HMS}}
child { node {HMR}}
child { node {BAM}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {texdoc}};
\end{tikzpicture}
\end{document}
答案1
\documentclass[a4paper,11pt,ngerman]{article}
\usepackage{hyperref}
\usepackage[edges]{forest}
\usepackage{caption}
\tikzset{parent/.style={align=center,text width=0.4cm,rounded corners=3pt},
child/.style={align=center,text width=5cm,rounded corners=3pt}
}
\colorlet{col1}{white}
\colorlet{col2}{cyan!5}
\colorlet{col3}{cyan!15}
\colorlet{col4}{cyan!30}
\begin{document}
\section{Docktrial}
\label{sec:docktrial}
\section{AP Modes}
\label{sec:apmodes}
\clearpage
\begin{center}
\resizebox*{.94\linewidth}{!}{%
\begin{forest}
forked edges,
for tree={
grow'=east,
draw,
l sep = 12mm,
fork sep = 6mm,
rounded corners,
text width=4.7cm,
node options={align=center},
}
[,fill=col1, draw=white, parent, s sep=1cm
[{\hyperref[sec:docktrial]{\textbf{Docktrial}}}, for tree={child, fill=col4, draw=col4, edge=white}
[{\hyperref[sec:apmodes]{\textbf{AP Modes}}}, for tree={child, fill=col4, draw=col4, edge=black}, s sep=0mm
[Track mode, for tree={child, fill=col3}]
[Wind Vine mode, for tree={child, fill=col1}]
[CTS mode, for tree={child, fill=col3}]
[River mode, for tree={child, fill=col1}]
[Dodge mode, for tree={child, fill=col3}]
]
[Station, for tree={child, fill=col2, draw=col4, edge=black}]
[Manual tuning, for tree={child, fill=col1, draw=col4, edge=black}]
[\textbf{Ext devices}, for tree={child, fill=col4, draw=col4, edge=black}, s sep=0mm
[Steering Wheel, for tree={child, fill=col2}]
[Dodge Tiller, for tree={child, fill=col1}]
[Tillers ID Assign, for tree={child, fill=col2}]
[Joystick polling, for tree={child, fill=col1}]
[\textbf{Speed joystick}, calign=last, for tree={child, fill=col2}, s sep=0mm
[Vx fore max, for tree={child, fill=col2}]
[Vx aft max, for tree={child, fill=col1}]
[Vy max, for tree={child, fill=col2}]
[Vx High, for tree={child, fill=col1}]
[V min Current, for tree={child, fill=col2}]
[High Gain, for tree={child, fill=col1}]
[High Gain Type, for tree={child, fill=col2}]
[Set HDG, for tree={child, fill=col1}]
[JSync Type, for tree={child, fill=col2}]
[Parking, for tree={child, fill=col1}]
[Speed Rudder Limit, for tree={child, fill=col2}]
]
[\textbf{GPS position}, calign=first, for tree={child, fill=col3, edge=black}, s sep=0mm
[X, for tree={child, fill=col1}]
[Y, for tree={child, fill=col3}]
[Z, for tree={child, fill=col1}]
[M filter, for tree={child, fill=col3}]
[S filter, for tree={child, fill=col1}]
[Reserved1, for tree={child, fill=col3}]
[Reserved2, for tree={child, fill=col1}]
[Reserved3, for tree={child, fill=col3}]
[Pos Source, for tree={child, fill=col1}]
[X corr, for tree={child, fill=col3}]
[V filter, for tree={child, fill=col1}]
]
[ROT Tiller, for tree={child, fill=col1}, edge=black]
]
[Mode select, for tree={child, fill=col2}, edge=black]
[Alarm timeout, for tree={child, fill=col1}, edge=black]
[\textbf{Configuration}, for tree={child, fill=col4, edge=black}, s sep=2mm
[Device mode, for tree={child, fill=col1}, edge=black]
[\textbf{JP Installation}, calign=last, for tree={child, fill=col2, edge=black}, s sep=0mm
[JP config, for tree={child, fill=col2}]
[JP Ext config, for tree={child, fill=col1}]
[Reduce config, for tree={child, fill=col2}]
[JP station, for tree={child, fill=col1}]
[Monitor type, for tree={child, fill=col2}]
[Low power, for tree={child, fill=col1}]
[WJ booster, for tree={child, fill=col2}]
[JFail Exit, for tree={child, fill=col1}]
[Ahead Type, for tree={child, fill=col2}]
[Smoothing, for tree={child, fill=col1}]
[Limitation, for tree={child, fill=col2}]
[Allocation, for tree={child, fill=col1}]
[Password, for tree={child, fill=col2}]
]
[\textbf{JP modes}, calign=first, for tree={child, fill=col3}, s sep=0mm
[Anchor Watch, for tree={child, fill=col1}]
[Hold Position, for tree={child, fill=col3}]
[Strong Current, for tree={child, fill=col1}]
[Joystick Ferry, for tree={child, fill=col3}]
[Joystick Auto, for tree={child, fill=col1}]
[Joystick Speed, for tree={child, fill=col3}]
[Joystick Low Track, for tree={child, fill=col1}]
[Joystick High Track, for tree={child, fill=col3}]
[Joystick Horsing, for tree={child, fill=col1}]
[Joystick Weathervan, for tree={child, fill=col3}]
[Joystick Coord, for tree={child, fill=col1}]
[Password, for tree={child, fill=col3}]
[Secure Code, for tree={child, fill=col1}]
]
[Low Speed HC, for tree={child, fill=col1}]
[3 rudders, for tree={child, fill=col2}]
[Password, for tree={child, fill=col1}]
]
]
]
\end{forest}}
\end{center}
\end{document}