![tikz-Figure를 텍스트 너비(svjour3 템플릿)의 하위 파일로 조정하시겠습니까?](https://rvso.com/image/420741/tikz-Figure%EB%A5%BC%20%ED%85%8D%EC%8A%A4%ED%8A%B8%20%EB%84%88%EB%B9%84(svjour3%20%ED%85%9C%ED%94%8C%EB%A6%BF)%EC%9D%98%20%ED%95%98%EC%9C%84%20%ED%8C%8C%EC%9D%BC%EB%A1%9C%20%EC%A1%B0%EC%A0%95%ED%95%98%EC%8B%9C%EA%B2%A0%EC%8A%B5%EB%8B%88%EA%B9%8C%3F.png)
svjour3 문서 스타일을 사용해야 합니다. 내 문서에는 다른 파일/챕터에서 생성한 오류 트리를 포함해야 합니다. 내 문제: 안타깝게도 트리가 문서의 일반 너비/텍스트 너비에 맞게 조정되지 않습니다(그림 참조).
이것은 내 현재 코드입니다.
\documentclass[smallextended]{svjour3}
\usepackage{tikz}
\usetikzlibrary{matrix,calc,circuits,calc,arrows,positioning}
\usetikzlibrary{circuits.logic.US}
\usepackage{tikz-timing}
\def\degr{${}^\circ$}
\usepackage{subfiles}
\usepackage{blindtext}
\begin{document}
\blindtext
\subfile{Chapters/extension fault tree}
\blindtext
\end{document}
나는 다음과 같은 것을 시도했지만 \subfile[width=\textwitdh]{...}
작동하지 않았습니다. 누구든지 나를 도울 수 있습니까? 정말 감사하겠습니다! :) 건배!
편집: 트리의 코드:
\documentclass[../template.tex]{subfiles}
\begin{document}
\begin{tikzpicture}
[
% Gates and symbols style
and/.style={and gate US,thick,draw,fill=orange!60,rotate=90,
anchor=east,xshift=-1mm},
or/.style={or gate US,thick,draw,fill=blue!60,rotate=90,
anchor=east,xshift=-1mm},
be/.style={circle,thick,draw,fill=green!60,anchor=north,
minimum width=0.7cm},
tr/.style={buffer gate US,thick,draw,fill=purple!80,rotate=90,
anchor=east,minimum width=0.8cm},
% Label style
label distance=3mm, every label/.style={blue},
% Event style
event/.style={rectangle,thick,draw,fill=yellow!20,text width=2cm, text centered,font=\sffamily,anchor=north},
% Children and edges style
edge from parent/.style={very thick,draw=black!70},
edge from parent path={(\tikzparentnode.south) -- ++(0,-1.05cm)-| (\tikzchildnode.north)},
level 1/.style={sibling distance=4cm,level distance=1.5cm, growth parent anchor=south,nodes=event},
level 2/.style={sibling distance=3cm, level distance=1.5cm},
level 3/.style={sibling distance=2.5cm, level distance=1.5cm},
level 4/.style={sibling distance=3cm}
]
%% Draw events and edges
\node (g1) [event] {Extension failure \\ E0}
child{node (e1) {Locks \\(Le)}
child {node (e11) {Door Lock \\ (DL)}
%child {node (e111) {Door Lock \\ (E11)}}
%child {node (e112) {Door Lock \\ (E11)}}
% child {node (e113) {Shuttle Valve \\ (E11)}}
}
child {node (e12) {Uplock \\ (UL)}
%child {node (e121) {Leak \\ (E11)}}
%child {node (e122) {Fail to close \\ (E11)}}
%child {node (e123) {Shuttle Valve \\ (E11)}}
}
}
child [level distance=50mm] {node (e2) {Pressure Supply\\ (PSe)}
child [sibling distance=8cm] {node (e21) {Main System\\ (PSMe)}
child {node (e211) {Lose of pressure\\ (HPe1)}}
child {node (e212) {Valve fails to open\\ (IVe)}}
child {node (e213) {Wrong position\\ (SVe)}}
}
child [sibling distance=8cm] {node (e22) {Emergency System\\ (PSEe)}
child {node (e221) {Lose of pressure\\ (HPe2)}}
child {node (e222) {Shuttle Valves\\ (SHUV)}
child {node (e2221) {SHUVe1a}}
child {node (e2222) {SHUVe1b}}
child {node (e2223) {SHUVe1c}}
child {node (e2224) {SHUVe1d}}
}
child {node (e223) {Valve fails to open\\ (EVe)}}
}
}
child{node (e3) {Actuators \\(A)}
child {node (e31) {Door \\ (DA)}}
child {node (e32) {MLG \\ (RA)}}
}
child {node (e4) {Pipe Blockage \\ (HPe)}
};
% Remove what follows if no gates are required
\node [or] at (g1.south) [] {};
\node [or] at (e1.south) [] {};
\node [and] at (e2.south) [] {};
\node [or] at (e3.south) [] {};
\node [be] at (e4.south) [] {};
\node [tr] at (e11.south) [] {};
\node [tr] at (e12.south) [] {};
\node [or] at (e21.south) [] {};
\node [or] at (e22.south) [] {};
\node [tr] at (e31.south) [] {};
\node [tr] at (e32.south) [] {};
\node [be] at (e211.south) [] {};
\node [be] at (e212.south) [] {};
\node [be] at (e213.south) [] {};
\node [be] at (e221.south) [] {};
\node [or] at (e222.south) [] {};
\node [be] at (e223.south) [] {};
\node [be] at (e2221.south) [] {};
\node [be] at (e2222.south) [] {};
\node [be] at (e2223.south) [] {};
\node [be] at (e2224.south) [] {};
\end{tikzpicture}
\begin{tikzpicture}
[
tr/.style={buffer gate US,
thick,
draw,
fill=purple!80,
rotate=90,
inner sep=0pt,
outer sep=0pt,
minimum width=0.8cm},
event/.style={rectangle,
thick,
draw,
fill=yellow!20,
text width=2cm,
text centered,
font=\sffamily,
anchor=north
},
be/.style={circle,thick,draw,fill=green!60,anchor=north,
minimum width=0.7cm},
or/.style={or gate US,thick,draw,fill=blue!60,rotate=90,
anchor=east,xshift=-1mm},
]
\node (g1) [tr] {};
\draw[line width=1pt] ($(g1.south)+(-3pt,6pt)$) --++(0.5cm,0pt) --+(0,-2cm)
node[below,event] (b){DLe1/ULe1 \\ DAe1/Rae2};
\node[event, left=of b] (c){DLe2/ULe2 \\ Dae2/Rae1};
\node[event, right=of b] (d){SHUVe2 a/b/c/d};
\draw[line width=1pt] ($(b.north)+(0pt,6pt)$) -|(c);
\draw[line width=1pt] ($(b.north)+(0pt,6pt)$) -|(d);
\node [or] at (g1.west) [above=of b, yshift=-0.3cm] {};
\node [be] at (b.south) [] {};
\node [be] at (c.south) [] {};
\node [be] at (d.south) [] {};
\end{tikzpicture}
\end{document}