我想用 latex 为一个小组项目制作一个组织结构图。我以前从未做过这件事,我发现我可以使用 Forest 包或使用 tikz。
我的同事使用 Word 制作了图表,所以我想保留框架,但可能让它看起来更漂亮一些。有人对此很了解吗?我希望能够将图片分别插入每个框中(加载它们)。
谢谢
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[left=0.8in,right=0.8in,top=0.5in,bottom=0.8in]{geometry}
\usepackage{array}
\usepackage[table, x11names]{xcolor}
\usepackage{array, multirow}
\usepackage{makecell, hhline}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadalign{lc}
\newcommand\whitecell[1]{\cellcolor{white}{#1}}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage[many]{tcolorbox}
\begin{document}
\begin{center}
\begin{tcolorbox}[halign= flush center, fonttitle=\sffamily\bfseries\large, title={Lecteur DVD LG=Model GSA-H10N}, width=\linewidth/2]
\includegraphics[height=3cm]{Picture1.jpg}
\end{tcolorbox}
\end{center}
\tcbset{on line,before upper=\strut,width=10cm}
\vspace{10px} %%%%%%%%% Adding space %%%%%%%%%
\begin{minipage}{.45\linewidth}
\begin{flushleft}
\tcbox[tcbox width=auto]{PHASES DE DEMONTAGE}
\end{flushleft}
\end{minipage}
\hfill
\begin{minipage}{.45\linewidth}
\begin{flushright}
\tcbox[tcbox width=auto limited]{ATTACHEMENTS}
\end{flushright}
\end{minipage}
\newtcolorbox[auto counter, number within=section]{mybox}[1]{fonttitle=\sffamily\bfseries\large, sidebyside, lefthand width=6.5cm,
enhanced,
title=#1,
overlay unbroken and first ={
\node[anchor=north east,rounded corners,draw=black!80,fill=gray!30,line width=0.5mm,text width=2.5em,align=center,minimum height=4ex] at ([xshift=-\marginparsep]frame.north west) {\thetcbcounter};
}
}
\vspace{10px}
%%%%%%%%%%%%%%%% Phase 1
\begin{minipage}{.45\linewidth}
\begin{flushleft}
\begin{mybox}{Démontage du boitier}
\includegraphics[height=3cm]{Picture2.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture3.jpg}
\tcblower
\underline{Temps:}\\\\ 4 min.\\ 30 sec.
\end{mybox}
\end{flushleft}
\end{minipage}
\hfill
\begin{minipage}{.45\linewidth}
\begin{flushright}
\begin{tcolorbox}[width=4.5cm,
halign=center,valign=center,
square]
\includegraphics[height=3.5cm]{Picture4.JPG}
\end{tcolorbox}
\end{flushright}
\end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% Phase 2
\begin{minipage}{.45\linewidth}
\begin{flushleft}
\begin{mybox}{Démontage de la carte mère}
\includegraphics[height=3cm]{Picture2.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture5.JPG}
\tcblower
\underline{Temps:}\\\\ 1 min.\\ 25 sec.
\end{mybox}
\end{flushleft}
\end{minipage}
\hfill
\begin{minipage}{.45\linewidth}
\begin{flushright}
\begin{tcolorbox}[width=4.5cm,
halign=center,valign=center,
square]
This is a \textbf{tcolorbox}.
\end{tcolorbox}
\end{flushright}
\end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% Phase 3
\begin{mybox}{Démontage du moteur d'ouverture du lecteur}
\includegraphics[height=3cm]{Picture6.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture7.JPG}
\tcblower
\underline{Temps:}\\\\ 45 sec.
\end{mybox}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% Phase 4
\begin{mybox}{Démontage de la tête de lecture}
\includegraphics[height=3cm]{Picture8.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture9.JPG}
\tcblower
\underline{Temps:}\\\\ 1 min.
\end{mybox}
%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
\begin{tcolorbox}[sidebyside, fonttitle=\sffamily\bfseries\large, title={Première étape de démontage}, width=15cm, halign title=flush center]
\includegraphics[height=5cm]{Picture10.JPG}
\tcblower
\underline{Temps total:} 7 min. 30 sec.\\\\
\underline{Eléments démontés:}\\
\begin{itemize}
\item Boitier aluminium
\item Carte mère
\item Support CD plastique
\item Moteur d'ouverture du lecteur
\item Tête de lecture
\end{itemize}
\end{tcolorbox}
\end{center}
%%%%%%%%%%%%%%%% Phase 5
\begin{mybox}{Démontage de la partie métallique}
\includegraphics[height=3cm]{Picture8.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture9.JPG}
\tcblower
\underline{Temps:}\\\\ 30 sec.
\end{mybox}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% Phase 6
\begin{mybox}{Démontage de }
\includegraphics[height=3cm]{Picture8.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture9.JPG}
\tcblower
\underline{Temps:}\\\\ 1 min.
\end{mybox}
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% Phase 7
\begin{mybox}{Démontage de }
\includegraphics[height=3cm]{Picture8.JPG}%
\hspace{10px}\includegraphics[height=3cm]{Picture9.JPG}
\tcblower
\underline{Temps:}\\\\ 1 min.
\end{mybox}
%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
我对此非常满意,但有些地方我想修复。首先是编号。我希望它们是 1、2、3……而不是 0.1、0.2 等(我知道他们这样做是因为我创建了任何标题)。
然后我想添加箭头。其实我不太在意垂直箭头,我认为它们没什么用,但水平箭头很重要,可以显示附件与该阶段相对应。
谢谢你的帮助