\newgeometry
affects the following page, so moving it to be before \begin{titlepage}
will ensure that it effects the title page.
And since you probably want pages after the title page to have the original geometry, moving \restoregeometry
to be after \end{ttilepage}
, and before \newpage
will make it effective on the first page of the document.
Notes:
Code:
\documentclass[10pt, a4paper, titlepage, draft]{article}
% USING DRAFT BECAUSE WE DO NOT HAVE THE PDFs TO BE INCLUDED
\usepackage{geometry}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc}% ADDED !!!!!
\usepackage{showframe}% ADDED !!!!!
\usepackage{lipsum}% ADDED !!!!!
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
}%
\item[]}
{\end{list}}
\begin{document}
\newgeometry{left=6.75cm, right=1.25cm, top=1.25cm, bottom=1.25cm}
\begin{titlepage}
%\newgeometry{left=6.75cm, right=1.25cm, top=1.25cm, bottom=1.25cm}
\mbox{}\hfill
\begin{minipage}[c]{8cm}
\flushright \textbf{University of ...}
\end{minipage}%
\hspace{0.5cm} % your specified distance
\begin{minipage}[c]{2.5cm}
\flushright \includegraphics[width=2.50cm]{logo.pdf}
\end{minipage}%
\begin{tikzpicture}[overlay, remember picture]
\useasboundingbox [fill=blue!20] ($ (current page.south west) + (1, 1) $) rectangle ($ (current page.north west) + (6.75, -1) $) ;
\draw [line width=0.01mm, blue] ($ (current page.north west) + (1, -1) $) rectangle ($ (current page.south east) + (-1, 1) $) ;
\draw ($ (current page.north west) + (9.625, -4.00) $) -- ($ (current page.north east) + (-1.25, -4.00) $) ;
\draw ($ (current page.south west) + (9.625, 4.00) $) -- ($ (current page.south east) + (-1.25, 4.00) $) ;
\node[anchor=south west, %anchor is upper left corner of the graphic
xshift=1.125cm, %shifting around
yshift=1.125cm]
at (current page.south west) %left upper corner of the page
{\includegraphics[width=5.25cm]{logo2.pdf}};
\end{tikzpicture}
\begin{changemargin}{0cm}{-0.25cm}
\centering
\vspace*{\baselineskip}
\vspace*{\baselineskip}
\rule{127mm}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{127mm}{0.4pt}\\[\baselineskip]
\vspace*{\baselineskip}
{\large \textbf{Title}}\\[\baselineskip]
{ Subtitle}\\[0.2\baselineskip]
\rule{127mm}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{127mm}{1.6pt}\\[\baselineskip]
\vspace*{\baselineskip}
\end{changemargin}
\mbox{} \vfill \hfill
\begin{minipage}[c]{8cm}
\flushright \textbf{Faculty of Science}
\end{minipage}%
\hspace{0.5cm} % your specified distance
\begin{minipage}[c]{2.5cm}
\flushright \includegraphics[width=2.50cm]{logo3.pdf}
\end{minipage}%
\end{titlepage}
\restoregeometry
\newpage
\lipsum[1-12]% Added
\end{document}
If I run this sample document
\documentclass{book}
\usepackage[a4paper,pass,verbose]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
I get, in the log file and on the console, the relevant lengths:
* \textheight=550.0pt
* \topmargin=22.0pt
* \headheight=12.0pt
* \headsep=18.06749pt
Rounding \headsep
is irrelevant, so I'll use 18pt:
\documentclass{book}
\usepackage[a4paper,verbose]{geometry}
\geometry{
inner=4cm,outer=1cm,
top=\dimexpr1in+22pt+12pt+18pt,% standard offset+topmargin+headheight+headsep
headheight=12pt,
headsep=18pt,
textheight=550pt,
}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
This prints
* \textheight=550.0pt
* \topmargin=22.0pt
* \headheight=12.0pt
* \headsep=18.0pt
which agrees with the standard setup.
With \documentclass[11pt,a4paper]{book}
(the twoside
and openright
options are on by default), the values obtained in the first step are
* \textheight=595.80026pt
* \topmargin=24.0pt
* \headheight=12.0pt
* \headsep=19.8738pt
so the change should be
\documentclass[11pt]{book}
\usepackage[a4paper,verbose]{geometry}
\geometry{
inner=4cm,outer=1cm,
top=\dimexpr 1in+24pt+12pt+19.8738pt,% standard offset+topmargin+headheight+headsep
headheight=12pt,
headsep=19.8738pt,
textheight=595.80026pt,
}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
with this setup I get as output
* \textheight=595.80026pt
* \topmargin=24.0pt
* \headheight=12.0pt
* \headsep=19.8738pt
Note that, in any case, LaTeX just looks at the values of \topmargin
, \headheight
, \headsep
and \textheight
; the bottom margin is whatever remains.
This is the output I get for the first page with the new settings
![enter image description here](https://i.stack.imgur.com/qYORW.png)
and this is the output without loading geometry
![enter image description here](https://i.stack.imgur.com/Llfry.png)
Best Answer
When you specify a new geometry, old values are not retained, so
geometry
uses its standard method, which is of dividing the blank vertical space in a 2:3 ratio between top and bottom after applying the default text height.Specify the missing parameters.
However, this is the wrong method for accommodating a wide object in a figure. Use
changepage
and itsadjustwidth
environment, which doesn't require forcing a page break.