I have a weird issue with Tikz in particular because my document compiles as it is supposed to on Linux but not on macOS. The Tikz image I am trying to make is this:
Which is what is created on Linux, however on macOS the nodes have a white background, and I simply cannot figure out why.
The code below (minimal working example), is all the code involved when generating the image.
On Linux I use the newest latex in the fedora package repository and on macOS I use the newest MacTex.
Any ideas why this is happening?
\documentclass[svgnames]{standalone}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{lmodern}
\usetikzlibrary{shadows}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{shadings}
\tikzset{
double color fill/.code 2 args={
\pgfdeclareverticalshading[%
tikz@axis@top,tikz@axis@middle,tikz@axis@bottom%
]{diagonalfill}{100bp}{%
color(0bp)=(tikz@axis@bottom);
color(50bp)=(tikz@axis@bottom);
color(50bp)=(tikz@axis@middle);
color(50bp)=(tikz@axis@top);
color(100bp)=(tikz@axis@top)
}
\tikzset{shade, left color=#1, right color=#2, shading=diagonalfill}
}
}
\tikzstyle{node-base}=[circle, draw, align=center, font=\footnotesize, minimum size=1.3cm]
\tikzstyle{dc-node}=[node-base, double color fill={AntiqueWhite}{LightBlue}, shading angle=45]
\tikzstyle{label}=[align=center]
\begin{document}
\begin{tikzpicture}
\node[dc-node] (n1) at (0, 0) {N$_1$};
\node[dc-node] (n2) at (2.5, -.5) {N$_2$};
\node[dc-node] (n3) at (2.5, -2.5) {N$_3$};
\node[dc-node] (n4) at (0, -3) {N$_4$};
\node[dc-node] (n5) at (-2.5, -2.5) {N$_5$};
\node[dc-node] (n6) at (-2.5, -.5) {N$_6$};
\node[label, rotate=-20] (lbl) at (-1.25, -3) {$\cdots$};
\draw (n1) to[bend right=4] (n2);
\draw (n1) to[bend right=4] (n3);
\draw (n1) to[bend left=4] (n6);
\draw (n1) to[bend left=4] (n5);
\draw (n1) -- (n4);
\draw (n2) to[bend left=4] (n3);
\draw (n2) to[bend left=10] (n4);
\draw (n2) to[bend left=10] (n5);
\draw (n2.north) to[bend right=35] (n6.north);
\draw (n3) to[bend right=4] (n4);
\draw (n3.south) to[bend left=35] (n5.south);
\draw (n3) to[bend left=10] (n6);
\draw (n4) to[bend right=4] (n5);
\draw (n4) to[bend left=10] (n6);
\draw (n5) to[bend left=4] (n6);
\end{tikzpicture}
\end{document}

\listfilesand compare the file lists on the two systems for version differences – David Carlisle Jan 06 '22 at 08:04diagonal fillstyle from TikZ: Rectangle with diagonal fill (two colors) instead ofdouble color filldoes work. – Peter Grill Jan 06 '22 at 08:12