I'm trying to anchor a table or box containing my title and subtitle to the
bottom right corner of the textblock (on a title page). The following comes
very close to doing what I want, but there is still some vertical space
between the bottom of the text of the subtitle and the last major horizontal
gridline. How can I have the subtitle text be (above and) flush with the
last major horizontal gridline in the same way that it is flush with the
rightmost vertical gridline? NOTE: Small adjustments to the example I
provide might not be helpful for me since, in actuality, I'm using Adobe
Jenson, which makes both the metrics and the expression of the problem
slightly different.

Also, are there max/min functions for dealing with dimexpr's?

%\definetypeface[jenson][rm][Xserif][Adobe Jenson Pro]
%\setupbodyfont[jenson, 11pt]

\definepapersize[pocket][width=4.25in,
height=6.875in]

\setuppapersize[pocket][pocket]

\setuplayout[location=middle,
 width=0.815\paperwidth,
rightmargindistance=0in,
leftmargindistance=0in,
 height=middle,
margin=0.08\paperwidth,
backspace=0.115\paperwidth,
 marking=off,
grid=yes,
topspace=0.018889\paperheight,
 header=0.044444\paperheight,
footer=0.044444\paperheight,
bottomspace=0.038889\paperheight]

\setuppagenumbering[alternative=doublesided,
location={footer,marginedge}]

\def\givewidthof#1\to#2%
{
\bgroup
\setbox\scratchbox\hbox{#1}%
\expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}
} % From a response by Hans to a mailing list question. It was originally
\setwidthof#1\to#2, which—in English at least—sounds somewhat ambiguous with
regard to which variable is providing a width.

\def\TitlePage#1#2%
{
\givewidthof{\scc #2}\to\SubtitleWidth
\newdimen\TitlePageVar
 \TitlePageVar=\dimexpr(\textwidth-\SubtitleWidth)
\dontleavehmode\vfill
\starttable[s(0pt)|lw(\TitlePageVar)|cw(\SubtitleWidth)|]
 \NC\NC{\scd #1}\AR
\NC\NC{\scc #2}
\stoptable
 \page
}

\showgrid
\startfrontmatter
\TitlePage{Title}{Longer Subtitle}
\stopfrontmatter



Thanks,
Scott

-----
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to