3

I am trying to make a document that partially mimics the output of macOS's Calendar.app "List" print format, which looks like this:

screenshot of top of model document

The part I am interested in here is connecting the column separating rule to the horizontal rule. This also happens similarly at the bottom of the page.

(Note that although this looks a bit tabular, in my application, there will be varying amounts of text under each heading.)

Here is my attempt so far:

\documentclass[12pt]{article}
\usepackage[vmargin=0.5in, hmargin=0.25in, footskip=0.25in]{geometry}
\usepackage{microtype}
\usepackage{multicolrule}
    \SetMCRule{width=0.4pt, line-style=solid, extend-fill, extend-top=1ex}
    %\setlength{\multicolsep}{0pt}
\usepackage{lastpage}
\usepackage{fancyhdr}
    \fancyhead[L,C,R]{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyfoot[L,C]{}
    \fancyfoot[R]{\footnotesize Page \thepage/\pageref{LastPage}}
    \renewcommand{\footrulewidth}{0.4pt}
    \pagestyle{fancy}

\renewcommand{\familydefault}{\sfdefault}
\setlength{\parindent}{0pt}

\begin{document}
{\LARGE\bfseries Header}

%\rule[-2.5pt]{\textwidth}{0.4pt}
\rule{\textwidth}{0.4pt}

\begin{multicols*}{2}
    {\Large\bfseries Section Head}\\\smallskip
    \textbf{Some details}\\
    \textbf{Location:} Other, less important details\\
    more less important details\\\smallskip

    \textbf{Some details}\\
    \textbf{Location:} Other, less important details\\
    more less important details\\\smallskip
    \hspace{\fill}\rule{0.95\columnwidth}{0.4pt}\hspace{\fill}

    {\Large\bfseries Second Section}\\\smallskip
    etc.
\end{multicols*}
\end{document}

I have used multicolrule's option extend-fill to bring the colseprule to the bottom of the page and its extend-top option to give the initial text a bit of breathing room.

I have used \rule to create the rule at the top of the page and have experimented with different drop values to make the lines intersect, but when I started doing a binary search between 1pt and 5pt I decided that such an approach was too brittle.

For the bottom rule, I've tried to use fancyhdr's foot rule, which unfortunately offers no configuration hooks other than its width. I experimented with redefining the command that typesets the rule but again found myself taking the brittle approach I rejected for the top rule.

Is there a better way to make this happen?

1
  • 1
    Note that the extend-fill option is intended for a regular multicols environment and won't affect multicols*. If you use extend-top=2pt, extend-bot=1pt along with the -2.5pt shift of the upper rule, it should look right, but that doesn't address your brittleness problem.
    – Karl Hagen
    Feb 7, 2019 at 22:57

1 Answer 1

2

You could use the custom-line option of multicolrule to draw the horizontal rules along with the vertical one. This requires using tikz:

\documentclass[12pt]{article}
\usepackage[vmargin=0.5in, hmargin=0.25in, footskip=0.25in]{geometry}
\usepackage{microtype}
\usepackage[tikz]{multicolrule}
\usetikzlibrary{calc}
\usepackage{lastpage}
\usepackage{fancyhdr}
\fancyhead[L,C,R]{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[L,C]{}
\fancyfoot[R]{\footnotesize Page \thepage/\pageref{LastPage}}
\pagestyle{fancy}

\renewcommand{\familydefault}{\sfdefault}
\setlength{\parindent}{0pt}

\SetMCRule{width=0.4pt, extend-top=2pt, extend-bot=-2pt, custom-line={
    \coordinate (TOPLEFT) at ($(TOP)-(\columnwidth+.5\columnsep,\columnseprule)$);
    \coordinate (TOPRIGHT) at ($(TOP)+(\columnwidth+.5\columnsep,-\columnseprule)$);
    \coordinate (BOTLEFT) at ($(BOT)-(\columnwidth+.5\columnsep,-\columnseprule)$);
    \coordinate (BOTRIGHT) at ($(BOT)+(\columnwidth+.5\columnsep,\columnseprule)$);
   \draw[line width=\columnseprule] (TOPLEFT) -- (TOPRIGHT)
   (TOP) -- (BOT) (BOTLEFT) -- (BOTRIGHT);}}

\begin{document}
  {\LARGE\bfseries Header}

\begin{multicols*}{2}
    {\Large\bfseries Section Head}\\\smallskip
    \textbf{Some details}\\
    \textbf{Location:} Other, less important details\\
    more less important details\\\smallskip

    \textbf{Some details}\\
    \textbf{Location:} Other, less important details\\
    more less important details\\\smallskip
    \hspace{\fill}\rule{0.95\columnwidth}{0.4pt}\hspace{\fill}

    {\Large\bfseries Second Section}\\\smallskip
    etc.
  \end{multicols*}
\end{document}

Result:

enter image description here

1
  • This is exactly what I needed! I'm not sure why I didn't consider the custom rule option--somehow it was stuck in my head as something that had to stay as a mostly vertical line. Thank you for rectifying that misunderstanding. Feb 8, 2019 at 21:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .