%!TEX TS-program = xetex %!TEX encoding = UTF-8 Unicode % ##################################### % Fonts used: % EB Garamond (old version) % https://bitbucket.org/georgd/eb-garamond/downloads/ % ##################################### \input eplain \beginpackages \usepackage{url} \usepackage{color} \usepackage{graphicx} \endpackages \enablehyperlinks %++++++++++++++++++++++++++++++++++++++++++++++++ % page layout \pdfpagewidth 210mm \pdfpageheight 297mm \hsize 170mm %\vsize 230mm \vsize 656pt \hoffset -5.4mm \voffset -5.4mm % American settings %\pdfpagewidth 215.9mm%8.5in %\pdfpageheight 279.4mm%11in %\hsize 170mm %\vsize 656pt %\hoffset -2.45mm %\voffset -5.4mm %++++++++++++++++++++++++++++++++++++++++++++++++ \tolerance 1414 \hbadness 1414 \hyphenpenalty 500 \finalhyphendemerits 7500 \emergencystretch 7pt \hfuzz 0.3pt \vfuzz=\hfuzz % paragraph spacing \parskip 0pt \parindent 1.2em \baselineskip 17pt \setbox\strutbox=\hbox{\vrule height12.042pt depth4.958pt width0pt} \frenchspacing % line break macro; like `\\' in LaTeX or
in HTML \def\nl{\hfil\break} % for forcing a page break within a paragraph; like \pagebreak in LaTeX \def\pagebreak{\vadjust{\eject}} % like \newpage (or \clearpage?) in LaTeX; could be used e.g. for the end of a chapter \def\newpage{\vfill\eject} % footnote macro from the TeXbook++++++++++++++++ \catcode`\@=11 \def\footnote#1{\edef\@sf{\spacefactor\the\spacefactor}#1\@sf \insert\footins\bgroup\ninepoint \interlinepenalty100 \let\par=\endgraf \leftskip=0pt \rightskip=0pt \splittopskip=10pt plus 1pt minus 1pt \floatingpenalty=20000 \smallskip\item{#1}\bgroup\strut\aftergroup\@foot\let\next} \skip\footins=12pt plus 2pt minus 4pt % space added when footnote exists \dimen\footins=30pc % maximum footnotes per page \font\ninerm="EB Garamond 12 Regular:mapping=tex-text" at 9.4pt \font\ninett=cmtt10 \def\ninepoint{\def\rm{\fam0\ninerm}% \normalbaselineskip=11pt \setbox\strutbox=\hbox{\vrule height8pt depth3pt width\z@}% \def\tt{\fam\ttfam\ninett} \normalbaselines\rm} \catcode`\@=12 %++++++++++++++++++++++++++++++++++++++++++++++++ %\font\tt=cmtt12 \font\tt="[lmmono12-regular]" at 12pt \font\rm="EB Garamond 12 Regular:mapping=tex-text" at 14pt% roman font \font\it="EB Garamond 12 Regular/I:mapping=tex-text" at 14pt% italic font \font\sc="EB Garamond 12 Regular:+smcp,mapping=tex-text" at 14pt% small cap font \font\ctsc="EB Garamond 12 Regular:+c2sc,mapping=tex-text" at 14pt% caps to small caps font \font\Rm="EB Garamond 12 Regular:mapping=tex-text" at 16pt % a spaced smallcap font for the page header \font\headerfont="EB Garamond 12 Regular:+smcp,letterspace=6,mapping=tex-text" at 12pt \font\Large="DejaVu Sans/B:mapping=tex-text" at 12pt% bold font for headings \def\heading#1{\bigskip\centerline{\Large#1}\medskip\nobreak}% macro for headings \headline={\hfil}% no header on first page of document \footline={\rm\hfil\folio\hfil} %%%%%%%%%%%%%%%%%%%%%%% % START OF DOCUMENT %%%%%%%%%%%%%%%%%%%%%%% \rm% set the main font for the document \centerline{\Rm Open\kern-1pt Type fonts in \XeTeX}\bigskip \heading{Basic Styles: regular, italic, small cap} \noindent Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut {\it labore et dolore magna aliqua}. {\sc Utc enim ad minim} veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \medskip Standard ligatures (ff fi fl ffi ffl) and kerning ({\tt kern}) are usually applied by default.\nl So\nl {\tt\string\font\string\rm="EB Garamond 12 Regular:mapping=tex-text" at 12pt}\nl and\nl {\tt\string\font\string\rm="EB Garamond 12 Regular:+kern,+liga,mapping=tex-text" at 12pt}\nl produce the same output. If you want to turn off kerning and f-ligatures you could have a font like this:\nl {\tt\spaceskip.3em\string\font \string\garaplain="EB Garamond 12 Regular:-kern,-liga,mapping=tex-text" at 12pt} % font with lining tabular numbers \font\garalnumt="EB Garamond 12 Regular:+lnum,+tnum,mapping=tex-text" at 14pt % font with lining proportional numbers \font\garalnump="EB Garamond 12 Regular:+lnum,+pnum,mapping=tex-text" at 14pt % font with old style tabular numbers \font\garaonumt="EB Garamond 12 Regular:+onum,+tnum,mapping=tex-text" at 14pt % font with old style proportional numbers \font\garaonump="EB Garamond 12 Regular:+onum,+pnum,mapping=tex-text" at 14pt % superscripts font \font\garasups="EB Garamond 12 Regular:+sups" at 14pt % subscripts font \font\garasubs="EB Garamond 12 Regular:+subs" at 14pt % ordinals font \font\garaord="EB Garamond 12 Regular:+ordn" at 14pt % scientific inferiors font \font\garasinf="EB Garamond 12 Regular:+sinf" at 14pt % fractions font \font\frac="EB Garamond 12 Regular:+frac" at 14pt % numerator font \font\numr="EB Garamond 12 Regular:+numr" at 14pt % denominator font \font\dnom="EB Garamond 12 Regular:+dnom" at 14pt % font with historical ligatures \font\garhlig="EB Garamond 12 Regular:+hlig" at 14pt % italic font with historical ligatures \font\garhligi="EB Garamond 12 Regular/I:+hlig" at 14pt % font with contextual ligatures \font\garcligi="EB Garamond 12 Regular/I:+clig" at 14pt % font with discretionary ligatures \font\gardlig="EB Garamond 12 Regular:+dlig" at 14pt % font with contextual alternates \font\garacalt="EB Garamond 12 Regular:+calt" at 14pt % swash font \font\garaswash="EB Garamond 12 Regular/I:+swsh" at 14pt % swash small cap font \font\garaswashsc="EB Garamond 12 Regular/I:+swsh,+c2sc" at 14pt \font\garadeutsch="EB Garamond 12 Regular:+locl" at 14pt \font\garauv="EB Garamond 12 Regular:+ss02,mapping=tex-text" at 14pt \font\garacvone="EB Garamond 12 Regular:+cv01,mapping=tex-text" at 14pt \heading{Some Open\kern-1pt Type features present in EB Garamond:} \item{•}Lining tabular numbers ({\tt lnum}, {\tt tnum}): {\garalnumt 0123456789}\nl \phantom{Lining tabular numbers ({\tt lnum}, {\tt tnum}):} {\garalnumt 2113114115} \item{•}Lining proportional numbers ({\tt lnum}, {\tt pnum}): {\garalnump 0123456789}\nl \phantom{Lining proportional numbers ({\tt lnum}, {\tt pnum}):} {\garalnump 6117118119} % using a \vtop here is perhaps more idiomatic TeX than the % weird \phantom method I used for the other numeral sets \item{•}Old style tabular numbers ({\tt onum}, {\tt tnum}): \vtop{\noindent\garaonumt 0123456789\nl 2113114115\strut} \item{•}Old style proportional numbers ({\tt onum}, {\tt pnum}): {\garaonump 0123456789}\nl \rlap{(the default in this font)}\phantom{Old style proportional numbers ({\tt onum}, {\tt pnum}):} {\garaonump 6117118119} \item{•}Superscripts ({\tt sups}): {\garalnumt 2{\garasups 8} = 256} \item{•}Subscripts ({\tt subs}): {\garalnumt 11111111{\garasubs 2}} = {\garalnumt 255{\garasubs 10}} \item{•}Ordinals ({\tt ordn}): 1{\garaord st}, 2{\garaord nd}, 3{\garaord rd} \item{•}Scientific inferiors ({\tt sinf}): H{\garasinf 2}O\nl (Scientific inferiors vs subscripts: H{\garasinf 2}O H{\garasubs 2}O) \item{•}{\tt frac} allows you to write arbitrary fractions: {\frac 1/72} {\frac 325/1000}. {\tt numr} and {\tt dnom} do the same: {\numr 1}⁄{\dnom 72.27} (with a bit more work); but if you set 1/72.27 with {\tt frac} it comes out funny: {\frac 1/72.27}. Use U+2044 `fraction slash' for the bar with {\tt numr} and {\tt dnom}. \item{•}Small caps: {\tt smcp} replaces lower case letters with small caps: XeTeX → {\sc XeTeX}. {\tt c2sc} replaces upper case letters with small caps: XETEX → {\ctsc XETEX}. \item{•}Historical ligatures ({\tt hlig}): {\garhlig standard, acta} {\garhligi speak, skies, standard, select} \item{•}Contextual ligatures ({\tt clig}): {\garcligi finalis, ligatures, humus, rosas} \item{•}Discretionary ligatures ({\tt dlig}): controls the `Th' ligature: {\gardlig The quick brown fox} \item{•}Contextual alternates ({\tt calt}): this tag controls the behaviour of the ascender of `f'. Where f would collide with a diacritic, a version of f with a shorter ascender is used: {\garacalt ich fahre, du fährst}. Similarly with `long s' (ſ\kern2pt). This tag also controls the length of the tail of `Q': {\garacalt Qui, Quis, Quo, IRAQ}. \item{•}Swash letters ({\tt swsh}): {\garaswash A B C D E F G H I J K L M N O P Q Qui R S T U V W X Y~Z} \item{•}In some Renaissance printing an initial u or v was printed as `v', medial and final u or v as `u'. {\tt ss02} converts initial u or v to v; in other positions u or v is always u: {\garauv Ut sæpe homines ægri morbo gravi, cum æstu febrique iactantur, si aquam gelidam biberunt, primo relevari videntur, deinde multo gravius vehementiusque adflictantur, sic hic morbus qui est in re publica relevatus istius pœna vehementius reliquis vivis ingravescet.} \item{•}{\tt cv01} seems to be clever enough to distinguish between initial and medial `ſ' and terminal `s' (cf. {\tt hist} `historical forms' in the file {\tt pala.tex}): {\garacvone Quo usque tandem abutere, Catilina, patientia nostra? quam diu etiam furor iste tuus nos eludet?} The long s fell out of use in the late eighteenth century. \medskip OpenType fonts can also have script tags (usually four letters long) and language tags (usually three letters long), e.g. under the Latin script ({\tt latn}), there are German ({\tt deu}), Catalan ({\tt cat}), Turkish ({\tt trk}) etc language system tags. I’m not sure what they actually do though. See pages 7–11 of \href{http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf}{\tt xetexmain.pdf}. \font\red="EB Garamond 12 Regular:color=FF0000" at 14pt \font\green="EB Garamond 12 Regular:color=00FF00" at 14pt \font\blue="EB Garamond 12 Regular:color=0000FF" at 14pt \font\yellow="EB Garamond 12 Regular:color=FFFF00" at 14pt \font\wide="EB Garamond 12 Regular:letterspace=6" at 14pt \font\wider="EB Garamond 12 Regular:letterspace=12" at 14pt \font\Wider="EB Garamond 12 Regular:letterspace=24" at 14pt \font\fat="EB Garamond 12 Regular:embolden=1.5" at 14pt \font\Fat="EB Garamond 12 Regular:embolden=2" at 14pt \font\FAT="EB Garamond 12 Regular:embolden=4" at 14pt \font\stretch="EB Garamond 12 Regular:extend= 1.5" at 14pt \font\Stretch="EB Garamond 12 Regular:extend=2" at 14pt \font\STretch="EB Garamond 12 Regular:extend=2.5" at 14pt \font\slant="EB Garamond 12 Regular:slant=0.2" at 14pt \font\Slant="EB Garamond 12 Regular:slant=0.4" at 14pt \font\SLant="EB Garamond 12 Regular:slant=0.6" at 14pt \font\nonslant="EB Garamond 12 Regular/I:slant=-0.25" at 14pt \headline={\hfil{\headerfont xetex fonts}\hfil} \heading{Some features specific to \XeTeX\ (not part of the Open\kern-1pt Type spec):} \item{•}Colour: {\red red} {\green green} {\blue blue} {\yellow yellow}, etc. \item{•}Letterspacing: I {\wide need} {\wider more}\kern7pt {\Wider space}. Entering negative values for {\tt letterspace} squeezes letters closer together. \item{•}Emboldening (computer-generated bold): {\fat Fatter} and {\Fat fatter} and {\FAT fatter}. \item{•}Extending: {\stretch Stretch} and {\Stretch stretch} and {\STretch stretch}. \item{•}Slant (computer-generated slanted roman): {\slant Falling} {\Slant falling} {\SLant falling}. If you enter a negative value for {\tt slant}, the letters will slant to the left. You could also use a negative slant to make a non-slanted italic: {\nonslant back up again.} \item{•}{\tt mapping=tex-text} means traditional \TeX\ mark-up such as {\tt` ', `` '', --, ---} will be converted to the proper typographic glyphs: ‘ ’, “ ”, –, —. Mark up for Spanish punctuation (\hbox{\tt !\kern0pt` ?\kern0pt`} → ¡ ¿) is also controlled by this. \bye