I am having trouble obtaining a single border between two adjoining node shapes with tikz
. When I use a thick
border, it leads to an overlapping double border at the connection of two nodes.
How would one avoid this?
I currently try using the positioning library as well as the chain library.
Which I produce with the following code.
\documentclass{standalone} % standalone
\usepackage{graphicx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{tikz}
\usetikzlibrary{chains,shapes,positioning}
\begin{document}
\tikzstyle{b1} = [rectangle,
fill = red!50,
draw = black, thick,
fill opacity = 0.5, text opacity = 1]
\tikzstyle{b2} = [rectangle,
fill = blue!50,
draw = black, thick,
fill opacity = 0.5, text opacity = 1]
\begin{tikzpicture}[auto,node distance=1cm and 0cm,every node/.style={font=\small}]
\node(A)[b1] at (0,0) {A};
\node(B)[b2,right=of A]{B};
\end{tikzpicture}
\begin{tikzpicture}[start chain,node distance=0mm,every node/.style={font=\small}]
\node[on chain,b1] {A};
\node[on chain,b2] {B};
\end{tikzpicture}
\end{document}
outer sep=0pt
as option of your rectangles help.