## LaTeX forum ⇒ Page Layout ⇒ Header in a document with two column

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
caarloxy
Posts: 1
Joined: Thu Oct 15, 2020 1:50 pm

### Header in a document with two column

Hello everyone,
my problem, I try to import some header with different packages.
I tried {fancyhdr}, \myheaders, and scrlayer-scrpage. However I did not manage to set my headers!
I would like to have a header with the name of the section and a line to divide the header to the text.

As you can see below I used the command \beginn{twocolumn} to have my report in two column, however the table of content has to stay as single column. I think this command causes some struggels with the header.
The footer with the page number was no problem, I used on the first pages Roman numbering, and later on arabic. that is fine how it is and shouldn't be changed.

Happy to get some feedback or improvements.

Peace
caarloXY

\documentclass[10pt, a4paper,twoside]{scrartcl}     %option für seitenränder DIV11 mit Bindekorrektur BCOR5mm                                                    %twocolumn \usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[english]{babel}\usepackage{lmodern}\usepackage{hyperref}\hypersetup{    colorlinks=true,    linkcolor=black,    filecolor=black,          urlcolor=black,    citecolor=black} %\usepackage[numbers]{natbib} \setcounter{secnumdepth}{3}                 %zeigt wietief eine gliederungsebene nummeriert werden soll\usepackage[parfill]{parskip}               %noindent fuer das ganze Doku%\usepackage{geometry}\geometry{a4paper,left=20mm,right=15mm, top=20mm, bottom=25mm}  %mit includehead includefoot seite anpassen   \setlength{\columnsep}{0.6cm}  \usepackage{scrlayer-scrpage}\addto\captionsenglish{\renewcommand{\contentsname}{Table of content}}  %\title{TEXT}%\author{Name}%\date{\today} \begin{document} %\clearpage\maketitle%\thispagestyle{empty}   %keine seitenzahl %\maketitle \input{titlepage.tex}\newpage \pagenumbering{Roman}           %Römische Zahlen   \begin{twocolumn} \section*{Abstract}\input{abstract.tex}\newpage \end{twocolumn}   \begin{onecolumn}\tableofcontents\end{onecolumn}  \begin{twocolumn}       %beginn und end twocolumn für zwei spaltiger text%\pagestyle{} \newpage\pagenumbering{arabic} \section{Introduction}\input{Introduction.tex}                %to insert a tex file \label{sec:intro}\newpage                            %to go on the next page \section{Basics}\input{Basics.tex}\newpage   \end{twocolumn}\end{document}

Ijon Tichy
Posts: 330
Joined: Mon Dec 24, 2018 10:12 am
The shown code is not neither minimal nor working (because of missing files). So it is not a minimal working example and we cannot test it really.

However \onecolumn and \twocolumn are commands not environments. You should not misuse them as environments. See a good introduction to LaTeX how to use them correctly.

Package parskip is a workaround for classes, that do not support paragraph distance instead of paragraph indention. With KOMA-Script classes you should use option parskip or command \setparsizes instead of that package. See the manual for more information.

Sorry for not being more helpful, but with broken code that does not show the problem, it is very hard to help.

### Who is online

Users browsing this forum: No registered users and 5 guests