Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Wolfgang Schuster

Am 13.02.2011 um 04:38 schrieb Tom:

 
 
 \usetypescriptfile[type-one]
 \usetypescriptfile[type-gyr]
 TexLive 2010 MKII on a PC
 
 I'm completely flummoxed as how to use fonts from different families.
 Follows is an attempt to use Pallatino (rm) for the text of a book,
 Iwono-heavy for chapter titles (sansbold), Iwona-light (sans) for page
 headers (intended but not implemented), and Chancery (cg) for the
 dedication. The only font that appears to come out right are the chapter
 titles and I can't change their size without changing the size of the text
 font. I apparently haven't found the right manual yet or am too stupid to
 understand what must be a relatively simple concept.

You can define multiple typefaces.

% engine=pdftex

% fonts

\definetypeface [mainface] [rm] [serif] [palatino][default]
\definetypeface [mainface] [ss] [sans]  [iwona-heavy] [default]
\definetypeface [mainface] [tt] [mono]  [modern]  [default]
\definetypeface [mainface] [mm] [math]  [palatino][default]

\definetypeface [pagenumber] [ss] [sans] [iwona-light] [default]

\definetypeface [dedication] [rm] [serif] [chancery] [default]

\setupbodyfont[mainface]

% headings

\definehead [intro] [chapter]
\definehead [dedication][chapter]

\setuphead[chapter][style=\ss\bfa,alternative=middle]
\setuphead[intro][number=no]
\setuphead[dedication][number=no,style={\switchtobodyfont[dedication,16pt]}]

\definecombinedlist [content][intro,chapter,section]

% pagenumbers

\setuppagenumbering[style={\switchtobodyfont[pagenumber]}]

\starttext
\dedication{Dedication}
\completecontent
\intro{Introduction - Ag}
\input knuth
\chapter{First chapter - Ag}
\input knuth
\chapter{Second Chapter - Ag}
\input knuth
\stoptext

Wolfgang

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Jeong Dalyoung
Dear Wolfgang,

I tested your example on the multiple families of fonts.

It works nicely. 
I have a few question.

There is no toc generated, just only head Contents appeared.

Since Intro and dedication are counted as chapters, the first chapter numbered 
3. How to start chapter number from 1 for the first chapter?

Thank you.

Best regards,

Dalyoung

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Wolfgang Schuster

Am 13.02.2011 um 13:43 schrieb Jeong Dalyoung:

 Dear Wolfgang,
 
 I tested your example on the multiple families of fonts.
 
 It works nicely. 
 I have a few question.
 
 There is no toc generated, just only head Contents appeared.
 
 Since Intro and dedication are counted as chapters, the first chapter 
 numbered 3. How to start chapter number from 1 for the first chapter?

Replace “number=no” with “incrementnumber=no”.

Wolfgang
___
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
___


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Tom
Thank you very much, Wolfgang. The time zone difference is helpful
sometimes. I went to bed last night very frustrated and woke up this morning
to find your solution in my inbox. It is also good to see that your
assistance to me has also helped someone else. I do have a couple of
questions:

1. Why aren't the \usetypescriptfile commands necessary?
2. It never occurred to me to consider the dedication as a separate chapter.
Logically, it is but is the inverse of other chapters, sort of, in that the
chapter title isn't normally displayed and the body of the chapter is
printed in a different font than are the other chapters.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com



-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Sunday, February 13, 2011 4:59 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Using fonts from multiple families


Am 13.02.2011 um 04:38 schrieb Tom:

 
 
 \usetypescriptfile[type-one]
 \usetypescriptfile[type-gyr]
 TexLive 2010 MKII on a PC
 
 I'm completely flummoxed as how to use fonts from different families.
 Follows is an attempt to use Pallatino (rm) for the text of a book,
 Iwono-heavy for chapter titles (sansbold), Iwona-light (sans) for page
 headers (intended but not implemented), and Chancery (cg) for the
 dedication. The only font that appears to come out right are the chapter
 titles and I can't change their size without changing the size of the text
 font. I apparently haven't found the right manual yet or am too stupid to
 understand what must be a relatively simple concept.

