3

I am trying to use LaTeX to make a title page for my thesis according to the requirements here:

http://www.grad.illinois.edu/graduate-college-thesis-requirements

As you can see, the formatting requirements specify how far from the top of the page each line must be. How do you specify this in LaTeX?

Martin Scharrer
  • 262,582
Alex319
  • 465

3 Answers3

2

You can use the tikz package to put nodes in specific places of a page.

For example, by doing

\begin{tikzpicture}[remember picture,overlay]
\node [yshift=-2in] at (current page.north)
[text width = 0.7\textwidth, anchor=base, text centered]
{
\Huge Title of Thesis
};
\end{tikzpicture}

Lets you put the text 2 inches below the top of the page (and centered).

fabikw
  • 6,203
  • I think that mentioned distances are to the top of the text, not its baseline, thus anchor=north, outer sep=0t, inner sep=0pt. It's wrong to change size within node's text. You should do it via font=\Huge in node's options, because otherwise kerning will be simply wrong. – przemoc Jun 30 '11 at 22:54
  • \MakeUppercase{} will be also useful here to automatically convert title to all capital letters - it's only a style requirement, thus title should be stored in .tex file in a natural way. – przemoc Jun 30 '11 at 23:01
  • @przemoc: IIRC the font value is simply added before the node content anyway, so there should not be much difference to using font size commands in the node itself. About what kerning are you talking exactly? – Martin Scharrer Jun 30 '11 at 23:30
  • @Martin: There is a difference if you change text width as fabikw did, so it's a good practice to just use font. If you don't believe my words, see yourself in LaTeX Previewer: \begin{tikzpicture}[remember picture,overlay] \node at (0,-1) [text width=0.7\textwidth, font=\Huge] {\MakeUppercase{Title of Thesis}}; \node at (0,1) [text width=0.7\textwidth] {\Huge\MakeUppercase{Title of Thesis}}; \end{tikzpicture} – przemoc Jul 01 '11 at 00:01
  • @przemoc: Sorry, but I didn't said there is no difference, I said there should be none, i.e. it is not supposed to make a difference. Apparently you talk about the inter-word spacing/kerning which is indeed wrong when text width is set. However, with a node content of {Title of Thesis\\\small Subtitle of Thesis} I get wrong spacing with font=\Huge or a leading \Huge. In the first case the inter-word spacing of the small text is still the one of the huge text and the line distance is wrong. In the second case the small text looks OK but he huge one still don't. I call TikZ Bug! – Martin Scharrer Jul 01 '11 at 06:48
  • (cont.) Apparently the inter-word spacing is set for the whole node with the font settings set by the font key which. AFAIK this is done outside the minipage generated by text width. I will have a closer look at the source code. – Martin Scharrer Jul 01 '11 at 06:51
  • 1
    @przemoc: I found it: In tikz.code.tex the macro \tikz@text@action is inserted as first command of the text width minipage. By default it is \raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax but is changed by the text ragged, text centered etc. options. If you use text badly ragged you get only \raggedright which avoids the issue and so, besides the name, looks better. :-) I should write an email or bug report to the PGF/TikZ project about the issue with \xspaceskip.5em in such cases. It's fine for short nodes, so I understand why it was done. – Martin Scharrer Jul 01 '11 at 07:05
  • @Martin: Thanks for nice investigation. I spotted this strange behavior earlier, but as I am relatively new to TikZ, I am avoiding calling each less obvious behavior a bug. :) Indeed, text badly ragged helps here. – przemoc Jul 01 '11 at 08:16
1

Normally I just use \vspace{<length>} to add some distance between the elements of the title page (\vspace*{<length>} for the first), but if you need full absolute distances as requested in linked requirements you can do this using either the textpos package which gives you an {textblock}{<width>}(<x>,<y>) environment or a tikzpicture with the overlay option (see fabikw's answer). For example code see this answer to How can I position an image in an arbitrary position in beamer? which also applies for normal documents, not just for beamer presentations. Don't forget to end (and start, if it's not the first page for some reason) the title page using \newpage or better \cleardoublepage. This is required because the above environments do not reserve any space.

Martin Scharrer
  • 262,582
0

As answered previously, the UIUC title page can be formatted with the Textpos package. Its implementation as per the university recommendations is illustrated below.

%%%Add this in the preamble
%%%For absolute positioning on the title page
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{10in}
%%%%
%%%
\begin{titlepage}
     \begin{center}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.2)
        \normalsize
        APPLE AND GRAVITY
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.33344)
        \normalsize
        BY
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.4)
        ISSAC NEWTON
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.55)
        THESIS\\
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.575)
        \normalsize
        Submitted in partial fulfillment of the requirements\\
        for the degree of Master of Science in XYZ\\
        in the Graduate College of the\\
        University of Illinois Urbana-Champaign, 2000\\
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.75)
        Urbana, Illinois\\
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.8)
        \begin{flushleft}
        Adviser:\\
        \end{flushleft}
        \end{textblock}
        \begin{textblock}{0.757575}[0.5,0](0.5,0.825)
        \begin{flushleft}
        \hspace{0.75in}Assistant Professor XYZ
        \end{flushleft}
        \end{textblock}
     \end{center}
     \null\newpage
\end{titlepage}