ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Simple questions on fonts and how to center vertically
@ 2008-11-16 10:48 Mildred Ki'Lya
  2008-11-16 12:01 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Mildred Ki'Lya @ 2008-11-16 10:48 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

Hi,


I would like to create a document where the first page contains a title
and a subtitle. The title would be in bold face, and the subtitle in
italics. The font size would be something bigger than 12 points and
those would be centered vertically on the page (with a bit of space
between them).


After some readings, I came up with the following solution:


% ------------------------------------------------------------------

\font\titlefont=cmbx12 scaled\magstep3

% Header
\setupheadertexts[\vbox{
  \ifodd\pagenumber
    \hfil{\sc{a Title}}\hfil\hfil\pagenumber\hfil
  \else
    \hfil\pagenumber\hfil\hfil{\sc{author}}\hfil
  \fi
  \break
  \vbox{\hfil\hrulefill\hfil}
}]

% Start front page
\eject\nobreak\vfill

% Title
{\titlefont
  \centerline{a Title}
  \vskip 1em
}

\vfil % Leave some space between

% Subtitle
{\titlefont\it
  \centerline{a Subtitle}
  \vskip 1em
}

% Stop Front Page
\nobreak\vfill\eject

\end

% ------------------------------------------------------------------


The problems are:
* It is not centered vertically
* The subtitle is not as big as I would have expected
* There is not enough space between the title and the subtitle


Can you come up with a better solution?


Ideally, I would like to have the font size changed in a way so the
control sequences like \it, \bf ... continue to work as expected.

Something I could use like:

{Some normal text \magnify{3} three times magnified text \it the same
size in italics \bf Three times magnified, bold and italics \dots}


It seems I also have troubles getting the TeX box model right.
Previously, I tried to create a ruler below the ruler and it took me
time to figure out how to display it. Naive implementation seamed not
to work. Especially, i don't understand why the \hfil\hrulefill\hfil
should be inserted in a \vbox.

Is there some documentation somewhere explaining that?

Thanks.


Mildred



-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred@jabber.fr>
│ Site: <http://ki.lya.online.fr>              GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Simple questions on fonts and how to center vertically
@ 2008-11-16 10:31 Mildred Ki'Lya
  0 siblings, 0 replies; 7+ messages in thread
From: Mildred Ki'Lya @ 2008-11-16 10:31 UTC (permalink / raw)
  To: Mailing list for ConTeXt users


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

Hi,


I would like to create a document where the first page contains a title
and a subtitle. The title would be in bold face, and the subtitle in
italics. The font size would be something bigger than 12 points and
those would be centered vertically on the page (with a bit of space
between them).


After some readings, I came up with the following solution:


% ------------------------------------------------------------------

\font\titlefont=cmbx12 scaled\magstep3

% Header
\setupheadertexts[\vbox{
  \ifodd\pagenumber
    \hfil{\sc{a Title}}\hfil\hfil\pagenumber\hfil
  \else
    \hfil\pagenumber\hfil\hfil{\sc{author}}\hfil
  \fi
  \break
  \vbox{\hfil\hrulefill\hfil}
}]

% Start front page
\eject\nobreak\vfill

% Title
{\titlefont
  \centerline{a Title}
  \vskip 1em
}

\vfil % Leave some space between

% Subtitle
{\titlefont\it
  \centerline{a Subtitle}
  \vskip 1em
}

% Stop Front Page
\nobreak\vfill\eject

\end

% ------------------------------------------------------------------


The problems are:
* It is not centered vertically
* The subtitle is not as big as I would have expected
* There is not enough space between the title and the subtitle


Can you come up with a better solution?


Ideally, I would like to have the font size changed in a way so the
control sequences like \it, \bf ... continue to work as expected.

Something I could use like:

{Some normal text \magnify{3} three times magnified text \it the same
size in italics \bf Three times magnified, bold and italics \dots}


It seems I also have troubles getting the TeX box model right.
Previously, I tried to create a ruler below the ruler and it took me
time to figure out how to display it. Naive implementation seamed not
to work. Especially, i don't understand why the \hfil\hrulefill\hfil
should be inserted in a \vbox.

Is there some documentation somewhere explaining that?

Thanks.


Mildred


-- 
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred@jabber.fr>
│ Site: <http://ki.lya.online.fr>              GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2008-11-16 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-16 10:48 Simple questions on fonts and how to center vertically Mildred Ki'Lya
2008-11-16 12:01 ` Wolfgang Schuster
2008-11-16 13:36   ` Mildred Ki'Lya
2008-11-16 14:12     ` Wolfgang Schuster
2008-11-16 16:07       ` Mildred Ki'Lya
2008-11-16 15:18     ` Arthur Reutenauer
  -- strict thread matches above, loose matches on Subject: below --
2008-11-16 10:31 Mildred Ki'Lya

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).