You can define multiple typefaces.

% engine=pdftex

% fonts

\definetypeface [mainface] [rm] [serif] [palatino][default]
\definetypeface [mainface] [ss] [sans]  [iwona-heavy] [default]
\definetypeface [mainface] [tt] [mono]  [modern]  [default]
\definetypeface [mainface] [mm] [math]  [palatino][default]

\definetypeface [pagenumber] [ss] [sans] [iwona-light] [default]

\definetypeface [dedication] [rm] [serif] [chancery] [default]

\setupbodyfont[mainface]

% headings

\definehead [intro] [chapter]
\definehead [dedication][chapter]

\setuphead[chapter][style=\ss\bfa,alternative=middle]
\setuphead[intro][number=no]
\setuphead[dedication][number=no,style={\switchtobodyfont[dedication,16pt]}]

\definecombinedlist [content][intro,chapter,section]

% pagenumbers

\setuppagenumbering[style={\switchtobodyfont[pagenumber]}]

\starttext
\dedication{Dedication}
\completecontent
\intro{Introduction - Ag}
\input knuth
\chapter{First chapter - Ag}
\input knuth
\chapter{Second Chapter - Ag}
\input knuth
\stoptext

Wolfgang


___
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

___

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Wolfgang Schuster

Am 13.02.2011 um 14:23 schrieb Tom:

 Thank you very much, Wolfgang. The time zone difference is helpful
 sometimes. I went to bed last night very frustrated and woke up this morning
 to find your solution in my inbox. It is also good to see that your
 assistance to me has also helped someone else. I do have a couple of
 questions:
 
 1. Why aren't the \usetypescriptfile commands necessary?

ConTeXt already load there files to let you use the palatino etc. fonts

 2. It never occurred to me to consider the dedication as a separate chapter.
 Logically, it is but is the inverse of other chapters, sort of, in that the
 chapter title isn't normally displayed and the body of the chapter is
 printed in a different font than are the other chapters.

Add this to my example:

\definestartstop[dedication][style={\switchtobodyfont[dedication]}]

You can now write in your document

\dedication{...}

and

\startdedeication
...
\stopdedication

Wolfgang

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Tom
This should be my last question on this topic. I want to center the
dedication but align=middle (or center) and alternative=middle added to
\definestartstop[dedication] seem to have no effect. I can't seem to find a
simple way to center an odd line of paragraph of text. Using a frame seems
like using a sledgehammer to pound a tack.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Sunday, February 13, 2011 8:36 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Using fonts from multiple families


Am 13.02.2011 um 14:23 schrieb Tom:

 Thank you very much, Wolfgang. The time zone difference is helpful
 sometimes. I went to bed last night very frustrated and woke up this
morning
 to find your solution in my inbox. It is also good to see that your
 assistance to me has also helped someone else. I do have a couple of
 questions:
 
 1. Why aren't the \usetypescriptfile commands necessary?

ConTeXt already load there files to let you use the palatino etc. fonts

 2. It never occurred to me to consider the dedication as a separate
chapter.
 Logically, it is but is the inverse of other chapters, sort of, in that
the
 chapter title isn't normally displayed and the body of the chapter is
 printed in a different font than are the other chapters.

Add this to my example:

\definestartstop[dedication][style={\switchtobodyfont[dedication]}]

You can now write in your document

\dedication{...}

and

\startdedeication
...
\stopdedication

Wolfgang


___
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

___

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Wolfgang Schuster

Am 13.02.2011 um 15:39 schrieb Tom:

 This should be my last question on this topic. I want to center the
 dedication but align=middle (or center) and alternative=middle added to
 \definestartstop[dedication] seem to have no effect. I can't seem to find a
 simple way to center an odd line of paragraph of text. Using a frame seems
 like using a sledgehammer to pound a tack.

