
그래서 제가 일하는 연구실에서 SEM에 대한 순서도 기반 운영 매뉴얼을 작성 중인데 다른 두 노드에 대해 노드를 정렬하는 데 문제가 있습니다.
벌써 몇 페이지 봤어요[1][2][삼][4]여기서는 동일한 문제를 제시하고 해결책을 시도했지만 성공하지 못했습니다. 누군가가 나를 도울 수 있다면 매우 감사하겠습니다.
이것은 내 MWE입니다.
%%% DOCUMENT SETTINGS %%%
\documentclass[12pt, a3paper]{article} %page type
\usepackage[margin=2cm]{geometry} %margins
\usepackage{setspace}
\usepackage{indentfirst} %indenting package
\setstretch{1.5} %between lines spacement
\setlength{\parindent}{1.5cm} %first line indentation
%page settings
\usepackage{fancyhdr}
\pagestyle{fancy} % seting to use the customizable head and footers
\fancyhf{} % cleaning standard head and footers to use the new one
\rfoot{Autores: Eduardo de Almeida Isoppo;\\Luiz Felipe Pompermaier.} % page number on the footer's right side
\renewcommand{\headrulewidth}{0pt} %remove the line on the headers
\usepackage{float} % tables and figures in multicols.
%font and language configs
\usepackage[brazil]{babel} %letter type
\usepackage[utf8]{inputenc} %normal acentuation
%\usepackage{arial}
% using pseudoarial font Helvetica.
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}
%Reference configs
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=red,
citecolor=black,
filecolor=magenta,
urlcolor=blue,
breaklinks=false,
pdfauthor={Luiz Felipe Pompermaier}
}
%image config
\usepackage{graphicx} % Image using package
%\graphicspath{{Imagens/}} % Image path
\usepackage{caption} % Image, tables, and others captions.
\usepackage{subcaption} % SubImage package. More then one per line.
%math config
\usepackage{amssymb}
\usepackage{amsmath}
% text packages
\usepackage{blindtext} % lorem ipsum
%\usepackage{lipsum}
%\usepackage{titling} % used to make title higger in page
\usepackage{sectsty} % section title
\sectionfont{\fontsize{12}{15}\selectfont} %changing section fontsize
\usepackage{multicol} % multiple columns
\usepackage{xcolor} % coloring text
\usepackage[none]{hyphenat} % no hyphenation
\usepackage{microtype} % better justification
\usepackage{tcolorbox} % text in coloured boxes
% tikz package for flowchart drawings
\usepackage{tikz}
\usepackage{tikz-layers}
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
% Flowchart configs
\tikzstyle{startstop} = [ellipse, minimum width=3cm, minimum height=2cm,text centered, text width=3cm, draw=black, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, aspect=2, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth, line width=2pt]
\newlength{\AL}
\setlength{\AL}{2cm}
\begin{document}
\begin{center}
\Huge \textbf{Fluxograma de Operação do MEV}
\end{center}
\begin{figure}[!htb]
\centering
\begin{tikzpicture}
% Nodes and texts
\node (SftWrk) [decision, below=\AL of ScrnON] {Software está funcionando?};
\node (SftErr) [process, left=\AL of SftWrk] {Chame um Técnico};
\node (VentCb) [process, below=\AL of SftWrk] {Ventilar câmara segurando \textbf{VENT}.};
\node (SmplHd) [process, left=\AL of VentCb, dashed] {Montar Porta-amostras desejado.};
\begin{scope}[on behind layer]
\node (Sample) [io][fit=(SmplHd)]{};
\end{scope}
% Arrows
\begin{scope}[on background layer]
\draw[arrow] (SftWrk) -- node[anchor=south] {\textbf{NÃO}} (SftErr);
\draw[arrow] (SftWrk) -- node[anchor=east] {\textbf{SIM}} (VentCb);
\draw[arrow] (Sample) |- ($(EvacCb)!.5!(VentCb)$);
\draw[arrow] (VentCb) -- +(0,-\AL);
\end{tikzpicture}
\end{figure}
\end{document}
이것이 생성하는 결과입니다(관심 영역에 초점을 맞춤).
그리고 제가 원하는 것은 이 글을 읽는 모든 사람에게 이해가 된다면 (SmplHd)
아래 상자 (SftErr)
와 왼쪽 상자를 정렬하는 것입니다.(VentCb)
그리고 더 명확하게 말하면 at (SftErr|-VentCb)
명령이 작동하지 않습니다.
전체 편집 내용을 확인하세요.https://www.overleaf.com/read/nfyvphkggdny
답변1
편집하다: 약간 수정된 노드 모양 스타일을 두 개 더 추가하여 이미지 조각을 확장합니다.
이와 같이?
이 이미지 조각은 다음 MWE(최소 작업 예제)에 의해 생성됩니다.
\documentclass[12pt, margin=3mm]{standalone} % page type
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[brazil]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
backgrounds,
calc, chains,
fit,
intersections,
positioning,
quotes,
shapes.geometric,
babel
}
% Flowchart config
\makeatletter
\tikzset{
base/.style = {draw=black, semithick, font=\small,
minimum height=9mm, text width=33mm, align=flush center,
outer sep=0pt},
startstop/.style = {base,
ellipse, fill=red!30},
io/.style = {base,
trapezium, trapezium left angle=70, trapezium right angle=110,
fill=blue!30},
process/.style = {base, fill=orange!30},
decision/.style = {base, inner sep=1pt,
diamond, aspect=2, fill=green!30},
arr/.style = {-Stealth, thick},
every edge quotes/.append style = {auto, pos=0.4, font=\footnotesize\bfseries},
suspend join/.code = {\def\tikz@after@path{}} % for use in not showed image part
}
\makeatother
\newlength{\AL}
\setlength{\AL}{12mm}
\begin{document}
\begin{tikzpicture}[
node distance = \AL and \AL,
start chain = going below
]
% first branch (unfinished)
\begin{scope}[nodes = {on chain, join=by arr}]
\node (ScrnON) [process] {Ligar Monitores};
\node (SftWrk) [decision] {Software está funcionando?};
\node (VentCb) [process] {Ventilar câmara segurando \textbf{VENT}.};
\node (EvacCb) [process] {Evacuar câmara segurando \textbf{EVAC}.};
\end{scope}
% left from first branch
\node (SftErr) [process,
left=of SftWrk] {Chame um Technico};
\node (SmplHd) [process, dashed,
at={(SftErr |- VentCb)}] {Montar Porta-amostras desejado.};
\scoped[on background layer]
\node (Sample) [io, fit=(SmplHd)] {};
% second branch (unfinished)
\begin{scope}[nodes = {on chain, join=by arr}]
\node (HeatON) [process, suspend join,
right=2*\AL of ScrnON] {Subir corrente \textbf{devagar} até ponto de saturação.};
\node (SmpLct) [process] {Localizar Amostra a ser analisada.};
\end{scope}
% third branch
% Arrows
\path
(SftWrk) edge ["\textbf{NÃO}" '] (SftErr)
(SftWrk) edge ["\textbf{SIM}"] (VentCb);
\draw[arr]
(SftWrk) -- (SftErr);
\draw[arr]
(Sample) |- ($(VentCb.south)!0.5!(EvacCb.north)$);
\end{tikzpicture}
\end{document}
- MWE에서는 이미지 그리기에 관련되지 않은 모든 내용이 생략됩니다.
- 노드 모양 스타일을 결정하기 위한 최신 구문이 사용됩니다(
\tikzset
obsolete 대신 사용tikzstyle
). - 점선 테두리가 있는 노드의 위치는 위 노드를 통과하는 수직선과 오른쪽 노드를 통과하는 수평선의 교차점에 있습니다. 즉, 입니다
at={(SftErr |- VentCb)}
. - 다른 가지의 노드 위치는 다음에 의해 결정될 예정입니다
chains
(두 번째 체인의 상위 노드 2개만 표시됨). - MWE 코드는 상당히 단순화되었습니다. 매크로를 사용하면
join=by ...
가지 안의 노드들 사이의 모든 연결선이 그려지므로 가지 밖의 노드들과 가지 사이의 노드들에 대해서만 그려야 합니다.