From 02acb9dcec1b3f64653e1aebd74589f5da3e8d5d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 26 Jul 2007 18:14:53 +0000 Subject: new doc package xetexref (23jul07) git-svn-id: svn://tug.org/texlive/trunk@4659 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-doc/doc/english/xetexref/README | 5 + .../doc/english/xetexref/XeTeX-reference.ltx | 599 +++++++++++++++++++++ .../doc/english/xetexref/XeTeX-reference.pdf | Bin 0 -> 124861 bytes .../tlpsrc/collection-documentation-english.tlpsrc | 1 + Master/tlpkg/tlpsrc/xetexref.tlpsrc | 2 + 5 files changed, 607 insertions(+) create mode 100644 Master/texmf-doc/doc/english/xetexref/README create mode 100644 Master/texmf-doc/doc/english/xetexref/XeTeX-reference.ltx create mode 100644 Master/texmf-doc/doc/english/xetexref/XeTeX-reference.pdf create mode 100644 Master/tlpkg/tlpsrc/xetexref.tlpsrc (limited to 'Master') diff --git a/Master/texmf-doc/doc/english/xetexref/README b/Master/texmf-doc/doc/english/xetexref/README new file mode 100644 index 00000000000..481e6133e18 --- /dev/null +++ b/Master/texmf-doc/doc/english/xetexref/README @@ -0,0 +1,5 @@ +This is unofficial reference documentation for XeTeX detailing its +extended features. + +Date: 2007-July-23 +Author: Will Robertson \ No newline at end of file diff --git a/Master/texmf-doc/doc/english/xetexref/XeTeX-reference.ltx b/Master/texmf-doc/doc/english/xetexref/XeTeX-reference.ltx new file mode 100644 index 00000000000..3b8bc8e6bfa --- /dev/null +++ b/Master/texmf-doc/doc/english/xetexref/XeTeX-reference.ltx @@ -0,0 +1,599 @@ +%!TEX TS-program = XeLaTeX+xdvipdfmx + +\documentclass[12pt]{article} + +\makeatletter +\def\@dotsep{999} + +\usepackage{fontspec,xltxtra,xunicode} +\usepackage{lmodern} +\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase} +\setromanfont[Numbers=Lowercase]{FPL Neu} +%\setsansfont{Lucida Sans} +%\setmonofont{Lucida Sans Typewriter} + +\usepackage{calc,fancyvrb,hyperref,refstyle,varioref,xcolor} +\usepackage{geometry} +%\geometry{screen,margin=3cm} + +\usepackage[nofancy]{svninfo} +\svnInfo $Id: XeTeX-reference.ltx 9 2007-06-24 13:10:01Z will $ + +\usepackage[it]{titlesec} +\usepackage{enumitem} +\setlist{nolistsep} + +\newenvironment{optdesc} + {\begin{description}[font=\ttfamily,style=nextline,leftmargin=1.5cm]} + {\end{description}} + +\newcommand\cmd{% + \noindent + \begin{trivlist}\item[] + \SaveVerb[% + aftersave={% + \begin{minipage}{\linewidth} + \UseVerb{CMD}}]{CMD}} +\DefineShortVerb{\|} +\newcommand\xarg[1]{‹\textit{#1}›} +\newcommand\desc[1]{\par#1\par} +\def\endcmd{% + \end{minipage} + \end{trivlist}} + +\def\cs#1{\texttt{\textbackslash#1}} + +\newsavebox\verbatimbox +\edef\examplefilename{\jobname.example} +\newlength\exampleindent +\setlength\exampleindent{1em} + +\newenvironment{example} + {\VerbatimEnvironment + \begin{VerbatimOut}{\examplefilename}} + {\end{VerbatimOut} + \typesetexample} + +\newcommand\typesetexample{% + \begin{trivlist}\item[] + \vrule + \hspace{\exampleindent} + \begin{minipage}{\linewidth-\exampleindent} + \textit{Example:}\par + \vspace{0.4\baselineskip} + \BVerbatimInput[fontsize=\small]{\examplefilename}\par + \vspace{0.4\baselineskip} + \color[rgb]{0.7,0,0}\input\examplefilename\relax + \end{minipage}\par + \end{trivlist}} + +\let\strong\textbf +\providecommand\pdfTeX{pdf\/\TeX} +\newcommand\hlink[2]{\href{#1}{#2}\footnote{\url{#1}}} + +\let\latin\textit +\def\eg{\latin{e.g.}} +\def\ie{\latin{i.e.}} +\def\Eg{\latin{E.g.}} +\def\Ie{\latin{I.e.}} +\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}} + +\def\opteq{\textcolor{gray}{[\textcolor{black}{=}]}\,} + +\setlength\parskip{0pt} +\setlength\parindent{2em} +\raggedbottom + +\begin{document} +\title{The \texorpdfstring{\XeTeX}{XeTeX} reference guide} +\author{Will Robertson} +\date{\svnInfoLongDate} +\maketitle + +\section{Introduction} +This document serves to summarise \XeTeX's additional features without being so much as a `users' guide'. Note that much of the functionality addressed here is provided in abstracted form in various \LaTeX\ packages and Con\TeX{}t modules. + +The descriptions here correspond to a prerelease of version 0.997 of \XeTeX, and should be a fairly exhaustive list of its primitives. Descriptions are still a little aenemic, however. I don't have much time to maintain this document, so contributions are highly welcomed \verb|:)| + +\begin{quote} +\footnotesize\itshape +Copyright © 2007 by Will Robertson. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at \textsl{\url{http://www.opencontent.org/openpub/}}). +\end{quote} + +\tableofcontents + +\part{\texorpdfstring{\XeTeX}{XeTeX}\ specifics} + +\section{The \cs{font} command} +The |\font| command has seen significant addition in \XeTeX\ to facilitate rich font feature selection. Under \TeX, fonts were selected like so: |\font\1="|\xarg{font name}|"| with various options appended such as `|at 10pt|' or `|scaled 1.2|', with obvious meaning. This syntax has been extended in \XeTeX\ by passing additions options through the \xarg{font name}. + +This syntax looks something like\par +{\centering|\font\1="|\xarg{font name}\xarg{font options}|:|\xarg{font features}|"| \xarg{\TeX\ font features}\par}\noindent +The \xarg{font name} is the actual name of the font (e.g., `|Charis SIL|') and the only mandatory part of the above syntax. + +When using the |xdvipdfmx| driver (not yet the default in Mac~OS~X), it is possible to use fonts +that aren't installed in the operating system by surrounding their name with square brackets. The current directory and the |texmf| trees are searched for files named in this way, or the path may be embedded in the +font declaration. \Eg, +\begin{quote}\small +|\font\1="[fp9r8a]"| \hfill \emph{Selects `FPL Neu' in the current directory} +|\font\1="[/myfonts/fp9r8a]"| \hfill \emph{Selects `FPL Neu' somewhere else} +|\font\1="[lmroman10-regular]"| \hfill \emph{Selects a Latin Modern font in the \emph{TDS}} +\end{quote} + +\subsection{Font options} + +\xarg{Font options} are only applicable when the font is selected through the operating system (\ie, without square brackets), and may be any concatenation of the following: + +\begin{optdesc} +\item[/B] Use the bold version of the selected font. +\item[/I] Use the italic version of the selected font. +\item[/BI] Use the bold italic version of the selected font. +\item[/IB] Same as \texttt{/BI}. +\item[/S=$x$] Use the version of the selected font corresponding to the optical size $x$\,pt. +\item[/AAT] Explicitly use the ATSUI renderer (Mac OS X only). +\item[/ICU] Explicitly use the ICU OpenType renderer (only useful on Mac OS X). +\end{optdesc} + +\subsection{Font features} + +The \xarg{font features} is a comma or semi-colon separated list activating or deactivating various AAT or OpenType font features, which will vary by font. +The \XeTeX\ documentation files \path{aat-info.tex} and \path{opentype-info.tex} provide per-font lists of supported features. + +\subsubsection{Arbitrary AAT or OpenType features} +OpenType font features are chosen with \hlink{http://www.microsoft.com/typography/otspec/featuretags.htm}{standard tags}. They may be either comma- or semicolon-separated, and prepended with a |+| to turn them on and a |-| to turn them off. +\begin{example} +\font\warnock="Warnock Pro/I/S=5:+smcp" at 12pt +\warnock This is the OpenType font Warnock Pro in italic + with small caps at a small optical size. +\end{example} + +Varying depending on the language and script in use (see \secref[vref]{script}), a small number of OpenType features, if they exist, will be activated by default. + +AAT font features are specified by strings within each font. Therefore, even equivalent features between different fonts can have different names. +\begin{example} +\font\hoefler="Hoefler Text/B:Letter Case=Small Caps" at 12pt +\hoefler This is the AAT font Hoefler Text in bold with small caps. +\end{example} + +\subsubsection{Options for all fonts} +Some font features may be applied for any font. These are +\begin{optdesc} +\item[mapping=\textsl{}] +Uses the specified font mapping for this font. This uses the TECKit engine to transform unicode characters in the last-minute processing stage of the source. For example, |mapping=tex-text| will enable the classical mappings from ugly ascii |``---''| to proper typographical glyphs ``---'', and so on. + +\item[color={\slshape RRGGBB}{[{\slshape TT}]}] +Triple pair of hex values to specify the colour in RGB space, with an optional value for the transparency. + +\item[letterspace=$x$] +Adds $x/S$ space between letters in words, where $S$ is the font size. +\end{optdesc} + +\subsubsection{OpenType script and language support}\seclabel{script} +OpenType font features (and font behaviour) can vary by \hlink{http://www.microsoft.com/typography/otspec/scripttags.htm}{script} (`alphabet') and by \hlink{http://www.microsoft.com/typography/otspec/languagetags.htm}{language}. These are selected with four and three letter tags, respectively. +\begin{optdesc} +\item[script=\textsl{