Page LayoutTitle page: Different margin, font size and line spacing

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Mimi_Mikhail
Posts: 10
Joined: Sat May 02, 2015 11:22 am

Title page: Different margin, font size and line spacing

Post by Mimi_Mikhail »

Hi!

The setting for my title page is different from the rest of the document.
Margin
Title page:lmargin=4cm,rmargin=4cm,tmargin=5cm,bmargin=5cm
Other pages:lmargin=4cm,rmargin=2cm,tmargin=2cm,bmargin=2cm

Font size
Title page:14pt
Other pages:12pt

Line spacing
Title page:1.15
Other pages:Double

I've done some research and below is my MWE. However, I'm still unconvinced if I've used the codes correctly to achieve these settings. By the way, I've tried using \newgeometry and \restoregeometry but they gave me the error Undefined control sequence.

Code: Select all

\documentclass[a4paper,12pt]{report}

\usepackage[a4paper,lmargin=4cm,rmargin=2cm,tmargin=2cm,bmargin=2cm]{geometry}

\usepackage{lipsum}

\usepackage{setspace}
\doublespacing

\usepackage{mathptmx} %for Times New Roman

\usepackage{chngpage}

\begin{document}

\begin{titlepage}
\newcommand{\bigsize}{\fontsize{14pt}{\baselineskip}\selectfont}
\setstretch{1.15}
\begin{adjustwidth}{}{2cm}
\vspace*{3cm}
\enlargethispage{-3cm}
\begin{center}

{\bigsize\bfseries TITLE OF DISSERTATION}

\vspace{7cm}
{\bigsize\bfseries NAME OF CANDIDATE}

\vspace{3.3cm}
{\bigsize\bfseries DISSERTATION SUBMITTED IN FULFILMENT}\\
{\bigsize\bfseries OF THE REQUIREMENTS FOR THE DEGREE OF}\\
{\bigsize\bfseries NAME OF PROGRAMME}

\vspace{2.4cm}
{\bigsize\bfseries NAME OF FACULTY}\\ 
{\bigsize\bfseries NAME OF UNIVERSITY}\\ 
{\bigsize\bfseries COUNTRY}

\vfill
{\bigsize\bfseries 2015}

\end{center}
\end{adjustwidth}
\end{titlepage}

\chapter{Introduction}
\lipsum

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Title page: Different margin, font size and line spacing

Post by Johannes_B »

I am glad that you are providing meaningful examples. That is reallly nice, keep it up ;-)

A titlepage is something that is pretty static. It won't every day. You can savely use another tex-document to produce just the titlepage. The extclasses provide you with the option of extended type sizes, so no fiddling around with the baselineskip.

Later, in your real document, you can include the titlepage.pdf using package pdfpages.
The feature to set a completely new layout using package geometry can be both, a blessing and a curse. If you don't have to use it, don't.

Right now, the example below will create a two-page titlepage, since the vertical spaces now don't match up. You need to adjust the a little bit.

Code: Select all

\documentclass[14pt]{extarticle}
\usepackage{geometry}
\usepackage{setspace}
\geometry{lmargin=4cm,rmargin=4cm,tmargin=5cm,bmargin=5cm,showframe}
\usepackage{newtxtext}
\begin{document}
\begin{titlepage}
%	\setstretch{1.15}
	\begin{center}
		\bfseries

		TITLE OF DISSERTATION

		\vspace{7cm}
		NAME OF CANDIDATE

		\vspace{3.3cm}
		DISSERTATION SUBMITTED IN FULFILMENT\\
		OF THE REQUIREMENTS FOR THE DEGREE OF\\
		NAME OF PROGRAMME

		\vspace{2.4cm}
		NAME OF FACULTY\\
		NAME OF UNIVERSITY\\
		COUNTRY

		\vfill
		2015

	\end{center}
\end{titlepage}
\end{document}
As you may notice, i replaced the font package with a different one. It should give better results, please check it out.


Now that you are including an extra page, pay attention to the page counter. The titlepage environment of the standard classes behaves in quite a strange way ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Mimi_Mikhail
Posts: 10
Joined: Sat May 02, 2015 11:22 am

Re: Title page: Different margin, font size and line spacing

Post by Mimi_Mikhail »

Johannes,

I've printed out the output but the bottom margin is more than 5cm.

-Mimi
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Title page: Different margin, font size and line spacing

Post by Johannes_B »

Have you checked using package showframe or the showframe option of package geometry? You have to take care of the foot, as it is or is not with in those 5 cm. I always foget it and don't have a printer available.

On the other hand, it is quite possible that your printer does some sort of auto scaling. I bet 90 percent of all my margins don't match are caused by over-motivated printer drivers.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Mimi_Mikhail
Posts: 10
Joined: Sat May 02, 2015 11:22 am

Title page: Different margin, font size and line spacing

Post by Mimi_Mikhail »

I checked the margins using the package showframe and yes, the footer is not within the 5cm of the bottom margin. So, I've included footskip=0cm (or includefoot,foot=0cm) in the options.

As with the package newtx, it gave me the error Package etoolbox Error: Not running under e-TeX. I've searched online for a solution, but with no success. I guess I have to settle for times or mathptmx.

Lastly, I've managed to include the titlepage.pdf by using pdfpages.

Thank you!! :D
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Title page: Different margin, font size and line spacing

Post by Johannes_B »

I thought of using TikZ to draw a grid on the page. It is somehow distorted, please don't ask me why. Took me half an hour experimenting with my limited TikZ knowledge. According to the grid, both, left and bootom margin are correct.
If there really is some scaling involved by the printer, the little squares would not be 1cm by 1cm. Can you check that?
I am pretty sure this is the printer driver, if not, i am running out of ideas.

Code: Select all

\documentclass[14pt]{extarticle}
\usepackage{geometry}
\usepackage{tikz}
\geometry{lmargin=4cm,rmargin=4cm,tmargin=5cm,bmargin=5cm,showframe}
\begin{document}
\begin{titlepage}
	\begin{tikzpicture}[remember picture, overlay]
		\draw[help lines, step=1cm] (current page.south west) grid ++(10cm,5cm);
		\draw[help lines, step=1cm] (current page.south west) grid ++(4cm,8cm);
	\end{tikzpicture}
test
\end{titlepage}
\end{document}
Ah, in the meantime you have edited your post. Good that you solved that.

But i have something serious for you. The e-TeX extension is included in the main distributions for over ten years. If your installation that old? I cannot believe that. I think you are still at the beginning of your project, i would suggest to get a very fresh install of TeX Live. Right now, TeX Live 2014 is frozen and the team is preparing everything for the next release, expected next month. But you definitely need a modern setup.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Mimi_Mikhail
Posts: 10
Joined: Sat May 02, 2015 11:22 am

Title page: Different margin, font size and line spacing

Post by Mimi_Mikhail »

Johannes,

Guess what?! I totally forgot about a4paper. :( Sorry about that. So, I've put this code shown below in both of your MWE and printed them out. All margins are as set!

Code: Select all

\geometry{a4paper,lmargin=4cm,rmargin=4cm,tmargin=5cm,bmargin=5cm,showframe}
Regarding the e-TeX extension, yes, I have a very old distribution. I was introduced to this distribution since before I started my postgraduate programme. I'm going to submit my project in three months' time and I will definitely check TeX Live out after that! Thank you ;)

Mimi
Post Reply