Page LayoutHeader in a document with two column

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

Header in a document with two column

Post by caarloxy »

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

Code: Select all

\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}

Recommended reading 2024:

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

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

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Header in a document with two column

Post by Ijon Tichy »

The shown code is not neither minimal nor working (because of missing files). So it is not a Infominimal 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.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply