Search code examples
pdfformatlatexpdflatexmulticol

T shaped divider in LaTeX by using multicols


T shaped seperators are not connecting

\documentclass[10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{blindtext}

\usepackage{multicol}

\usepackage{geometry}
 \geometry{
 total={272mm,394mm},
 left=20mm,
 right=20mm,
 top=20mm,
 bottom=20mm
 }
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{0.3mm}

\title{Test}
\date{}

\begin{document}
\maketitle

\begin{multicols}{2}
[
\flushleft{\rule{176mm}{0.3mm}}
]

\blindtext[10]
\end{multicols}

\end{document}

I have tried to make a 'T' shaped divider for a document, but it seems like multicols doesn't support a horizontal line above the columns.

I tried to simulate this effect by using

\flushleft{\rule{176mm}{0.3mm}}

but this doesn't help me out.

Is there any way to erase the gap between the two dividers? or is there a different way to make a 'T' shaped divider?

Also, im curious why the the horizontal length of the \rule is 176mm. the width of the paper is 272mm and the margins in the left and right are 20mm each, so why is the length 176mm instead of 232mm?


Solution

  • You could place your horizontal line before the multicols:

    \documentclass[10pt]{article}
    
    \usepackage[utf8]{inputenc}
    \usepackage{blindtext}
    
    \usepackage{multicol}
    
    \usepackage{geometry}
     \geometry{
    % total={272mm,394mm},
     left=20mm,
     right=20mm,
     top=20mm,
     bottom=20mm
     }
    \setlength{\columnsep}{1cm}
    \setlength{\columnseprule}{0.3mm}
    
    \title{Test}
    \date{}
    
    \begin{document}
    \maketitle
    
    \noindent\rule{\textwidth}{0.3mm}
    
    \vspace*{-0.5cm}
    
    \begin{multicols}{2}
    \blindtext[10]
    \end{multicols}
    
    \end{document}
    

    enter image description here