ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Title page layout
@ 2010-05-31 22:31 Scott Steele
  2010-06-01  7:58 ` Alan BRASLAU
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Steele @ 2010-05-31 22:31 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2361 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 4597 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Title page layout
  2010-05-31 22:31 Title page layout Scott Steele
@ 2010-06-01  7:58 ` Alan BRASLAU
  0 siblings, 0 replies; 2+ messages in thread
From: Alan BRASLAU @ 2010-06-01  7:58 UTC (permalink / raw)
  To: ntg-context; +Cc: Scott Steele

On Tuesday 01 June 2010 00:31:11 Scott Steele wrote:
> 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.

You might want to look into collectors:
http://wiki.contextgarden.net/Collectors

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-01  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31 22:31 Title page layout Scott Steele
2010-06-01  7:58 ` Alan BRASLAU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).