diff options
Diffstat (limited to 'Master/texmf-dist/doc/context/context-omega/context-help.html')
-rw-r--r-- | Master/texmf-dist/doc/context/context-omega/context-help.html | 1219 |
1 files changed, 0 insertions, 1219 deletions
diff --git a/Master/texmf-dist/doc/context/context-omega/context-help.html b/Master/texmf-dist/doc/context/context-omega/context-help.html deleted file mode 100644 index 0c36020c19b..00000000000 --- a/Master/texmf-dist/doc/context/context-omega/context-help.html +++ /dev/null @@ -1,1219 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> -<HEAD> -<TITLE>ConTeXt and pdfTeX Beginners Help Page</TITLE> -</HEAD> - -<BODY> -<H1>ConTeXt and pdfTeX Beginners Help Page</H1> - -Best Viewed With <A HREF="http://www.anybrowser.org/campaign/">Any Browser</A> - -<P>Last updated: April 23, 2002 - -<UL> -<LI><A HREF="#intro">Introduction</A> -<LI><A HREF="#links">Essential Links</A> -<LI><A HREF="#file-loc">File Locations</A> -<LI><A HREF="#install">Installation</A> - <UL> - <LI><A HREF="#install-context">ConTeXt</A> - <LI><A HREF="#install-pdftex">pdfTeX</A> - </UL> -<LI><A HREF="#selectfont">Selecting Fonts</A> - <UL> - <LI><A HREF="#selectfont-simple">Simple (and not very useful) method</A> - <LI><A HREF="#selectfont-typescript">Using Typescripts</A> - </UL> -<LI><A HREF="#newfont">Installing New Fonts</A> - <UL> - <LI><A HREF="#newfont-type1">Type1</A> - <UL> - <LI><A HREF="#newfont-type1-texfont">Using texfont</A> - </UL> - <LI><A HREF="#newfont-truetype">TrueType</A> - </UL> -<LI><A HREF="#typography">Typography</A> - <UL> - <LI><A HREF="#typography-wordspacing">Tight word spacing</A> - <LI><A HREF="#typography-indenting">Indenting</A> - <LI><A HREF="#typography-symbols">Using smaller symbols</A> - <LI><A HREF="#typography-dashes">Dashes</A> - <LI><A HREF="#typography-letterspacing">Letterspacing capitals and small caps</A> - <LI><A HREF="#typography-hanging">Margin kerning: Hanging punctuation and protruding characters</A> - </UL> -</UL> - -<HR> - -<H2><A NAME="intro">Introduction</A></H2> - -I am a beginner at TeX myself, and wanted to use this page to record -those little hints and examples which helped me over the rough spots, -in the hope that they may help others. I'll refine and extend the -examples as I gain more experience. - -<P>The techniques I describe here are used to produce all of the <A -HREF="http://sattre-press.com/">Sattre Press</A> titles. - -<P>I presume the reader has all the documents available from the -ConTeXt and pdfTeX web pages. Other sources of information: both -packages have email support lists which are archived on the -web. Searching the usenet group <CODE>comp.text.tex</CODE> can be useful -also. - -<P>I use SuSE Linux. However, it seems that TeX knowledge is rather -portable across systems, and it should be possible to adapt the -examples to other platforms. - -<H2><A NAME="links">Essential Links</A></H2> - -<UL> -<LI>ConTeXt - <UL> - <LI><A HREF="http://www.pragma-ade.nl/">www.pragma-ade.nl</A> or - <A HREF="http://ds035.xs4all.nl/">ds035.xs4all.nl</A> (fallback page) - <LI><A HREF="http://www.pragma-ade.com/">www.pragma-ade.com</A> (primary page, but out of action for a while) - <LI><A HREF="http://www.ntg.nl/context/">www.ntg.nl/context</A> (temporary) - <LI><A HREF="http://ml-archives.mini.pw.edu.pl/ntg-context.html">Mailing list archives</A> - </UL> -<LI>pdfTeX - <UL> - <LI><A HREF="http://tug.org/applications/pdftex/index.html">TUG pdftex support page</A> - </UL> -</UL> - -<H2><A NAME="file-loc">File Locations</A></H2> - -Everything in the TeX world has its place. There is a vast amount of material in the TeX directory tree, which on my system -starts at <CODE>/usr/share/texmf</CODE>. - -<P>Further, you can customize local and auxiliary directory structures. Look at <CODE>texmf.cnf</CODE>. - -<P>Experiment with the <CODE>kpsewhich</CODE> utility, particularly with the <CODE>--show-path</CODE> option, which -shows all the different places in which TeX will look for different files. - -<P>Using this, I see that the current directory is always first in the path, meaning I can make all sorts of "system" -changes which effect only the current project. As far as I can tell, all files of interest are treated this way: -<CODE>.cfg, .cnf, .tex, .map, .tfm, .pfb,</CODE> etc. - -<P>Once a new file becomes stable it can be promoted to later ("higher") directories in the search path. <CODE>kpsewhich</CODE> -shows that I have a personal TeX directory tree in my home directory: <CODE>/home/wmcclain/texmf</CODE>. Then there are -site-specific directories, etc. - -<P>Remember: if you add or delete any files in the TeX tree (see the -list of directories <CODE>$TEXMFDBS</CODE> in <CODE>texmf.cnf</CODE>, -you <STRONG>must</STRONG> rebuild the filename database with -<CODE>mktexlsr</CODE>. On my system, <CODE>texhash</CODE> is a synonym -for this command. - -<P>On Linux, I run <CODE>updatedb</CODE> daily, and use <CODE>locate</CODE> to find all those pesky configuration files. - -<H2><A NAME="install">Installation</A></H2> - -SuSE Linux comes with both ConTeXt and pdfTeX, but these packages are updated rather frequently and it is necessary to -upgrade without waiting for SuSE. - -<P>These notes are not a replacement for the real installation docs! I just show what I actually do when upgrading. - -<P>I do the upgrade in the main TeX tree: <CODE>/usr/share/texmf</CODE>. If I were ambitious I would test in some auxiliary -directory first, but I haven't had much trouble yet. I have backups and am able to reinstall pretty quickly. - -<BLOCKQUOTE> -<H3><A NAME="install-context">ConTeXt</A></H3> -<CODE><PRE> -su root - -mv cont-tmf.zip /usr/share/texmf -cd /usr/share/texmf -rm /usr/share/texmf/tex/context/base/* -unzip -a -L -o cont-tmf.zip # overwrites existing files! - -# SuSE wants the executables here... -cp context/perltk/texexec.pl /usr/share/texmf/teTeX/bin/i386-linux-glibc/texexec -cp context/perltk/texshow.pl /usr/share/texmf/teTeX/bin/i386-linux-glibc/texshow -cp context/perltk/texutil.pl /usr/share/texmf/teTeX/bin/i386-linux-glibc/texutil - -# Edit texexec.ini afterwards? -cp /usr/share/texmf/context/config/texexec.rme /usr/share/texmf/context/config/texexec.ini - -# Edit cont-sys.tex afterwards? -cp /usr/share/texmf/tex/context/user/cont-sys.rme /usr/share/texmf/tex/context/user/cont-sys.tex - -texhash -texexec --make en # en = english -texhash - -exit # from "su root" -</PRE></CODE> - -<H3><A NAME="install-pdftex">pdfTeX</A></H3> -<CODE><PRE> -cp pdftex-20010417.tgz /tmp # or whatever the latest snapshot is called -cd /tmp -tar zxvf pdftex-20010417.tgz # or whatever the latest snapshot is called -cd src -configure -cd texk/web2c -make pdftexbin # may need "tangle" from previous build - -su root - -cp *.pool /usr/share/texmf/web2c - -# SuSE wants the executables here... -cp pdftex /usr/share/texmf/teTeX/bin/i386-linux-glibc -cp pdfetex /usr/share/texmf/teTeX/bin/i386-linux-glibc -cp ttf2afm /usr/share/texmf/teTeX/bin/i386-linux-glibc - -# first time only, add this to /etc/profile.local: -# -# export TEXMFCNF=`kpsewhich -show-path=.cnf` - -texhash -texexec --make en -texhash - -exit # from "su root" -</PRE></CODE> -</BLOCKQUOTE> - -<H2><A NAME="selectfont">Selecting Fonts</A></H2> -Fonts are a complicated business, but become easier to deal with once you have run -a few experiments. The primary document is <EM>Fonts in ConTeXt</EM> -(<CODE>mfonts.pdf</CODE>). - -<P>Note that we tend to be spoiled by the default Computer Modern font which has a -large number of good features which just work automatically. Emulating that -capability with a new font requires a good deal of setup. - -<BLOCKQUOTE> -<H3><A NAME="selectfont-simple">Simple (and not very useful) method</A></H3> -You can simply specify a font file and use it, either in plain TeX or by using ConTeXt -macros. This is not very useful because it does not give you the convenient switching to -italic, bold, small caps, math mode, etc, which a well-defined typeface will do. However, -it is instructive to try it, just to prove that the system is setup correctly and that the -maps and font files can be found. - -<P>You can (for a start) use any font listed in <CODE>pdftex.map</CODE>, presuming both -the <CODE>.tfm</CODE> and <CODE>.pfb</CODE> font files exist. (This is not always the -case on my system). - -<P>For example, here is the first data line in my <CODE>pdftex.map</CODE> file: - -<BLOCKQUOTE> -<CODE> -bchb8r CharterBT-Bold "TeXBase1Encoding ReEncodeFont" <8r.enc <bchb8a.pfb -</CODE> -</BLOCKQUOTE> - -The contents of <CODE>pdftex.map</CODE> are documented in <EM>The pdfTeX User Manual</EM> (<CODE>pdftexman.pdf</CODE>). -For now, just note that this line refers to "Bitstream Charter Bold." The first field, <CODE>bchb8r</CODE>, -is the name of a <CODE>.tfm</CODE> (TeX Font Metric) file, and <CODE>bchb8a.pfb</CODE> is a Type1 -font file. In TeX programs, fonts are identified by their <CODE>.tfm</CODE> names. - -<P>Since both <CODE>bchb8r.tfm</CODE> and <CODE>bchb8a.pfb</CODE> exist on my system, I can use the font as follows. - -<P>Using just plain TeX: - -<BLOCKQUOTE> -<CODE><PRE> -\font\myfirstfont=bchb8r -\myfirstfont Of wind I sang, a wind there came, and in the branches blew. -</PRE></CODE> -</BLOCKQUOTE> - -<P>Using ConTeXt macros: - -<BLOCKQUOTE> -<CODE><PRE> -\definefontsynonym[CharterBT-Bold][bchb8r][encoding=8r] -\definefont[MySecondFont][CharterBT-Bold] -\starttext -\MySecondFont I sang of leaves, of leaves of gold, and leaves of gold there grew. -\stoptext -</PRE></CODE> -</BLOCKQUOTE> - -<H3><A NAME="selectfont-typescript">Using Typescripts</A></H3> -ConTeXt now uses typescripts to define and select fonts. This is the way to go for maximum flexibility. - -<P>"Typescripts are in fact just organized definitions" says <CODE>mfonts.pdf</CODE>. They are a way -of building a database of names which provides layers of abstraction. The TeX document -can be written so that it will continue to be "correct" even as major changes in fonts, families and styles -are made at the deeper levels. - -<H4>typescript files</H4> - -Typescripts are definitions contained between <CODE>\starttypescript</CODE> and <CODE>\stoptypescript</CODE>. -The typescripts are found in and loaded from several file sources: - -<UL> -<LI>Several <CODE>type-*.tex</CODE> files are automatically searched. See the list in <CODE>mfonts.pdf</CODE>. -<LI>A file <CODE>type-loc.tex</CODE> in the search path will be searched automatically. -<LI>Any file in the search path, for example, <CODE>myscripts.tex</CODE>, can be loaded with - <CODE>\usetypescriptfile[myscripts]</CODE>. -</UL> - -<H4>A simple example</H4> - -For example, using Bitstream Charter again, I have these fonts on my system: - -<BLOCKQUOTE> -<TABLE> -<TR> -<TD><CODE>bchr8r</CODE></TD> -<TD>roman</TD> -</TR> -<TR> -<TD><CODE>bchb8r</CODE></TD> -<TD>bold</TD> -</TR> -<TR> -<TD><CODE>bchri8r</CODE></TD> -<TD>italic</TD> -</TR> -<TR> -<TD><CODE>bchbi8r</CODE></TD> -<TD>bold italic</TD> -</TR> -</TABLE> -</BLOCKQUOTE> - -I can create this typescript file, <CODE>type-charter.tex</CODE>: -<BLOCKQUOTE> -<CODE><PRE> -\usetypescriptfile[type-buy] - -\starttypescript [serif] [charter] [8r] - \definefontsynonym [Charter-Roman] [bchr8r] [encoding=8r] - \definefontsynonym [Charter-Bold] [bchb8r] [encoding=8r] - \definefontsynonym [Charter-Italic] [bchri8r] [encoding=8r] - \definefontsynonym [Charter-Bold-Italic] [bchbi8r] [encoding=8r] -\stoptypescript - -\starttypescript [serif] [charter] [name] - \usetypescript[serif][fallback] - \definefontsynonym [Serif] [Charter-Roman] - \definefontsynonym [SerifBold] [Charter-Bold] - \definefontsynonym [SerifItalic] [Charter-Italic] - \definefontsynonym [SerifBoldItalic] [Charter-Bold-Italic] -\stoptypescript - -\starttypescript [Charter] - \definetypeface [MyCharter] [rm] [serif] [charter] [default] [encoding=8r] -\stoptypescript -</PRE></CODE> -</BLOCKQUOTE> - -And use it like this: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescriptfile[type-charter] -\usetypescript[Charter] -\setupbodyfont[MyCharter] - -\starttext -This is roman, {\bf bold}, {\it italic}, {\bi bold-italic}, -{\tfa bigger} and {\tfx smaller}. -\stoptext -</PRE></CODE> -</BLOCKQUOTE> - -<H4>Multiple fonts</H4> - -I also have Adobe Utopia, so I can make a <CODE>type-utopia.tex</CODE> -typescript file very similar to the Charter example above: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescriptfile[type-buy] - -\starttypescript [serif] [utopia] [8r] - \usetypescript[serif][fallback] - \definefontsynonym [Utopia-Roman] [putr8r] [encoding=8r] - \definefontsynonym [Utopia-Bold] [putb8r] [encoding=8r] - \definefontsynonym [Utopia-Italic] [putri8r] [encoding=8r] - \definefontsynonym [Utopia-Bold-Italic] [putbi8r] [encoding=8r] -\stoptypescript - -\starttypescript [serif] [utopia] [name] - \definefontsynonym [Serif] [Utopia-Roman] - \definefontsynonym [SerifBold] [Utopia-Bold] - \definefontsynonym [SerifItalic] [Utopia-Italic] - \definefontsynonym [SerifBoldItalic] [Utopia-Bold-Italic] -\stoptypescript - -\starttypescript [Utopia] - \definetypeface [MyUtopia] [rm] [serif] [utopia] [default] [encoding=8r] -\stoptypescript -</PRE></CODE> -</BLOCKQUOTE> - -And then use both fonts in the same job: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescriptfile[type-charter] -\usetypescript[Charter] -\usetypescriptfile[type-utopia] -\usetypescript[Utopia] -\setupbodyfont[MyCharter] - -\starttext -This is Charter roman, {\bf bold}, {\it italic}, {\bi bold-italic}, -{\tfa bigger} and {\tfx smaller}. - -\switchtobodyfont[MyUtopia] -This is Utopia roman, {\bf bold}, {\it italic}, {\bi bold-italic}, -{\tfa bigger} and {\tfx smaller}. -\stoptext -</PRE></CODE> -</BLOCKQUOTE> - -Note that the default Computer Modern font is always available, even -when the job defines other fonts: -declare it with <CODE>\usetypescript[modern][default]</CODE> and -select it with <CODE>\switchtobodyfont[modern]</CODE>. - -<H4>Questions</H4> -<BLOCKQUOTE> -<STRONG>What does the <CODE>\usetypescriptfile[type-buy]</CODE> -do?</STRONG> -It loads a typescript which contains the definition of the <CODE>[serif][fallback]</CODE> -typescript which I use later. - -<P><STRONG>What does the <CODE>\usetypescript[serif][fallback]</CODE> -do?</STRONG> -It simplifies the definition of my new typescript. My example fonts are -very simple and do not have slanted or smallcaps variants. ConTeXt -requires those variants to be defined. I could add dummy declarations -and define SerifSlanted to be the same as SerifItalic, -SerifBoldSlanted to be SerifBoldItalic, and SerifCaps to be simply -Serif. However, if you look at the definition of the -<CODE>[serif][fallback]</CODE> typescript in -<CODE>type-buy.tex</CODE>, you will see that those declarations have -already been made. My typescript can "inherit" from the predefined -fallback typescript. - -<P><STRONG>What about the <CODE>encoding=8r</CODE> -references?</STRONG> -I specified these because that was what was listed for these fonts in -<CODE>pdftex.map</CODE>. I'll try to add more on encodings to this -document someday. - -<P><STRONG>What are the parameters to <CODE>\starttypescript</CODE>?</STRONG> -Typescripts can have up to three "specifiers". It is like having a -database where you can use up to three keys to find a record. You can -make up your own values. For example, if I have: - -<BLOCKQUOTE> -<CODE><PRE> -\starttypescript[A][B][C] -% ...various statements -\stoptypescript -</PRE></CODE> -</BLOCKQUOTE> - -I can find and execute the typescript with: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescript[A][B][C] -</PRE></CODE> -</BLOCKQUOTE> - -The keyword <CODE>all</CODE> matches any value: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescript[A][B][all] -</PRE></CODE> -</BLOCKQUOTE> - -These examples will <STRONG>not</STRONG> match typescript -<CODE>[A][B][C]</CODE>: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescript[A] -\usetypescript[A][B] -\usetypescript[A][B][D] -</PRE></CODE> -</BLOCKQUOTE> - -You can have lists of key values to match. If I have: - -<BLOCKQUOTE> -<CODE><PRE> -\starttypescript[A][B][C] -% ...various statements -\stoptypescript - -\starttypescript[A][B][Z] -% ...various statements -\stoptypescript -</PRE></CODE> -</BLOCKQUOTE> - -Then I can execute both typescripts with: - -<BLOCKQUOTE> -<CODE><PRE> -\usetypescript[A][B][C,Z] -</PRE></CODE> -</BLOCKQUOTE> - -Note that the search for typescript matches has a cumulative -effect. Our database allows duplicate key values and the search will -find and execute all the matches. - -<P><STRONG>What are the parameters to <CODE>\definetypeface</CODE>?</STRONG> -This is where it all comes together. Suppose we have: - -<BLOCKQUOTE> -<CODE><PRE> -\definetypeface[A][B][C][D][E][F] -</PRE></CODE> -</BLOCKQUOTE> - -This means: - -<UL> -<LI>Define typeface <CODE>A</CODE> (any name you like) in its variant -<CODE>B</CODE>, where the common variants are: - <UL> - <LI><CODE>rm</CODE>: roman (normal) - <LI><CODE>ss</CODE>: sans serif - <LI><CODE>tt</CODE>: monospaced - <LI><CODE>mm</CODE>: math mode - <LI><CODE>cg</CODE>: calligraphy - </UL> -<LI>Use typescript <CODE>[C][D][name]</CODE> to define the styles for -this variant. <CODE>C</CODE> can be any name you like, but by -convention is commonly one or more of: - <UL> - <LI><CODE>serif</CODE> - <LI><CODE>sans</CODE> - <LI><CODE>mono</CODE> - <LI><CODE>math</CODE> - <LI><CODE>handwriting</CODE> - </UL> - -<CODE>D</CODE> can be any name you like. Usually it is some variation -on the font name. - -<LI>Use typescript <CODE>[C][E][size]</CODE> to define the size -information for this typeface. - -<LI>Use <CODE>F</CODE> for other options, typically -<CODE>encoding</CODE> and <CODE>rscale</CODE>. -</UL> - -<STRONG>Example.</STRONG> Now we can interpret the setup of the font -Charter as given above: - -<BLOCKQUOTE> -<CODE><PRE> -\starttypescript [serif] [charter] [name] - \usetypescript[serif][fallback] - \definefontsynonym [Serif] [Charter-Roman] - \definefontsynonym [SerifBold] [Charter-Bold] - \definefontsynonym [SerifItalic] [Charter-Italic] - \definefontsynonym [SerifBoldItalic] [Charter-Bold-Italic] -\stoptypescript - -\starttypescript [Charter] - \definetypeface [MyCharter] [rm] [serif] [charter] [default] [encoding=8r] -\stoptypescript -</PRE></CODE> -</BLOCKQUOTE> - -This means: - <UL> - <LI>Create a typescript <CODE>Charter</CODE> which packages all - the following. - <LI>Define a font "MyCharter" in its normal (roman) variant. - <LI>Use typescript <CODE>[serif][charter][name]</CODE> to define - its styles. - <LI>Use typescript <CODE>[serif][fallback]</CODE> for any styles - we haven't defined. - <LI>Use typescript <CODE>[serif][default]</CODE> for the size - information. (Found in <CODE>type-siz.tex</CODE>). - <LI>Use encoding <CODE>8r</CODE>. - </UL> - -<STRONG>What are the predefined style names?</STRONG> The style names -used in the <CODE>\definefontsynonym</CODE> are special in that -ConTeXt uses them to implement the font switching macros such as -<CODE>\bf, \it, \sc, </CODE> etc. The predefined names are: - - <CODE> - <UL> - <LI>[Serif,Sans,Mono] - <LI>[Serif,Sans,Mono]Bold - <LI>[Serif,Sans,Mono]Italic - <LI>[Serif,Sans,Mono]BoldItalic - <LI>[Serif,Sans,Mono]Slanted - <LI>[Serif,Sans,Mono]BoldSlanted - <LI>[Serif,Sans,Mono]Caps - </UL> - </CODE> - -<P>We also have these styles: - - <CODE> - <UL> - <LI>MathAlpha - <LI>MathAlphaBold - <LI>MathBeta - <LI>MathExtension - <LI>MathExtensionBold - <LI>MathGamma - <LI>MathItalic - <LI>MathItalicBold - <LI>MathRoman - <LI>MathRomanBold - <LI>MathSymbol - <LI>MathSymbolBold - <LI>OldStyle - </UL> - </CODE> - -<P> - -</BLOCKQUOTE> - -</BLOCKQUOTE> -<H2><A NAME="newfont">Installing New Fonts</A></H2> -<BLOCKQUOTE> -<H3><A NAME="newfont-type1">Type1</A></H3> - -<H4><A NAME="newfont-type1-texfont">Using <CODE>texfont</CODE></A></H4> -<BLOCKQUOTE> -The <CODE>texfont</CODE> utility is part of the ConTeXt package. It -can be used instead of <CODE>fontinst</CODE> to install new fonts. The -manual is <EM>Texfont Explained</EM> (<CODE>mtexfont.pdf</CODE>). - -<P>I purchased Adobe Sabon from <A -HREF="http://www.eyewire.com/">Eyewire</A> because the Adobe site was -not happy with my browser that day. The typeface was in two -packages: "Sabon" and "Sabon SC+OSF". I chose the Windows Type1 -variants and downloaded these two files: - -<BLOCKQUOTE> -<CODE><PRE>17100088.exe -17100197.exe</PRE></CODE> -</BLOCKQUOTE> - -I had been told that these .exe files were actually zip archives. Not -true. They were MS Windows executables. I had to take them to an MS -machine to unpack them. - -<P>The Sabon files: - -<BLOCKQUOTE> -<CODE><PRE>Install instructions.txt -license.txt -readme.txt -sab_____.afm -sabi____.afm -sabi____.inf -sab_____.inf -sabi____.pfb -sabi____.pfm -sab_____.pfb -sab_____.pfm -sai_____.afm -sai_____.inf -sai_____.pfb -sai_____.pfm -sar_____.afm -sar_____.inf -sar_____.pfb -sar_____.pfm</PRE></CODE> -</BLOCKQUOTE> - -<P>The Sabon SC+OSF files: - -<BLOCKQUOTE> -<CODE><PRE>Install instructions.txt -license.txt -readme.txt -sabio___.afm -sabio___.inf -sabio___.pfb -sabio___.pfm -sabof___.afm -sabof___.inf -sabof___.pfb -sabof___.pfm -saiof___.afm -saiof___.inf -saiof___.pfb -saiof___.pfm -sarsc___.afm -sarsc___.inf -sarsc___.pfb -sarsc___.pfm</PRE></CODE> -</BLOCKQUOTE> - -Only the <CODE>.afm</CODE> and <CODE>.pfb</CODE> files are needed for -TeX. - -<P>I put the originals in a safe place and copied all the files into a -temporary directory: <CODE>/tmp/fonts</CODE>. I decided to use the TeX -root under my home directory for installing new fonts: -<CODE>/home/wmcclain/texmf</CODE>. - -<P>For some reason the texfont utility is not executable when I -install ConTeXt on my system, so I first do: - -<BLOCKQUOTE> -<CODE><PRE>su root -chmod +x /usr/share/texmf/context/perltk/texfont.pl</PRE> -</CODE> -</BLOCKQUOTE> - -Then, installing the font is a simple matter of: - -<BLOCKQUOTE> -<CODE> -/usr/share/texmf/context/perltk/texfont.pl --fontroot=/home/wmcclain/texmf --sourcepath=/tmp/fonts --vendor=adobe --collection=sabon --makepath --install -</CODE> -</BLOCKQUOTE> - -I find these new paths and files created: - -<P>Under <CODE>/home/wmcclain/texmf/fonts/tfm/adobe/sabon</CODE>: - -<BLOCKQUOTE> -<CODE><PRE>texnansi-raw-sabio.tfm -texnansi-raw-sabi.tfm -texnansi-raw-sabof.tfm -texnansi-raw-sab.tfm -texnansi-raw-saiof.tfm -texnansi-raw-sai.tfm -texnansi-raw-sarsc.tfm -texnansi-raw-sar.tfm -texnansi-sabio.tfm -texnansi-sabi.tfm -texnansi-sabof.tfm -texnansi-sab.tfm -texnansi-saiof.tfm -texnansi-sai.tfm -texnansi-sarsc.tfm -texnansi-sar.tfm</PRE> -</CODE> -</BLOCKQUOTE> - -Under <CODE>/home/wmcclain/texmf/fonts/type1/adobe/sabon</CODE>: - -<BLOCKQUOTE> -<CODE><PRE>sabio___.pfb -sabi____.pfb -sabof___.pfb -sab_____.pfb -saiof___.pfb -sai_____.pfb -sar_____.pfb -sarsc___.pfb</PRE> -</CODE> -</BLOCKQUOTE> - -Under <CODE>/home/wmcclain/texmf/fonts/vf/adobe/sabon</CODE>: - -<BLOCKQUOTE> -<CODE><PRE>texnansi-sabio.vf -texnansi-sabi.vf -texnansi-sabof.vf -texnansi-sab.vf -texnansi-saiof.vf -texnansi-sai.vf -texnansi-sarsc.vf -texnansi-sar.vf</PRE> -</CODE> -</BLOCKQUOTE> - -And finally, this file: - -<BLOCKQUOTE> -<CODE>/home/wmcclain/texmf/pdftex/config/texnansi-adobe-sabon.map</CODE> -</BLOCKQUOTE> - -which contains the lines: - -<BLOCKQUOTE> -<CODE><PRE>% This file is generated by the TeXFont Perl script. -% -% You need to add the following line to pdftex.cfg: -% -% map +texnansi-adobe-sabon.map -% -% Alternatively in your TeX source you can say: -% -% \pdfmapfile{+texnansi-adobe-sabon.map} -% -% In ConTeXt you can best use: -% -% \loadmapfile[texnansi-adobe-sabon.map] - -texnansi-raw-sab Sabon-Bold 4 < sab_____.pfb texnansi.enc -texnansi-raw-sabi Sabon-BoldItalic 4 < sabi____.pfb texnansi.enc -texnansi-raw-sabio Sabon-BoldItalicOsF 4 < sabio___.pfb texnansi.enc -texnansi-raw-sabof Sabon-BoldOsF 4 < sabof___.pfb texnansi.enc -texnansi-raw-sai Sabon-Italic 4 < sai_____.pfb texnansi.enc -texnansi-raw-saiof Sabon-ItalicOsF 4 < saiof___.pfb texnansi.enc -texnansi-raw-sar Sabon-Roman 4 < sar_____.pfb texnansi.enc -texnansi-raw-sarsc Sabon-RomanSC 4 < sarsc___.pfb texnansi.enc</PRE> -</CODE> -</BLOCKQUOTE> - -That's the complete installation. We still have to define the -typeface to ConTeXt, using the techniques shown above in "Selecting -Fonts - Using Typescripts". - -<P>I create a file <CODE>type-sabon.tex</CODE> in the TeX path, which contains: - -<BLOCKQUOTE> -<CODE><PRE>% -% Adobe Sabon -% -\usetypescriptfile[type-buy] -\loadmapfile[texnansi-adobe-sabon.map] - -\starttypescript [serif] [sabon] [texnansi] - \definefontsynonym [Sabon-Roman] [texnansi-sar] [encoding=texnansi] - \definefontsynonym [Sabon-Bold] [texnansi-sab] [encoding=texnansi] - \definefontsynonym [Sabon-Italic] [texnansi-sai] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-Italic] [texnansi-sabi] [encoding=texnansi] - \definefontsynonym [Sabon-Roman-SmallCaps][texnansi-sarsc] [encoding=texnansi] - \definefontsynonym [Sabon-Italic-OSF] [texnansi-saiof] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-OSF] [texnansi-sabof] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-Italic-OSF][texnansi-sabio] [encoding=texnansi] -\stoptypescript - -\starttypescript [serif] [sabon] [name] - \usetypescript[serif][fallback] - \definefontsynonym [Serif] [Sabon-Roman] - \definefontsynonym [SerifBold] [Sabon-Bold] - \definefontsynonym [SerifItalic] [Sabon-Italic] - \definefontsynonym [SerifBoldItalic] [Sabon-Bold-Italic] - \definefontsynonym [SerifCaps] [Sabon-Roman-SmallCaps] - % the regular old-style figures are in the small-caps file - \definefontsynonym [OldStyle] [Sabon-Roman-SmallCaps] -\stoptypescript - -\starttypescript [Sabon] - \definetypeface [Sabon] [rm] [serif] [sabon] [default] [encoding=texnansi] -\stoptypescript</PRE> -</CODE> -</BLOCKQUOTE> - -<STRONG>Important</STRONG>: the <CODE>\loadmapfile</CODE> macro will -<STRONG>not</STRONG> work unless the -<CODE>\autoloadmapfilestrue</CODE> line is uncommented in -<CODE>cont-sys.tex</CODE>. - -<P><STRONG>Important</STRONG>: note that we do <STRONG>not</STRONG> -reference the <CODE>texnansi-raw-*</CODE> files in the font -declaration. I made that mistake in the first version. That usage works -for many characters, but not for ligatures and some other things. The -right way to do it is to reference the virtual font files, as shown. - -<P>Using the font is easy: - -<BLOCKQUOTE> -<CODE><PRE>\usetypescriptfile[type-sabon] -\usetypescript[Sabon] -\setupbodyfont[Sabon] - -\starttext -This is Sabon roman, {\it italic,} {\bf bold,} and {\bi bold-italic.} - -{\em \bf This is also bold-italic.} - -We have {\sc small caps} and old-style figures: {\os 0123456789}. -\stoptext</PRE> -</CODE> -</BLOCKQUOTE> - -The font files defined in the typescript give us a palette for -assembling new typefaces. For example, I bought eight font files, but -three are not being used, the ones that have bold and italic old-style -figures: - -<BLOCKQUOTE> -<CODE><PRE>[Sabon-Italic-OSF] [texnansi-saiof] -[Sabon-Bold-OSF] [texnansi-sabof] -[Sabon-Bold-Italic-OSF][texnansi-sabio]</PRE> -</CODE> -</BLOCKQUOTE> - -Indeed, ConTeXt does not provide a way of combining both old-style and -bold or italic; this does not do what you think it might: -<BLOCKQUOTE> -<CODE> -{\em \os 0123456789} -</CODE> -</BLOCKQUOTE> - -The figures will be old-style regular, not italic. The way to use -these fonts is to define a new typeface that always uses old-style -figures in the bold and italic forms. We add some lines to -<CODE>type-sabon.tex</CODE> which now looks like: - -<BLOCKQUOTE> -<CODE><PRE>% -% Adobe Sabon -% -\usetypescriptfile[type-buy] -\loadmapfile[texnansi-adobe-sabon.map] - -\starttypescript [serif] [sabon, sabon-oldstyle] [texnansi] - \definefontsynonym [Sabon-Roman] [texnansi-sar] [encoding=texnansi] - \definefontsynonym [Sabon-Bold] [texnansi-sab] [encoding=texnansi] - \definefontsynonym [Sabon-Italic] [texnansi-sai] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-Italic] [texnansi-sabi] [encoding=texnansi] - \definefontsynonym [Sabon-Roman-SmallCaps][texnansi-sarsc] [encoding=texnansi] - \definefontsynonym [Sabon-Italic-OSF] [texnansi-saiof] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-OSF] [texnansi-sabof] [encoding=texnansi] - \definefontsynonym [Sabon-Bold-Italic-OSF][texnansi-sabio] [encoding=texnansi] -\stoptypescript - -\starttypescript [serif] [sabon] [name] - \usetypescript[serif][fallback] - \definefontsynonym [Serif] [Sabon-Roman] - \definefontsynonym [SerifBold] [Sabon-Bold] - \definefontsynonym [SerifItalic] [Sabon-Italic] - \definefontsynonym [SerifBoldItalic] [Sabon-Bold-Italic] - \definefontsynonym [SerifCaps] [Sabon-Roman-SmallCaps] - % the regular old-style figures are in the small-caps file - \definefontsynonym [OldStyle] [Sabon-Roman-SmallCaps] -\stoptypescript - -\starttypescript [Sabon] - \definetypeface [Sabon] [rm] [serif] [sabon] [default] [encoding=texnansi] -\stoptypescript - -\starttypescript [serif] [sabon-oldstyle] [name] - \usetypescript[serif][fallback] - \definefontsynonym [Serif] [Sabon-Roman] - \definefontsynonym [SerifBold] [Sabon-Bold-OSF] - \definefontsynonym [SerifItalic] [Sabon-Italic-OSF] - \definefontsynonym [SerifBoldItalic] [Sabon-Bold-Italic-OSF] - \definefontsynonym [SerifCaps] [Sabon-Roman-SmallCaps] - % the regular old-style figures are in the small-caps file - \definefontsynonym [OldStyle] [Sabon-Roman-SmallCaps] -\stoptypescript - -\starttypescript [SabonOldStyle] - \definetypeface [SabonOldStyle] [rm] [serif] [sabon-oldstyle] [default] [encoding=texnansi] -\stoptypescript</PRE> -</CODE> -</BLOCKQUOTE> - -Then we can see our old-style figures: - -<BLOCKQUOTE> -<CODE><PRE>\usetypescriptfile[type-sabon] -\usetypescript[SabonOldStyle] -\setupbodyfont[SabonOldStyle] - -\starttext -This is Sabon roman 0123456789, -old-style \os 0123456789, -{\it italic 0123456789,} -{\bf bold 0123456789,} -and {\bi bold-italic 0123456789.} - -{\em \bf This is also bold-italic 0123456789.} - -\stoptext -</PRE> -</CODE> -</BLOCKQUOTE> - -Note that the usage is a bit inconsistent: bold and italic use -old-style figures by default and do not require <CODE>\os</CODE>, but -the regular font uses the standard "lining" figures and does require -<CODE>\os</CODE> for the old-style figures. It would be more -consistent to make old-style the default for the regular font, but we -would need to make a virtual font to do that. (Reason: the regular -old-style figures are contained in the small-caps font file. Virtual -fonts allow us to assemble portions of existing font files into a new -"view"). - -<P>Using the scheme shown here, if we want both lining and old-style -figures in bold or italic, we have to use both typefaces and switch -between them as necessary. - -<P>This example does not provide any math mode definitions. - -</BLOCKQUOTE> - -<H3><A NAME="newfont-truetype">TrueType</A></H3> -</BLOCKQUOTE> - -<H2><A NAME="typography">Typography</A></H2> - -I use TeX to typeset books for print publication. Just as I am a -beginning TeX user, so am I a beginning typographer and book designer -(but a very serious one). - -<P>My interest is in traditional forms suitable for novels and the -like. All the examples I give below are intended for that use. I have -generally followed the advice given by these authors: - -<UL> -<LI>Robert Bringhurst, <EM>The Elements of Typographic Style</EM> -<LI>Jan Tschichold, <EM>The Form of the Book</EM> -<LI>Geoffrey Dowding, <EM>Finer Points in the Spacing & Arrangement of Type</EM> -</UL> - -<BLOCKQUOTE> -<H3><A NAME="typography-wordspacing">Tight word spacing</A></H3> - -Do not insert extra space at the end of sentences. Use small paragraph -indententation and do not use vertical spacing between parapgraphs. - -<P>In plain TeX, tight spacing at the end of sentences is called -<CODE>\frenchspacing</CODE>. - -<BLOCKQUOTE> -<CODE><PRE>\setupspacing[packed] % normal word space at the end of sentences -\setupindenting[small] % small paragraph indent; about 1em? -\setupwhitespace[none] % no space between paragraphs -</PRE></CODE> -</BLOCKQUOTE> - -<H3><A NAME="typography-indenting">Indenting</A></H3> - -You can bring in the margins for a quotation or extract with -<CODE>\startnarrower ... \stopnarrower</CODE>. The amount of -indentation is in predefined units which are established separately -for the left, right, and middle (which does both left and right by the -same amount). For example, I could do something like: - -<BLOCKQUOTE> -<CODE>\setupnarrower[left=4em,right=2in,middle=3cm]</CODE> -</BLOCKQUOTE> - -And then: - -<BLOCKQUOTE> -<CODE><PRE>\startnarrower[3*left] % indents left margin 12em -\startnarrower[right] % indents right margin 2 inches -\startnarrower[2*middle] % indents both margins 6 cm -</PRE></CODE> -</BLOCKQUOTE> - -The manual shows how to combine parameters. - -<P><CODE>\startnarrower</CODE> without parameters is the same as -<CODE>\startnarrower[middle]</CODE>. - -<P>There is a reasonable default indentation size, but I don't know its -exact dimension. - -<H3><A NAME="typography-symbols">Using smaller symbols</A></H3> - -Dowding says that "&" can be substituted for "and" wherever doing so -improves the page. This is <STRONG>not</STRONG> a license to globally -replace all such occurances; I use the technique only as a last resort -to eliminate an overfull box. - -<P>In the fonts I have used the full-height "&" seems too large in -body text, so I use a smaller version: - -<BLOCKQUOTE> -<CODE>\def\Ampersand{{\tfx \&}}</CODE> -</BLOCKQUOTE> - -The italic "&" is often a fancier glyph and might be useful; or it -might be too fancy for body text use. I would use the italic version -in Computer Modern, but the regular glyph in Adobe Sabon. - -<P>I also think the full-size "$" is too big in body text, and use a -reduced version: - -<BLOCKQUOTE> -<CODE>\def\Dollar{{\tfx \$}}</CODE> -</BLOCKQUOTE> - -<H3><A NAME="typography-dashes">Dashes</A></H3> - -The em-dash is too wide. Use a spaced en-dash instead: "<CODE> -- -</CODE>". Depending on the context, it might be necessary to use a -non-breaking space (~) on either side to prevent an unwanted line break. - -<H3><A NAME="typography-letterspacing">Letterspacing capitals and small caps</A></H3> - -The experts say that strings of uppercase and small-cap words should -be slightly letterspaced. I find that a very little spacing is -"plenty." Sometimes it does not look right at all, and I omit -it. Note that it is an offence against typography to letterspace -lowercase letters. - -<P>Since getting a tip from Hans Hagen, I have used these macros: - -<BLOCKQUOTE> -<CODE><PRE>\def\CapStretchAmount{.08em} -\def\CapStretch#1{\def\stretchedspaceamount{\CapStretchAmount}\stretchednormalcase{#1}}</PRE> -</CODE> -</BLOCKQUOTE> - -Which is used as so: - -<BLOCKQUOTE> -<CODE>\CapStretch{\sc The King in Yellow}</CODE> -</BLOCKQUOTE> - -<H3><A NAME="typography-hanging">Margin kerning: Hanging punctuation and protruding characters</A></H3> - -The typography references say that a justified margin does not look -"optically" straight when the characters are "mechanically" aligned to -that margin, because some characters are too light to color the -margin. The margin looks straighter if they are pushed farther -into it. - -<P>I have seen very few examples of this technique in the real world -(other than photos of Gutenberg's Bible) so it is hard to judge its -proper use. Experimentation and considered judgement are required. - -<P>The technique is supported by pdfTeX and ConTeXt. See Hàn -Thê Thành's dissertation: <EM><A -HREF="http://www.pragma-ade.nl/pdftex/thesis.pdf">Micro-typographic -extensions to the TEX typesetting system</A></EM>, and <EM>Fonts in -ConTeXt</EM> (<CODE>mfonts.pdf</CODE>). - -<P>Note that in TeX the technique does not merely stretch the -whitespace between words; it actually enters into the line-breaking -algorithm and can greatly alter a paragraph's setting. - -<P>ConTeXt comes with a couple of prededefined settings. You can see -the definitions in <CODE>type-exa.tex</CODE> and -<CODE>hang-def.tex</CODE>. To move the small puncuation marks a full -em into the margin, use: - -<BLOCKQUOTE> -<CODE>\usetypescript [serif,sans,mono] [hanging] [pure]</CODE> -</BLOCKQUOTE> - -To use a slightly less drastic style which also shifts alphabetic -characters very slightly, use: - -<BLOCKQUOTE> -<CODE>\usetypescript [serif,sans,mono] [hanging] [thanh]</CODE> -</BLOCKQUOTE> - -Margin kerning is enabled with something like: - -<BLOCKQUOTE> -<CODE><PRE>\usetypescript [serif,sans,mono] [hanging] [thanh] -\usetypescriptfile[type-sabon] -\usetypescript[Sabon] -\setupbodyfont[Sabon] -\setupalign[hanging]</PRE></CODE> -</BLOCKQUOTE> - -<STRONG>Important:</STRONG> The case for the default font, Computer -Modern, is more complicated. Hanging alignment must be defined before -the font is loaded, but Computer Modern is loaded before our -definitions. The solution is to load it again after the definitions: - -<BLOCKQUOTE> -<CODE><PRE>\setupfontsynonym[cmr10][handling=pure] -\setupfontsynonym[Serif][handling=pure] -\setupfonthandling[normal][left=1,right=1] -\usetypescript[cmr] -\setupbodyfont[10pt]</PRE></CODE> -</BLOCKQUOTE> - -You can customize your own settings. In fact, different fonts need -different settings. For example, I added these lines to my -<CODE>type-sabon.tex</CODE> file (stolen from -<CODE>hang-def.tex</CODE>, still to be adapted): - -<BLOCKQUOTE> -<CODE><PRE>\startfonthandling [sabon] - - \defineprotrudefactor ! 0 .2 - \defineprotrudefactor ' 0 .7 - \defineprotrudefactor ` .7 0 - \defineprotrudefactor ( .05 0 - \defineprotrudefactor ) 0 .05 - \defineprotrudefactor [ .05 0 - \defineprotrudefactor ] 0 .05 - \defineprotrudefactor , 0 .7 - \defineprotrudefactor - 0 .7 - \defineprotrudefactor . 0 .7 - \defineprotrudefactor : 0 .5 - \defineprotrudefactor ; 0 .5 - - \defineprotrudefactor rightupperninequote 0 .5 - \defineprotrudefactor leftupperninequote .5 0 - \defineprotrudefactor endash 0 .3 - \defineprotrudefactor emdash 0 .2 - - \defineprotrudefactor hyphen 0 .7 - - \defineprotrudefactor A .05 .05 - \defineprotrudefactor F 0 .05 - \defineprotrudefactor J .05 0 - \defineprotrudefactor K 0 .05 - \defineprotrudefactor L 0 .05 - \defineprotrudefactor T .05 .05 - \defineprotrudefactor V .05 .05 - \defineprotrudefactor W .05 .05 - \defineprotrudefactor X .05 .05 - \defineprotrudefactor Y .05 .05 - - \defineprotrudefactor k 0 .05 - \defineprotrudefactor r 0 .05 - \defineprotrudefactor t 0 .05 - \defineprotrudefactor v .05 .05 - \defineprotrudefactor w .05 .05 - \defineprotrudefactor x .05 .05 - \defineprotrudefactor y .05 .05 - - % accented chars omitted from this example - -\stopfonthandling - -\starttypescript [serif] [hanging] [sabon] - \setupfontsynonym [Serif] [handling=sabon] - % not handling these yet - %\setupfontsynonym [SerifBold] [handling=bold] - %\setupfontsynonym [SerifSlanted] [handling=slanted] - %\setupfontsynonym [SerifItalic] [handling=italic] - %\setupfontsynonym [SerifBoldSlanted] [handling=boldslanted] - %\setupfontsynonym [SerifBoldItalic] [handling=bolditalic] -\stoptypescript</PRE></CODE> -</BLOCKQUOTE> - -Using these custom settings is just a matter of: - -<BLOCKQUOTE> -<CODE><PRE>\usetypescriptfile[type-sabon] -\usetypescript [serif] [hanging] [sabon] -\usetypescript[Sabon] -\setupbodyfont[Sabon] -\setupalign[hanging] -</PRE></CODE> -</BLOCKQUOTE> - -</BLOCKQUOTE> - -<HR> - -<A HREF="mailto:wmcclain@salamander.com">Comments?</A> -<ADDRESS>Bill McClain (wmcclain@salamander.com)</ADDRESS> - -</BODY> -</HTML> - - - - |