Page LayoutTwo Column Layout Column Separator

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
chimanrao
Posts: 8
Joined: Mon Mar 01, 2010 8:39 am

Two Column Layout Column Separator

Post by chimanrao »

hi

In the two column layout how do I change the style of column separator to dotted line?

Chimanrao

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Two Column Layout Column Separator

Post by gmedina »

Hi,

I used the \dottedline command (from the epic package) to achieve the desired result:

Code: Select all

\documentclass[twocolumn]{book}
\usepackage{epic}
\usepackage{lipsum} % just to generate some text

\makeatletter
\def\@outputdblcol{%
  \if@firstcolumn
    \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
  \else
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox {%
                         \hb@xt@\textwidth {%
                           \hb@xt@\columnwidth {%
                             \box\@leftcolumn \hss}%
                           \hfil
                           {\dottedline{4}(5,0)(5,545)}%
                           \hfil
                           \hb@xt@\columnwidth {%
                             \box\@outputbox \hss}%
                                             }%
                              }%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if@fcolmade \fi
        {\@outputpage
         \@startdblcolumn}%
    \endgroup
  \fi
}
\makeatother

\begin{document}

\lipsum[1-40]

\end{document}
Perhaps there's a more elegant solution.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply