[OS X TeX] \maketitle alteration?

Bruno Voisin bvoisin at mac.com
Tue Dec 5 14:24:57 CET 2006


Le 5 déc. 06 à 06:04, Nathan Paxton a écrit :

> 	I'm writing out a grant application, and I want to reduce the  
> space that \maketitle uses at the top of the document, since I have  
> a limit on the total number of pages I can use.  \maketitle seems  
> to start more than 1-inch from the top of the page.  Is there a way  
> i can push the title up further?

Assuming you are using the article class, you can redefine the  
corresponding code from article.cls in the preamble of your document,  
to eliminate the added space. Namely, paste the definitions of  
\maketitle (two of them, depending on whether you're in a titlepage  
environment or not) in the preamble, enclose it between \makeatletter  
and \makeatother, change all \newcommand to \renewcommand, and  
comment out the lines adding the extra space.

Specifically (with version [2005/09/16 v1.4f] of the class):

\makeatletter
\if at titlepage
   \renewcommand\maketitle{\begin{titlepage}%
   \let\footnotesize\small
   \let\footnoterule\relax
   \let \footnote \thanks
   \null\vfil
%  \vskip 60\p@
   \begin{center}%
     {\LARGE \@title \par}%
     \vskip 3em%
     {\large
      \lineskip .75em%
       \begin{tabular}[t]{c}%
         \@author
       \end{tabular}\par}%
       \vskip 1.5em%
     {\large \@date \par}%       % Set date in \large size.
   \end{center}\par
   \@thanks
   \vfil\null
   \end{titlepage}%
   \setcounter{footnote}{0}%
   \global\let\thanks\relax
   \global\let\maketitle\relax
   \global\let\@thanks\@empty
   \global\let\@author\@empty
   \global\let\@date\@empty
   \global\let\@title\@empty
   \global\let\title\relax
   \global\let\author\relax
   \global\let\date\relax
   \global\let\and\relax
}
\else
\renewcommand\maketitle{\par
   \begingroup
     \renewcommand\thefootnote{\@fnsymbol\c at footnote}%
     \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
     \long\def\@makefntext##1{\parindent 1em\noindent
             \hb at xt@1.8em{%
                 \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
     \if at twocolumn
       \ifnum \col at number=\@ne
         \@maketitle
       \else
         \twocolumn[\@maketitle]%
       \fi
     \else
       \newpage
       \global\@topnum\z@   % Prevents figures from going at top of  
page.
       \@maketitle
     \fi
     \thispagestyle{plain}\@thanks
   \endgroup
   \setcounter{footnote}{0}%
   \global\let\thanks\relax
   \global\let\maketitle\relax
   \global\let\@maketitle\relax
   \global\let\@thanks\@empty
   \global\let\@author\@empty
   \global\let\@date\@empty
   \global\let\@title\@empty
   \global\let\title\relax
   \global\let\author\relax
   \global\let\date\relax
   \global\let\and\relax
}
\def\@maketitle{%
   \newpage
   \null
%  \vskip 2em%
   \begin{center}%
   \let \footnote \thanks
     {\LARGE \@title \par}%
     \vskip 1.5em%
     {\large
       \lineskip .5em%
       \begin{tabular}[t]{c}%
         \@author
       \end{tabular}\par}%
     \vskip 1em%
     {\large \@date}%
   \end{center}%
   \par
   \vskip 1.5em}
\fi
\makeatother

In case you are using the hyperref package, make sure to call it  
*after* the above redefinition (so that hyperref will use the  
redefined version when adding hyperlinking capabilities to it --  
hyperef stores the current \maketitle into \HyOrg at maketitle, then  
redefines \maketitle to be this \HyOrg at maketitle with added  
functionality).

Hope this works,

Bruno Voisin------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list