Why not?

\defineframedtext
  [dedication]
  [frame=off,
   align=middle,
   style={\switchtobodyfont[dedication]},
   width=\textwidth]

You can also \setupalign to \definestartstop:

\definestartstop
  [dedication]
  [style={\switchtobodyfont[dedication]},
   commands={\setupalign[middle]}]

Another option for MkIV (only) is the annotation module:

\defineannotation
  [dedication]
  [style={\switchtobodyfont[dedication]},
   align=middle]

Wolfgang

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


Re: [NTG-context] Using fonts from multiple families

2011-02-13 Thread Jeong Dalyoung
Dear Wolfgang,

It is nicely working.
Chapter numbers and contents are look good.

Thank you.

Best regards,

Dalyoung
___
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
___


[NTG-context] Using fonts from multiple families

2011-02-12 Thread Tom


\usetypescriptfile[type-one]
\usetypescriptfile[type-gyr]
TexLive 2010 MKII on a PC

I'm completely flummoxed as how to use fonts from different families.
Follows is an attempt to use Pallatino (rm) for the text of a book,
Iwono-heavy for chapter titles (sansbold), Iwona-light (sans) for page
headers (intended but not implemented), and Chancery (cg) for the
dedication. The only font that appears to come out right are the chapter
titles and I can't change their size without changing the size of the text
font. I apparently haven't found the right manual yet or am too stupid to
understand what must be a relatively simple concept.


\starttypescript [BookFont][texnansi,ec,qx,t5,default]

\definetypeface[BookFont][rm][serif][pallatino][default] %text body
\definetypeface[BookFont][ss][sans][iwona-light][default] %page headers
\definetypeface[BookFont][ss][sansbold][iwona-heavy][default] %chapters
\definetypeface[BookFont][tt][type][postscript][default] %embedded code
\definetypeface[BookFont][cg][calligraphic][chancery][default] %dedic.
\definetypeface[BookFont][mm][math][pallatino][default] %math

\stoptypescript

\usetypescript[BookFont][ec]
\setupbodyfont[BookFont,12pt]
\switchtobodyfont[serif]

\setuphead  [chapter][style=sansbold, alternative=middle]

\definehead [intro][chapter]
\setuphead  [intro][number=no]
\definecombinedlist [content][intro,chapter,section]
\setuphead[chapter][style=sansbold]

\starttext
{\cg Dedication}
\page

\completecontent
\intro{Introduction - Ag}
\input knuth
\chapter{First chapter - Ag}
\input knuth
\chapter{Second Chapter - Ag}
\input Knuth
\stoptext

Tom Benjey
717-258-9733 voice
717-243-0074 fax
blog: www.TomBenjey.com




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Saturday, February 12, 2011 1:56 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Table of Contents issues


Am 12.02.2011 um 18:12 schrieb Tom:

 Using a very recent download of TexLive 2010 (MKII) on my PC, my success
 generating a useful table of contents has been somewhat limited.
 
 I can't figure out how to put the title, Contents, in the font I desire.
 The various parameters I found in the documentation affect the chapter
 titles and the page numbers but nothing I've found allows me to control
the
 title of the ToC. What am I overlooking? 
 
 I would also like for the unnumbered chapter titles, such as
introduction
 or preface, to align with the other chapter titles, not with their
numbers.
 Aligntitle seems to have no effect on anything from what I have seen.

\setuphead[chapter][style=sansbold] 

\definehead[intro][chapter]
\setuphead [intro][number=no]

\definecombinedlist[content][intro,chapter,section]
\setupcombinedlist [content][style=sansbold]

\starttext
\completecontent
\intro{Introduction}
\input knuth
\chapter{First chapter}
\input knuth
\chapter{Second Chapter}
\input knuth
\stoptext

Wolfgang


___
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

___

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