기능 블록 그리기
Aug 21 2020
나는 다음과 같은 것을 재현하려고합니다.

그러나 LaTeX n00b로서 나는 텍스트를 내부에 배치하고 아래쪽에 화살표를 배치 할 수 없습니다.
이것이 내가 얼마나 멀리 왔는지입니다.
\begin{tikzpicture}[
start chain=going right,
every join/.style={thick},
node distance=5mm
]
\node [on chain] {Inngang};
\node [on chain,draw,join,xshift=5mm,minimum width=5cm,minimum height=3cm,label=above:Måleomformer] (omformer) {
\tikz\draw (0,0) -- (5cm,3cm);
};
\node [on chain,join,xshift=5mm]{4-20 mA utgang};
\end{tikzpicture}

어떤 도움이라도 대단히 감사하겠습니다!
답변
1 Ignasi Aug 21 2020 at 10:02
이와 같은 것이 작동 할 수 있습니다. 상자 안의 대각선과 텍스트는 path picture
명령으로 추가되었지만 추가 draw
및 node
명령 으로 추가 할 수도 있습니다 . 대신 chain
메인 노드와 그 주위에 다른 모든 노드를 배치했습니다.
\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[
node distance=5mm
]
\node [draw, minimum width=5cm, minimum height=3cm,
label=Måleomformer,
path picture={%
\draw (path picture bounding box.south west)--(path picture bounding box.north east);
\path (path picture bounding box.north west)--node[pos=.25] {Trykk} node[pos=.75] {Strom} (path picture bounding box.south east) ;
}] (omformer) {};
\node[left=of omformer] (inngang) {Inngang};
\node[right=of omformer] (out) {4-20 mA utgang};
\node[below right=of omformer.south west, align=center] (zero) {Nedre\\ malegrense\\ (Zero)};
\node[below left=of omformer.south east, align=center] (span) {Ovre\\ malegrense\\ (Span)};
\draw[->] (inngang)--(omformer);
\draw[->] (zero)--(zero|-omformer.south);
\draw[->] (span)--(span|-omformer.south);
\draw[<-] (out)--(omformer);
\end{tikzpicture}
\end{document}
