I'm trying to create a notepad between two columns of text, where someone could write notes referencing either column of text. The code below has a section of text, followed by a section of two-column text (with the notepad between the columns), followed by a section of text. I used multicolrule because it seemed to be close to what I wanted.
There are several problems that I have been unable to figure out.
If I add a SetMCRule command within the multicols section, there is a large space before the text in the multicol section starts printing. Also, it's printing beyond the end of the page, ignoring the end of page.
The tikz code that prints the lines is hardcoded to a specific number of lines. It needs to be able to figure out exactly how many lines, and where to start the ruled section and where to stop it.
Ideally, I would like to add a box (tcolorbox) to create a border for the notepad.
It's quite possible that the multicolrule package is not the best fit, so I'm open to better options.
Note: I'm using lualatex, but I have tried xelatex and there doesn't appear to be any difference.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[tikz]{multicolrule}[2019/10/01]
\usepackage{lipsum}
\usepackage{xcolor}
\usetikzlibrary{calc}
\setlength{\columnsep}{24pt}
\setlength{\columnseprule}{.5pt}
\definecolor{notepadrule}{RGB}{217,244,244}
\begin{document}
\lipsum[1-2]
\setlength{\columnsep}{2in}
\begin{multicols}{2}
\SetMCRule{color=gray,width=0.4pt, expand=2pt, custom-line={
\foreach \fila in {0,...,20}
{
\draw [line width=2pt,color=notepadrule]
(current page.west|-0,-\fila*16pt) -- ++(0.90\columnsep,0);
}
}}
\lipsum[3-7]
\end{multicols}
\setlength{\columnsep}{24pt}
\lipsum[1-2]
\end{document}