%
% D. P. Story  dpstory@acrotex.net
% The AcroTeX Software Development Team
%
\documentclass{article}
\usepackage[%
    driver=dvipsone,
    web={pro,designv,tight}
]{aeb_pro}
%
% We don't need layers so  we'll turn them off.
%

\begin{comment}
    This document illustrates the underlying structure of the top of
    the title page, which includes the university (or affiliation),
    the title and the author of the presentation. The pro option of
    the web package provides extensive control over the layout of
    these these three elements of the title.
\end{comment}
\usepackage[structure]{viewpg}
\begin{comment}
    The viewpage package is just a series of re-definitions to aid in viewing the underlying
    structure of this title page. It has two options, the 'structure' option shows the structure
    of the title page, the 'page' option just shows the page in standard viewing mode.
\end{comment}

\DeclareDocInfo
{
    university=\fbox{university},
    title=\texorpdfstring{\fbox{document title}}{document title},
    author=\texorpdfstring{\fbox{author}}{author},
    email=\fbox{email},
    talkdate=\noexpand\fbox{talkdate},
    talksite=\fbox{talksite},
    prepared=\fbox{prepared},
    subject=Demo file showing structure of title page,
}

\begin{comment}
Each of the three elements, university, title, and author, are first placed in a parbox
of width hproportion\linewidth, then placed in a \makebox of width \linewidth.  When you
un-comment the \viewStructure command and compile this file, you'll see the underlying
\parbox in gray and the underlying \makebox in yellow.

Key-values of \universityLayout, \titleLayout and \authorLayout. See the pages following the title
page for the description of all the keys. Here we mention only a few:

halign:
The halign key of \universityLayout, \titleLayout and \authorLayout control the position
of the title element within its \parbox, the values are l for left-aligned, c for centered
(the default) and r for right-aligned.  By changing this key and latexing the file, you can
see its effects on the positioning of the title elements.

xhalign:
The xalign key controls the alignment of the \parbox within the enclosing \makebox. Recognized
values are l, c and r, having the same meanings as above.  Change the values of xhalign and
latex to see the effects.

By adjusting the two previous keys, you can get a variety of alignments.

Play around with these, and the other keys to see their effects.
\end{comment}

\begin{comment}
The top of the title page, which includes the university, title and author elements, is itself
set in a \parbox of depth equal to a proportion of the total \textheight. The scaling factor
for \textheight is set by the \topTitlePageProportion command. The default is .33. Below, we
set this proportion to .5.
\end{comment}
\topTitlePageProportion{.5}

%
% The next three commands are used to adjust the format of the university,
% title and author specification. The key-values are enumerated later in this
% file. Examples of custom headings can be found in the example file apb_title.tex
%
\universityLayout
{%
    halign=l,xhalign=c,color=red
}
\titleLayout
{%
    halign=r,xhalign=r,hproportion=.4
}
\authorLayout
{%
    halign=c,color=webbrown
}
\optionalPageMatter
{%
    \begin{center}\color{black}
    \fbox{optionalpagematter}
    \end{center}
}

\newcommand{\cs}[1]{\texttt{\char`\\#1}}
\newcommand{\APB}{\textsf{APB}}


\begin{document}

\maketitle

\begin{enumerate}
\item \texttt{fontfamily}:\\
    Font family to use with this element,
    permissible values are \texttt{rmfamily}, \texttt{sffamily}, \texttt{ttfamily}

\item \texttt{fontseries}:\\
    Font series to  use, possible values are \texttt{bfseries} and \texttt{mdseries}.

\item \texttt{fontshape}:\\
    Font shape to use: \texttt{upshape}, \texttt{itshape}, \texttt{scshape}, \texttt{slshape}.

\item \texttt{fontsize}:\\
    Font size to use with this element, permissible values are \texttt{tiny}, \texttt{scriptsize},
    \texttt{footnotesize}, \texttt{small}, \texttt{normalsize}.
    \texttt{large}, \texttt{Large}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}

\item \texttt{halign}:\\
    Alignment of this element within its enclosing \cs{parbox}, permissible
    values are \texttt{l} (left aligned), \texttt{c} (centered), \texttt{r} (right aligned).

\item \texttt{color}:\\
    The color of the section title, this can be any named color. The default is blue
    for \texttt{title}, and black otherwise.


\item \texttt{special}:\\
    Through this key, you can a specify predefined layout for the title elements. Permissible
    values are \texttt{shadow}, \texttt{framebox}, \texttt{colorbox}, \texttt{fcolorbox},
    \texttt{frameboxfit}, \texttt{colorboxfit}, \texttt{fcolorboxfit}, \texttt{custom}, \texttt{default}.

\item[] Custom section heads can be used by specifying a value of \texttt{custom}. When
    \texttt{special=custom}, \cs{customUniversity},
    \cs{customTitle} and \cs{customAuthor} are used. These are macros that
    take one argument, the code that defines the title element format. The
    title element is referred to as \texttt{\#1}. Depending on how
    these custom section titles are defined, the other keys may not
    be obeyed.

\item \texttt{framecolor}:\\
    The color of the frame surrounding the subject when the \texttt{special}
    key has a value of \texttt{framebox}, \texttt{fcolorbox} \texttt{frameboxfit} or \texttt{fcolorboxfit}.

\item \texttt{bgcolor}:\\
    The background (fill color) of the box enclosing this element, when
    \texttt{special} has a value of \texttt{colorbox}, \texttt{fcolorbox}, \texttt{colorboxfit}
    or \texttt{fcolorboxfit}.

\item \texttt{shadowcolor}:\\
    The color of the shadow, when \texttt{special} has a value of \texttt{shadow}.

\item \texttt{beforeskip}:\\
    The amount of skip before the title element.

\item \texttt{afterskip}:\\
    The amount of skip after the title element.


\item \texttt{usefont}:\\
    Specify an arbitrary font and font size with this key. The key
    takes five paramters, for example,
    \verb!usefont={OT1}{cmdh}{m}{n}{{16}{16pt}}!.  The
    first four are the arguments of the {\LaTeX}'s \cs{usefont},
    encoding, family, series and shape. The last argument are the
    arguments of the {\LaTeX}'s \cs{fontsize}, size and
    baselineskip. For the details of
    these parameters, see the \textsl{{\LaTeX} Companion}.

\item[] If the fifth parameter is empty, no font size is specified, the current default sizes are used,
     e.g., \verb!usefont={OT1}{cmdh}{m}{n}{}!.


\item \texttt{hproportion}:\\
    Each of the three elements (university, title, author) lie in their own
    \cs{parbox}, the width of this box is determined by the value of
    this key, as a proportion of the total \cs{linewidth}. The default
    for all three is $.7$. This value can be set to get more or less
    ``natural'' line breaks, without having to insert a new line with a
    `\verb!\\!'.


\item \texttt{xhalign}:\\
    The \cs{parbox} of each of the three elements are also placed in
    a \cs{makebox}, additional control over positioning can be had
    by setting this key, which sets the positioning parameter of
    \cs{makebox}. The default value for \texttt{xhalign} is
    \texttt{c}, the element is centered.
\end{enumerate}

\end{document}
