Page LayoutTitle of a two-column page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Yeth
Posts: 6
Joined: Mon Dec 30, 2019 12:37 pm

Title of a two-column page

Post by Yeth »

Hello,
I have the table of contents written in a two-column page but the rest of the document is not.
I would like to write the title above the two columns and not inside the column.
The figure TOC1 is what I have and TOC is what I want to have.

Yeth
Attachments
TOC1.PNG
TOC1.PNG (40.74 KiB) Viewed 4704 times
TOC.PNG
TOC.PNG (23.08 KiB) Viewed 4704 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Title of a two-column page

Post by Ijon Tichy »

This hardly depends on the used class. Depending on the used class and already used ToC packages you can to use a package like tocbasic or titletoc. Some classes may also provide their own page style interface. So if you need more help, please show us a Infominimal working example.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Yeth
Posts: 6
Joined: Mon Dec 30, 2019 12:37 pm

Title of a two-column page

Post by Yeth »

Thank for your reply.
This is the beginning of my document.


\documentclass[
11pt,
%oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
english,
onehalfspacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents
toctotoc, % Uncomment to add the main table of contents to the table of contents
parskip, % Uncomment to add space between paragraphs
nohyperref, % Uncomment to not load the hyperref package
headsepline, % Uncomment to get a line under the header
%chapterinoneline, % Uncomment to place the chapter title next to the number on one line
consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout
]{article} % The class file specifying the document structure


\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters

\usepackage{arial}


\usepackage{textcomp}

\usepackage{amsmath}


\usepackage[backend=biber
,natbib=true
,style=numeric
,sorting=none
,giveninits=true
,maxcitenames=1
]{biblatex} % Use the bibtex backend with numeric order style


\usepackage{float}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{caption}

\usepackage{lmodern}
\usepackage{xcolor}
\definecolor{tiffanyblue}{rgb}{0.04, 0.73, 0.71}
\definecolor{white}{rgb}{1.0, 1.0, 1.0}

\usepackage[hmargin=2cm,vmargin=2cm]{geometry}

\geometry{a4paper,
top=1in,
bottom=1in,
left=1in,
right=1in,
headheight=14.5pt, % the default is too short
heightrounded, % avoids the need of a flexible baselineskip
}

\usepackage{multicol}

\AtEndDocument{\label{lastpage}}
\usepackage{fancyhdr}

\fancypagestyle{thetitlepage}{
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\includegraphics[scale=0.12]{Logo2.png}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}


\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
\fancyhf{} % clear all fields
\fancyhead[R]{\includegraphics[scale=1]{Logo.png}}%
\fancyfoot[L]{\thepage/\pageref{lastpage}}
\fancyfoot[C]{Livrable }
\fancyfoot[R]{\textbf{\color{violet}{Confidential}}}

\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0.4pt}%
\fancyhf{}% clear all fields
\fancyhead[R]{\includegraphics[scale=1]{Logo.png}}%
\fancyfoot[L]{\thepage/\pageref{lastpage}}
\fancyfoot[C]{Livrable}
\fancyfoot[R]{\textbf{\color{violet}{Confidential}}}}


\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\setlength\textfloatsep{8pt plus 0pt minus 2pt}
\setlength\intextsep{8pt plus 0pt minus 2pt}

\usepackage{color} %May be necessary if you want to color links

\usepackage{hyperref}
%\hypersetup{
%colorlinks=true, %set true if you want colored links
%linktoc=all, %set to all if you want both sections and subsections linked
%linkcolor=blue, %choose some color if you want links to stand out
%}

\usepackage{titlesec}
\titleformat*{\section}{\textcolor{tiffanyblue}}
\titleformat{\section}
{\color{tiffanyblue}\Large}
{\color{tiffanyblue}\thesection}{1em}{}

\renewcommand*\familydefault{\sfdefault}
\usepackage{cuted}

\begin{document}
\makeatletter
\pagecolor[rgb]{0.04, 0.73, 0.71}
\begin{titlepage}
\thispagestyle{thetitlepage}
\vspace*{5cm}
\hspace{-2cm}
\Huge{\textbf{\color{white}{Projet XXXX}}}\\

\vspace*{2cm}
\hspace{-2cm}
\Huge{\textbf{\color{white}{Nom Livrable}}}\\

\vspace*{0.5cm}
\hspace{-2cm}
\huge{\textbf{\color{white}{Version V0}}}\\

\vspace*{0.5cm}
\hspace{-2cm}
\huge{\textbf{\color{white}{Projet de Recherche \& Innovation}}} \\


\end{titlepage}
\makeatother

\pagecolor[rgb]{1.0, 1.0, 1.0}

\vspace*{3.5cm}
\hrule
\renewcommand{\contentsname}{\huge Table of contents}

\begin{multicols}{2}
\tableofcontents
\end{multicols}
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Title of a two-column page

Post by Johannes_B »

This is not a minimal working example, and even worse, the documentclass options do not match the class in use.

They would match that of a template class however. A template i wouldn't recommend using.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Title of a two-column page

Post by Ijon Tichy »

I would suggest to replace class article by report, set option twocolumn and remove \begin[env]multicols[/env] and \end[env]multicols[/env]. And please remove font switches like \huge from terms like \contentsname. This is dangerous and not needed, if you'd use the correct class. BTW: Switchs like \huge do not have arguments. Johannes is absolutely right: the code is a very bad example.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Yeth
Posts: 6
Joined: Mon Dec 30, 2019 12:37 pm

Title of a two-column page

Post by Yeth »

I don't know what minimal means, so I just copied the beginning of the code.
I'm trying to change a template from Word to Latex, so I'm trying to be the most faithful.
I will change the class to report and see.
Thank you for your help.

Yeth
Post Reply