0

I'd like to add two columns at the top of my first page, before the title of my article. It should look like this (I only highlighted the top with a red rectangle to show what I want to achieve):

Two columns before the title

My current code looks like this:

\documentclass[a4paper, 12pt]{article}

\title{SPSS opdracht Kansrekening en Statistiek}
\author{Eerste zittijd}

\begin{document}
\maketitle

Here is some text...

\tableofcontents
\newpage

\end{document}

How can I work further with this?

(For those who understand Dutch: don't mind the meaning of the text. Of course "Eerste Zittijd" is not the author. I'm just adapting it to the screenshot.)

  • Which class of document do you use? Do you make your own title page or the \maketitle command? – Bernard May 31 '14 at 22:20
  • @Bernard: I'm using the article class. – Jeroen May 31 '14 at 22:33
1

Next time, please remember that all questions should include a minimal working example (MWE) which illustrates the problem or demonstrates what you have already tried and your basic set up.

Here is a basic solution for the article class which you can adapt as appropriate for your own situation:

\documentclass{article}
\usepackage{titling}
\usepackage{calc}
\newcommand*{\myinstitution}{}
\newcommand*{\institution}[1]{%
  \renewcommand*{\myinstitution}{#1}}
\newcommand*{\myacyear}{}
\newcommand*{\acyear}[1]{%
  \renewcommand*{\myacyear}{#1}}

\title{The Title}
\author{The Author}
\institution{Author's Institution}
\acyear{Academic Year YYYY--YYYY}

\renewcommand{\maketitlehooka}{%
  \noindent\parbox{\linewidth}{\myinstitution\hfill\myacyear}}

\begin{document}
\maketitle

\end{document}

Additional headings

Use \institution{} and \acyear{} to set the contents in the left and right of the boxed material.

Here is a version which includes the red frame as I only just realised you don't actually want that (and it might be useful to somebody, at least in another colour):

\documentclass{article}
\usepackage{titling}
\usepackage{efbox,calc}
\newcommand*{\myinstitution}{}
\newcommand*{\institution}[1]{%
  \renewcommand*{\myinstitution}{#1}}
\newcommand*{\myacyear}{}
\newcommand*{\acyear}[1]{%
  \renewcommand*{\myacyear}{#1}}

\title{The Title}
\author{The Author}
\institution{Author's Institution}
\acyear{Academic Year YYYY--YYYY}

\newlength{\myboxwidth}
\setlength{\myboxwidth}{\linewidth-2\fboxrule-2\fboxsep}

\renewcommand{\maketitlehooka}{%
  \noindent\efbox[linecolor=red]{%
    \parbox{\myboxwidth}{\myinstitution\hfill\myacyear}}}

\begin{document}
\maketitle

\end{document}

Red box in title

1

Here is an another solution using {tabular*} environment:

\documentclass[12pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}
\begin{titlepage}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here

\center % Center everything on the page

%----------------------------------------------------------------------------------------
%   HEADING SECTIONS
%----------------------------------------------------------------------------------------
\textsc{\LARGE University Name}\\[1.5cm] % Name of your university/college
\textsc{\Large Major Heading}\\[0.5cm] % Major heading such as course name
\textsc{\large Minor Heading}\\[0.5cm] % Minor heading such as course title
%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------
\begin{center}
\begin{table}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}lr}
  Author's Institution & Academic Year YYYY--YYYY
  \end{tabular*}
\end{table}
\end{center} 
\HRule \\[0.4cm]
{ \huge \bfseries Title}\\[0.4cm] % Title of your document
\HRule \\[1.5cm]
\vfill % Fill the rest of the page with whitespace
\end{titlepage}
\end{document}

enter image description here

1

With the swiss army knife called tikz:

\documentclass[a4paper, 12pt]{article}
\usepackage{tikz}

\title{SPSS opdracht Kansrekening en Statistiek}
\author{Eerste zittijd}

\begin{document}
\maketitle
%% put this after \maketitle and this placement is important
\begin{tikzpicture}[remember picture,overlay]
  \node[draw=red,thick,minimum width=\textwidth,text width=\textwidth] at ([yshift=-1in]current page.north) {Author's Institution \hfill Academic Year YYYY--YYYY};
\end{tikzpicture}

Here is some text...

\tableofcontents
\newpage

\end{document}

enter image description here

This needs at least 2 compilation runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.