在 LaTex 中创建交互式方案

在 LaTex 中创建交互式方案

我们要创建一个方案,它应该是:

  • 水平的
  • 多层次
  • 易于编辑
  • 它必须是连接线(但不能是交叉链接)
  • 节点分组(块可能包含超过 10 行)
  • 最佳地填充页面
  • 包含超链接

我们的尝试:

在 LaTex 中绘图- 这种情况很难使用,特别是如果图表发生变化(例如在中间添加一个块)

创建图表- 我们尝试过的所有图表都不紧凑

创建列表(枚举)- 无法看到整个方案,没有连接线,列表级别有限。

问题:

  1. 您能建议什么方法来解决我们的问题?
  2. 最好使用什么解决方案?
  3. 还有其他方法可以解决问题吗?

架构示例:

在此处输入图片描述

梅威瑟:

    \documentclass{report} %%---------Drawing in LaTex------------
    \usepackage[utf8]{inputenc}
    \usepackage{enumitem}
    \usepackage{hyperref}
    \usepackage{graphicx} 
    \usepackage{graphics}

    \begin{document}

    \section{section}
    \label{secc}
    \newpage
    \begin{picture}(100,100)
    \put(0,0){\oval(100,100)}
    \put(-30,0){
        \begin{tabular}{l}
        \hyperref[secc]{ref1}\\
        \hyperref[secc]{ref2}\\
        \hyperref[secc]{ref3}\\
        \hyperref[secc]{ref4}\\
        \hyperref[secc]{ref5}\\
        \hyperref[secc]{ref6}\\
        \end{tabular}
        }
    \put(50,0){\oval(50,50)[rt]}
    \put(100,0){\oval(50,50)[lb]}
    \put(150,-50){\oval(100,200)}

    \put(120,0){
        \begin{tabular}{l}
        \hyperref[secc]{ref12}\\
        \hyperref[secc]{ref22}\\
        \hyperref[secc]{ref32}\\
        \hyperref[secc]{ref42}\\
        \hyperref[secc]{ref52}\\
        \hyperref[secc]{ref62}\\
        \end{tabular}
        }

    \put(50,0){\oval(25,25)[rt]}
    \put(62.5,0){\line(0,-1){100}}
    \put(50,-100){\oval(25,25)[rb]}

    \put(0,-125){\oval(100,100)}
    \end{picture}

    \end{document}

\documentclass[tikz, margin=10mm]{standalone} %%---------Create a diagram-------
\usetikzlibrary{shadows}
\usepackage[edges]{forest}
\usepackage{hyperref}

\begin{document}

    \section{Docktrial}
    \label{sec:docktrial}
    \section{AP Modes}
    \label{sec:apmodes}
    \section{Track Mode}
    \label{sec:trackmode}
    \clearpage

   \begin{forest}
    for tree={% style of tree nodes
      draw, semithick, rounded corners, drop shadow,
        top color = blue!5,
     bottom color = blue!5,
       text width = 35mm, text badly centered,
              % style of tree (edges, distances, direction)
             edge = {draw, semithick},
           anchor = east,
             grow = east,
    forked edge,            % for forked edge
            s sep = 1mm,    % sibling distance
            l sep = 4mm,    % level distance
         fork sep = 2mm,    % distance from parent to branching point
               }
[{\hyperref[sec:docktrial]{\textbf{Docktrial}}}
    [\textbf{Configuration}]
    [Alarm timeout]
    [Mode select]
    [\textbf{Ext devices}
        [ROT Tiller]
        [\textbf{GPS position}
            [V filter]
            [X corr]
            [Pos Source]
            [Reserved3]
            [Reserved2]
            [Reserved1]
            [S filter]
            [M filter]
            [Z]
            [Y]
            [X]
        ]
        [\textbf{Speed joystick}
            [Speed Rudder Limit]
            [Parking]
            [JSync Type]
            [Set HDG]
            [High Gain Type]
            [High Gain]
            [V min Current]
            [VX High]
            [VY max]
            [VX aft max]
            [VX fore max]
        ]
        [Joystick polling]
        [Tillers ID Assign]
        [Dodge Tiller]
        [Steering Wheel]
    ]
    [Manual tuning]
    [Station]
    [{\hyperref[sec:apmodes]{\textbf{AP Modes}}}
        [Dodge mode]
        [River mode]
        [CTS mode]
        [Wind Vane mode]
        [{\hyperref[sec:trackmode]{Track mode}}]
    ]
]
    \end{forest}    
\end{document}

\documentclass{report} %%---------Create a list (enumeration)-------------------
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{graphicx} 
\usepackage{graphics}
\begin{document}

\begin{itemize}
    \item Docktrial 
        \begin{itemize}
            \item AP Modes
                \begin{itemize}
                    \item Track mode 
                    \item Wind Vane mode
                    \item CTS mode
                    \item River mode
                    \item Dodge mode
                \end{itemize}
            \item Station
            \item Manual tuning
            \item Ext devices 
                \begin{itemize}
                    \item Steering Weel  
                    \item Dodge Tiller
                    \item Tillers ID Assign
                    \item Joystick polling
                    \item Speed joystick
                        \begin{itemize}
                            \item VX force max  
                            \item VX aft max
                            \item VY max
                            \item Vx High 
                            \item V min Current 
                            \item High Gain 
                            \item High gain type 
                            \item Set HDG
                            \item JSync Type 
                            \item Parking 
                            \item Speed Rudder Limit
                        \end{itemize}
                    \item GPS position 
                        \begin{itemize}
                            \item X   
                            \item Y
                            \item Z
                            \item M filter 
                            \item S filter 
                            \item Reserved 1 
                            \item Reserved 2 
                            \item Reserved 3 
                            \item Pos source  
                            \item X corr
                            \item V filter
                        \end{itemize}
                    \item ROT tiller
                \end{itemize}
            \item Mode select
            \item Alarm timeout
            \item Configuration 
                \begin{itemize}
                    \item Device mode 
                    \item JP Installation
                        \begin{itemize}
                            \item JP config
                            \item JP Ext config
                            \item Reduce config
                            \item JP station 
                            \item Monitor type 
                            \item Low power
                            \item WJ booster
                            \item JFail Exit 
                            \item Ahead Type  
                            \item Smoothing
                            \item Limitation
                            \item Allocation
                            \item Password 
                        \end{itemize}
                    \item JP modes
                        \begin{itemize}
                            \item Anchor Watch
                            \item Hold Position
                            \item Strong Current
                            \item Joystick Ferry 
                            \item Joystick auto 
                            \item Joystick speed  
                            \item Joystick Low Track  
                            \item Joystick High Track 
                            \item Joystick Coord 
                            \item Password
                            \item Secure Code
                        \end{itemize}
                    \item Low Speed HC
                    \item 3 rudders 
                    \item Password
                \end{itemize}
        \end{itemize}
\end{itemize}

\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}

相关内容