# [Tex/LaTex] change title page margins ONLY without packages

marginspackage-writingtitles

I am trying to prepare a package for students that offers a uniform standard title page for their work (homework, reports, theses, and probably more).

I have the title page laid out as it should be. However, I am having problems setting the margins. I wish to centre ONLY the title page, without side effects to possible margin settings that the students might have already set up for the rest of their document.

I have seen other solutions such as this one, but they invariably make use of some package like geometry etc. I am seeking a solution that works with plain LaTeX only. The reason is that I do not know what class the title page package ends up in (book, report, memoir, classicthesis, …), and I need something that provides maximum compatibility.

One option would be to borrow the definitions for the \changepage command from the changepage package:

\documentclass{article}
\usepackage{lipsum}

\makeatletter
% Definitions taken from changepage.sty
\begingroup
\catcode\Q=3
\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
\endgroup

% Set the page output parameters
\DeclareRobustCommand{\ch@ngetext}{%
\setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
\setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
\if@twocolumn%
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
\setlength{\linewidth}{\hsize}}

\DeclareRobustCommand{\changepage}[9]{%
\ch@ngetext%
\makeatother
%

\begin{document}

\changepage{7cm}{6cm}{-3cm}{-3cm}{}{-3cm}{}{}{}
\lipsum[1-10]
\clearpage
\changepage{-7cm}{-6cm}{3cm}{3cm}{}{3cm}{}{}{}
\lipsum[1-5]
\end{document}
`

The result: