
방금 페도라 버전 32에서 버전 33으로 업그레이드했습니다. 따라서 Tikz가 업데이트되었습니다(3.1.4b에서 3.1.5b로). 이 변경으로 인해 이 그림은 더 이상 컴파일되지 않습니다(저는 Lualatex를 사용합니다).
\documentclass{minimal}
\usepackage[french]{babel}
\usepackage{xcolor}
\definecolor{RdBu-9-1}{RGB}{178,24,43}
\definecolor{RdBu-9-2}{RGB}{214,96,77}
\definecolor{RdBu-9-8}{RGB}{67,147,195}
\definecolor{RdBu-9-9}{RGB}{33,102,172}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{matrix}
\usetikzlibrary{decorations.pathreplacing}
\tikzset{%
ffa/.style={%
pattern=north west lines,
pattern color=RdBu-9-2,
draw=none
},
ffc/.style={%
draw=RdBu-9-1,
line width=1}
}
\usepackage[babel, autostyle]{csquotes}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of nodes,
anchor=west,
nodes={minimum size=.75cm}
] (zla0) at (0,0)
{
\draw[ffa,ffc] (0,0) circle (.3cm);&
\draw[ffa,ffc] (0,0) circle (.3cm);\\
};
\matrix [matrix of nodes,
anchor=north,
nodes={minimum size=.75cm},
below=2cm of zla0] (zlb0)
{
\draw[ffa,ffc] (0,0) circle (.3cm);\\
};
\foreach \m in {0} {
\draw (zla\m.south west) |- ($(zla\m.south west)!0.5!(zla\m.south
east) + (0,-.1)$) -| (zla\m.south east) node[pos=0, yshift=.2]
(zla\m-g) {};
%
\draw (zlb\m.north west) |- ($(zlb\m.north west)!0.5!(zlb\m.north
east) + (0,.1)$) -| (zlb\m.north east) node[pos=0, yshift=.2]
(zlb\m-g) {};
%
\draw[->>, black,] ([yshift=-.2cm]zla\m.south) -- ([yshift=.2cm]zlb\m.north);
}
\draw[|-, black] ([yshift=1.25cm]zla0-1-2.north) -- (zla0-1-2.north)
node[pos=.6,fill=white, minimum size=.75cm]{};
\node[above=0cm of zla0-1-1.north, anchor=south, align=center,
font=\tiny, text width=1.75cm]{\enquote{Je suis proche du \emph{Pic
Jean Ray}}};
\node[above=1.25cm of zla0-1-2.north, anchor=south, align=center,
font=\tiny, text width=1.75cm]{\enquote{Je suis sous une \emph{crête}}};
\node[below=0cm of zlb0.south, anchor=north, align=center,
font=\tiny, text width=4cm]{\enquote{Je suis proche du \emph{Pic
Jean Ray} et sous une crête}};
\node[fill=white,align=center, font=\large\sffamily] at ($(zla0.south east)!0.5!(zlb0.north
west)$){\emph{Fusion} des \emph{indices de localisation}};
\end{tikzpicture}
\end{document}
컴파일할 때 다음과 같은 오류가 발생합니다.
ERROR: Package pgf Error: No shape named `zla0-1-2' is known.
tikz 저장소에서 검색하여 문제를 확인했습니다. 파생물(예: ) matrix of nodes
을 포함하는 a의 셀은 직접 처리되고 (\path
\draw
node
원천). 그런데 왜 ferora 32에서 작동하던 이 코드가 더 이상 작동하지 않는지 알 수 없었습니다. (tikz에서 어떤 정보도 찾을 수 없었습니다.)변경 로그또는 다른 것).
이 수치를 다시 작동하게 만드는 가장 좋은 솔루션은 무엇입니까? 이 구성표(예를 들어 이 구성표가 가장 간단함)를 기반으로 구축된 여러 그림이 있고 이러한 수정 작업을 수행할 시간이 거의 없다는 것을 알고 있습니다.
가장 좋은 방법은 이전 작업 방식으로 전환할 수 있는 옵션이 있으면 좋겠지만 문서에서 비슷한 내용을 찾지 못했습니다.
추신: 프랑스어로 같은 질문을 한 적이 있습니다.여기, 거기에 답변이 있으면 여기에 게시하고 그 반대의 경우도 마찬가지입니다.
답변1
단순한 노드가 아닌 TikZ 행렬의 셀에는 이름이 없습니다. ( matrix of nodes
with 셀에 있는 노드라도 \node
이름을 지정하지 않으면 이름이 없습니다.)
그런 실제 노드를 사용하는 것 외에도
\matrix [
matrix of nodes,
anchor=west,
nodes in empty cells,
nodes={ffa, ffc, circle, minimum size=.6cm}
] (zla0) at (0,0) { & \\};
\draw
그러면 TikZ가 각 셀의 경계 상자 주위에 단단한 직사각형 노드를 설치하도록 할 수 있는 것과 동일한 원을 셀에 넣을 수 있습니다 . 물론 셀 내부의 실제 요소를 참조할 수는 없습니다. (노드가 아니고 이름을 지정하지 않는 한)
키 는 모든 셀 끝에 install fitted node at end cell
필요한 것을 설치합니다 . \node
이 \path[every node/.code]
부분은 키에서 어떤 스타일도 상속받지 않도록 합니다 every node
. 이러한 노드 에는 의 실제 노드와 충돌이 없도록 이름이 지정됩니다 <matrix name>-<row>-<column>'
( 참고 ) .'
matrix of node
나는 또한 current bounding box
별칭을 제공하거나 local bounding box
모든 셀에 대해 a를 설치하려고 시도했지만 실제 노드(나중에 사용됨)를 특수 매트릭스 후크에 설치하여 매트릭스 다음에 해당 위치를 알 수 있도록 해야 하기 때문에 더 많은 작업이 필요합니다. 그럼에도 불구하고 선 너비는 고려되지 않았습니다.
암호
\documentclass[tikz]{standalone}
\usepackage[french]{babel}
\definecolor{RdBu-9-1}{RGB}{178,24,43}
\definecolor{RdBu-9-2}{RGB}{214,96,77}
\definecolor{RdBu-9-8}{RGB}{67,147,195}
\definecolor{RdBu-9-9}{RGB}{33,102,172}
\usetikzlibrary{patterns, calc, positioning, arrows, matrix, fit}
\tikzset{% This is the new key.
install fitted node at end cell/.style={
execute at end cell={%
\path[every node/.code=] node[shape=rectangle, fit=(current bounding box),
inner sep=+0pt, minimum size=+0pt, outer sep=+0pt, name=\tikzmatrixname-%
\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn']{};}}}
\tikzset{
ffa/.style={pattern=north west lines, pattern color=RdBu-9-2, draw=none},
ffc/.style={draw=RdBu-9-1, line width=1}}
\usepackage[babel, autostyle]{csquotes}
\begin{document}
\begin{tikzpicture}[radius=.3cm]
\matrix [
install fitted node at end cell, % ← Here's the new key used.
anchor=west] (zla0) at (0,0) {
\draw[ffa,ffc] (0,0) circle []; &
\draw[ffa,ffc] (0,0) circle []; \\};
\matrix [below=2cm of zla0] (zlb0) {\draw[ffa,ffc] (0,0) circle [];\\};
\foreach \m in {0} {
\draw (zla\m.south west)
|- ($(zla\m.south west)!0.5!(zla\m.south east) + (0,-.1)$)
-| (zla\m.south east) node[pos=0, yshift=.2] (zla\m-g) {};
\draw (zlb\m.north west)
|- ($(zlb\m.north west)!0.5!(zlb\m.north east) + (0,.1)$)
-| (zlb\m.north east) node[pos=0, yshift=.2] (zlb\m-g) {};
\draw[->>, black,] ([yshift=-.2cm]zla\m.south) -- ([yshift=.2cm]zlb\m.north);
}
\draw[|-, black] ([yshift=1.25cm]zla0-1-2'.north) -- (zla0-1-2')
node[pos=.6,fill=white, minimum size=.75cm]{};
\node[above=0cm of zla0-1-1'.north, anchor=south, align=center, font=\tiny,
text width=1.75cm]{\enquote{Je suis proche du \emph{Pic Jean Ray}}};
\node[above=1.25cm of zla0-1-2'.north, anchor=south, align=center, font=\tiny,
text width=1.75cm]{\enquote{Je suis sous une \emph{crête}}};
\node[below=0cm of zlb0.south, anchor=north, align=center, font=\tiny,
text width=4cm]{
\enquote{Je suis proche du \emph{Pic Jean Ray} et sous une crête}};
\node[fill=white, align=center, font=\large\sffamily]
at ($(zla0.south east)!0.5!(zlb0.north west)$)
{\emph{Fusion} des \emph{indices de localisation}};
\end{tikzpicture}
\end{document}