# vertical rule between columns containing tikzpicture

I'd like to draw an uninterrupted vertical rule between two columns with one column containing a tikz-picture. I have tried two approaches using the parcolumns package. In the first approach I draw the vertical rule with vrule. This makes the tikz-picture appear on the next page and not in the specified column

\documentclass[10pt]{article}
\usepackage{color}
\usepackage{graphicx}
\usepackage[right=2cm]{geometry}
\usepackage{tikz}
\usepackage{parcolumns}
\usepackage{xcolor}
\usepackage{linegoal}

\begin{document}

\begin{parcolumns}[colwidths={1=.4\textwidth,2=0.1\textwidth}]{3}
\colchunk{

\begin{minipage}{\linewidth}
\begin{tikzpicture}
\node[inner xsep=0pt,text width=\linewidth, top color=blue,bottom color=blue!10]
{\parbox[t]{\linewidth}{\raggedright \hspace{0.6cm}\\  \raggedright  \LARGE \textbf{This is the top.\\}\vspace{8cm} \small \raggedright  \hspace{0.5cm} This is the bottom.\\}};
\end{tikzpicture}
\end{minipage}
}

\colchunk{
\begin{minipage}[t]{\linewidth}
\vrule  height \textheight
\end{minipage}
}

\colchunk{

}
\end{parcolumns}
\end{document}


In the second approach I make use of the rulebetween option of the parcolumns package. There is a clearly visible break in the rule at the top border of the tikz-picture.

\documentclass[10pt]{article}
\usepackage{color}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{parcolumns}
\usepackage{xcolor}
\usepackage{linegoal}

\begin{document}

\begin{parcolumns}[colwidths={1=.4\textwidth},rulebetween=true]{2}
\colchunk{

\begin{minipage}{\linewidth}
\begin{tikzpicture}
\node[inner xsep=0pt,text width=0.9\linewidth, top color=blue,bottom color=blue!10]
{\parbox[t]{\linewidth}{\raggedright \hspace{0.6cm}\\  \raggedright \LARGE \textbf{This is the top.\\}\vspace{8cm} \small \raggedright  \hspace{0.5cm} This is the bottom.\\}};
\end{tikzpicture}
\end{minipage}
}

\colchunk{

}
\end{parcolumns}

\end{document}


I would appreciate any help with either approach.

• Welcome to TeX.SX! Would you care to share with us the goal of this? Is big part of your document with double columns? Just this page? What for are you using this? I ask because maybe you're complicating something simple. :) – Guilherme Zanotelli Dec 13 '16 at 16:16
• if every page is two columns with a rule you can just specify that in the preamble with no coding or packages necessary, or are you actually using parcolumns to get allgned paragraphs elsewhere? – David Carlisle Dec 13 '16 at 18:37

\documentclass[10pt,twocolumn]{article}
\setlength\columnseprule{2pt}
\usepackage{color}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{xcolor}

\begin{document}

\noindent
\begin{tikzpicture}
\node[inner xsep=0pt,text width=\linewidth, top color=blue,bottom color=blue!10]
{\parbox[t][\dimexpr\textheight-7pt]{\linewidth}{\raggedright \hspace{0.6cm}
\LARGE \textbf{This is the top.}\par\vspace{\fill}
\small \hspace{0.5cm} This is the bottom.\par}};
\end{tikzpicture}

\end{document}


Although the question is not very clear. This answer shows how to place a tikzpicture beside a text paragraph with a tcolorbox. Both elements are separated by a vertical solid line. Left and right parts width can be fixed with real dimensions or proportionally. This solution will serve for non breakable boxes.

\documentclass[10pt]{article}
\usepackage{tikz}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\begin{document}

\lipsum[2]

\begin{tcolorbox}[enhanced,
tikz upper, sidebyside,
righthand width=.5\linewidth,
segmentation style={solid},
frame hidden,
boxsep=0pt,
colback=white,
right=0pt,
]
\path[fill=yellow,draw=yellow!75!red]
(0,0) circle (1cm);
\fill[red] (45:5mm) circle (1mm);
\fill[red] (135:5mm) circle (1mm);
\draw[line width=1mm,red]
(215:5mm) arc (215:325:5mm);
\tcblower
\lipsum[2]
\end{tcolorbox}

\end{document}