summaryrefslogtreecommitdiff
path: root/fonts/xcharter/doc/xcharter-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/xcharter/doc/xcharter-doc.tex')
-rw-r--r--fonts/xcharter/doc/xcharter-doc.tex160
1 files changed, 103 insertions, 57 deletions
diff --git a/fonts/xcharter/doc/xcharter-doc.tex b/fonts/xcharter/doc/xcharter-doc.tex
index 4b1b424909..7ad8b9a56a 100644
--- a/fonts/xcharter/doc/xcharter-doc.tex
+++ b/fonts/xcharter/doc/xcharter-doc.tex
@@ -1,4 +1,4 @@
-% !TEX TS-program = xelatex
+% !TEX TS-program = lualatex
\documentclass[11pt]{article}
%\pdfcompresslevel=0
%\pdfgentounicode=1
@@ -16,8 +16,10 @@
\pdfmapfile{=XCharter.map}\pdfmapfile{=newtx.map}%
\fi\fi
\usepackage[scaled=1.03,varqu,varl]{inconsolata}
-\usepackage[type1]{cabin}
+\usepackage[type1]{sourcesanspro}
+
\usepackage[OT2,T2A,T1]{fontenc}
+
%\traceon
\usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}
%\usepackage[scaled=.98,osf,otfmath]{XCharter}
@@ -105,8 +107,8 @@ There is a theorem font option similar to those in newtx and newpx. A new font f
\item {\tt oldSS} specifies the preference for the old Capital Sharp S rather than the newer form, {\tt U+1E9E}\iftutex, \SS\fi.
\item There are new options that affect only unicode engines:
\begin{itemize}
-\item
-{\tt nofontspec} prevents {\tt XCharter.sty} from loading {\tt fontspec}.
+%\item
+%{\tt nofontspec} prevents {\tt XCharter.sty} from loading {\tt fontspec}.
\item {\tt type1text} (or {\tt type1}) specifies processing the text font using {\tt type1} mode. This does not prevent {\tt fontspec} from loading.
\item {\tt defaultfeatures=} gives you a place to set the default text font features for {\tt fontspec}.
\end{itemize}
@@ -141,8 +143,57 @@ There is a theorem font option similar to those in newtx and newpx. A new font f
\verb|\textth{Theorem font (01234):!}| renders as \textth{Theorem font (01234):!}---note the upright figures and punctuation. (There is no Bold theorem font---\verb|\textbf{\textth{Theorem font (01234):!}}| renders as \textbf{\textth{Theorem font (01234):!}}.) The related font switch \verb|\thfamily| is defined so that \verb|{\thfamily A12!}| and \verb|\textth{A12!}| are equivalent. In opentype processing, the {\tt StylisticSet 05} controls whether figures and punctuation are upright in italic shaped faces.
\end{itemize}
-\subsection*{Math package choices:}
+\def\testupgreek{%
+ \test\Gamma \test\Delta
+ \test\Theta \test\Lambda \test\Xi \test\Pi \test\Sigma
+ \test\Upsilon \test\Phi \test\Psi \test\Omega }
+
+\def\testupgreekit{%
+ \test\Gammait \test\Deltait
+ \test\Thetait \test\Lambdait \test\Xiit \test\Piit \test\Sigmait
+ \test\Upsilonit \test\Phiit \test\Psiit \test\Omegait }
+\def\testlowgreeki{%
+ \test\alpha \test\beta \test\gamma \test\delta \test\epsilon
+ \test\zeta \test\eta \test\theta \test\iota \test\kappa \test\lambda
+ \test\mu }
+\def\testlowgreekii{%
+ \test\nu \test\xi \test o \test\pi \test\rho \test\sigma \test\tau
+ \test\upsilon \test\phi \test\chi \test\psi \test\omega }
+\def\testlowgreekiii{%
+ \test\varepsilon \test\vartheta \test\varpi \test\varrho
+ \test\varsigma \test\varphi \test\varkappa \test\ell \test\wp}
+\def\testlowgreekiu{%
+ \test\upalpha \test\upbeta \test\upgamma \test\updelta \test\upepsilon
+ \test\upzeta \test\upeta \test\uptheta \test\upiota \test\upkappa \test\uplambda
+ \test\upmu }
+\def\testlowgreekiiu{%
+ \test\upnu \test\upxi \test o \test\uppi \test\uprho \test\upsigma \test\uptau
+ \test\upupsilon \test\upphi \test\upchi \test\uppsi \test\upomega }
+\def\testlowgreekiiiu{%
+ \test\upvarepsilon \test\upvartheta \test\upvarpi \test\upvarrho
+ \test\upvarsigma \test\upvarphi \test\upvarkappa}
+\def\testlowgreek{%
+ \testlowgreeki\testlowgreekii\testlowgreekiii}
+\def\testlowgreeku{%
+ \testlowgreekiu\testlowgreekiiu\testlowgreekiiiu}
+\def\test#1{\; #1}
+
+%\newpage
+\subsection*{Greek letters in version 1.11:} \[\testupgreek\]
+\[\testupgreekit\]
+\[\testlowgreek\]
+\[\testlowgreeku\]
+{\boldmath
+\[\testupgreek\]
+\[\testupgreekit\]
+\[\testlowgreek\]
+\[\testlowgreeku\]
+}
+
+\section{Math/text package choices}
+
+\subsection*{All unicode}
There is now a unicode math package, {\tt XCharter-Math} that may be run with a simple preamble containing
\begin{verbatim}
\usepackage{fontspec}
@@ -165,7 +216,7 @@ but in order to get the options and macros described in this documentation, you
Unless option {\tt otfmath} is specified, math will be processed by {\tt newtxmath} with {\tt xcharter} option. (See examples 2--6 below.)
\item All options passed to {\tt XCharter} that are not understood by {\tt XCharter} will be passed along to {\tt xcharter-otf} provided option {\tt otfmath} was specified.
\end{itemize}
-Three non-unicode math packages seem to provide reasonable companions for \textsf{XCharter}. The first example uses Charter italics as math italics, but doesn't provide arbitrary scaling and doesn't sufficiently distinguish math italic v from mathematical Greek \verb|\nu|. Moreover, it is not easy to redefine \verb|\mathcal| to get a better math calligraphic alphabet---e.g., the {\tt mathalpha} package fails. The second uses \textsf{libertine} italics and Greek in math mode, which is a good match to Charter in style and weight after scaling up, is arbitrarily scalable, has distinct math italic v and mathematical Greek \verb|\nu|, and is completely compatible with {\tt mathalpha}. The third is a new revision of {\tt newtxmath} with option {\tt charter} (or, equivalently, {\tt xcharter}), which substitutes Charter italics as math italics and, as of version 1.11, uses a newly developed family of Greek symbols in \{regular, bold\} $\times$ \{upright, italic\} to match the style and italic angle of XCharter. This version is scalable and has a math italic v (plus a matching w) distinct from \verb|\nu|. (The option {\tt noxchvw} to {\tt newtxmath} changes the v and w to be the original Charter italic glyphs, which may lead to issues with \verb|\nu|.)
+\subsection*{Non-unicode only} Three non-unicode math packages seem to provide reasonable companions for \textsf{XCharter}. The first example uses Charter italics as math italics, but doesn't provide arbitrary scaling and doesn't sufficiently distinguish math italic v from mathematical Greek \verb|\nu|. Moreover, it is not easy to redefine \verb|\mathcal| to get a better math calligraphic alphabet---e.g., the {\tt mathalpha} package fails. The second uses \textsf{libertine} italics and Greek in math mode, which is a good match to Charter in style and weight after scaling up, is arbitrarily scalable, has distinct math italic v and mathematical Greek \verb|\nu|, and is completely compatible with {\tt mathalpha}. The third is a new revision of {\tt newtxmath} with option {\tt charter} (or, equivalently, {\tt xcharter}), which substitutes Charter italics as math italics and, as of version 1.11, uses a newly developed family of Greek symbols in \{regular, bold\} $\times$ \{upright, italic\} to match the style and italic angle of XCharter. This version is scalable and has a math italic v (plus a matching w) distinct from \verb|\nu|. (The option {\tt noxchvw} to {\tt newtxmath} changes the v and w to be the original Charter italic glyphs, which may lead to issues with \verb|\nu|.)
% The option {\tt alty} to {\tt newtxmath/charter}, new as of version {\tt 1.203}, substitutes $y$ for the default \emph{y} which, IMO, works better in combination with other math symbols because it lacks the problematic tail of \emph{y}.)
%\newpage
@@ -182,27 +233,31 @@ Three non-unicode math packages seem to provide reasonable companions for \texts
% [pdf]latex only
\usepackage[scaled=.98,sups,osf]{XCharter}% lining figures in math, osf in text
\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
-\usepackage[type1]{cabin}% sans serif
+\usepackage[type1]{sourcesanspro}% sans serif
\usepackage[uprightscript,libertine,vvarbb,scaled=1.05]{newtxmath}
\linespread{1.04}
\end{verbatim}
+\subsection*{Non-unicode using {\tt newtxmath}}
+
+
\textsc{Example 3:}
\begin{verbatim}
% [pdf]latex only
\usepackage[scaled=.98,sups,osf]{XCharter}% lining figures in math, osf in text
\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
-\usepackage[type1]{cabin}% sans serif
+\usepackage[type1]{sourcesanspro}% sans serif
\usepackage[uprightscript,charter,vvarbb,scaled=1.05]{newtxmath}
\linespread{1.04}
\end{verbatim}
+
\textsc{Example 4:}
\begin{verbatim}
% [pdf]latex only
\usepackage[<specify babel languages>]{babel}% load before XCharter
\usepackage[scaled=.98,sups,osf]{XCharter}% osf in text, lining figures in math
\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
-\usepackage[type1]{cabin}% sans serif
+\usepackage[type1]{sourcesanspro}% sans serif
\usepackage[uprightscript,charter,vvarbb,scaled=1.05]{newtxmath}
\linespread{1.04}
\end{verbatim}
@@ -212,14 +267,16 @@ Three non-unicode math packages seem to provide reasonable companions for \texts
% an example using newtx.sty, works with all latex engines
\usepackage[<specify babel languages>]{babel}% load before newtx
\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata tt
-\usepackage[type1]{cabin}% sans serif for math
+\usepackage[type1]{sourcesanspro}% sans serif for math
\usepackage[T1]{fontenc} % encoding to use for mathtt, etc
-\usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}% loads newtxmath
+\usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}
+% loads newtxmath
% newtx loads fontspec with unicode engines
\setmonofont{lmmono10-regular.otf}[Scale=1.08] % typewriter for text
\linespread{1.04}
% load polyglossia after newtx, if using
\end{verbatim}
+%\newpage
\textsc{Example 6:}
\begin{verbatim}
@@ -233,7 +290,7 @@ Three non-unicode math packages seem to provide reasonable companions for \texts
\usepackage[<specify babel languages>]{babel}% load before XCharter
\usepackage[scaled=.98,sups,osf]{XCharter}% osf in text, lining figures in math
\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
-\usepackage[type1]{cabin}% sans serif
+\usepackage[type1]{sourcesanspro}% sans serif
\usepackage[uprightscript,charter,vvarbb,scaled=1.05]{newtxmath}
\linespread{1.04}
\end{verbatim}
@@ -258,53 +315,42 @@ and variance $1$ on a probability space $(\Omega,\mathcal{F},\Pr)$. Then}
\frac{\mathrm{e}^{-v^2/2}}{\sqrt{2\uppi}}\,\mathrm{d}v
\quad\mbox{as $n\to\infty$, for every $f\in\mathrm{b}
\mathcal{C}(\mathbb{R})$.}\]
+\subsection*{Unicode text, non-unicode math}
+The following examples cover using a unicode latex engine ({\tt lualatex} or {\tt xelatex}) with XCharter otf fonts for text accompanied by newtxmath. They are simple variants of examples 5 and 6 from the prior subsection.
-\def\testupgreek{%
- \test\Gamma \test\Delta
- \test\Theta \test\Lambda \test\Xi \test\Pi \test\Sigma
- \test\Upsilon \test\Phi \test\Psi \test\Omega }
+\textsc{Example 7:}
+\begin{verbatim}
+% an example using newtx.sty, works with all latex engines
+\usepackage[<specify babel languages>]{babel}% load before newtx
+\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata tt
+\usepackage[type1]{sourcesanspro}% sans serif for math
+\usepackage[T1]{fontenc} % encoding to use for mathtt, etc
+\usepackage[xcharter,osf,p,mathscale=1.05,textscale=0,uprightscript,vvarbb]{newtx}
+% loads newtxmath
+% newtx loads fontspec with unicode engines
+\setmonofont{lmmono10-regular.otf}[Scale=1.08] % typewriter for text
+\linespread{1.04}
+% load polyglossia after newtx, if using
+\end{verbatim}
+%\newpage
-\def\testupgreekit{%
- \test\Gammait \test\Deltait
- \test\Thetait \test\Lambdait \test\Xiit \test\Piit \test\Sigmait
- \test\Upsilonit \test\Phiit \test\Psiit \test\Omegait }
-\def\testlowgreeki{%
- \test\alpha \test\beta \test\gamma \test\delta \test\epsilon
- \test\zeta \test\eta \test\theta \test\iota \test\kappa \test\lambda
- \test\mu }
-\def\testlowgreekii{%
- \test\nu \test\xi \test o \test\pi \test\rho \test\sigma \test\tau
- \test\upsilon \test\phi \test\chi \test\psi \test\omega }
-\def\testlowgreekiii{%
- \test\varepsilon \test\vartheta \test\varpi \test\varrho
- \test\varsigma \test\varphi \test\varkappa \test\ell \test\wp}
-\def\testlowgreekiu{%
- \test\upalpha \test\upbeta \test\upgamma \test\updelta \test\upepsilon
- \test\upzeta \test\upeta \test\uptheta \test\upiota \test\upkappa \test\uplambda
- \test\upmu }
-\def\testlowgreekiiu{%
- \test\upnu \test\upxi \test o \test\uppi \test\uprho \test\upsigma \test\uptau
- \test\upupsilon \test\upphi \test\upchi \test\uppsi \test\upomega }
-\def\testlowgreekiiiu{%
- \test\upvarepsilon \test\upvartheta \test\upvarpi \test\upvarrho
- \test\upvarsigma \test\upvarphi \test\upvarkappa}
-\def\testlowgreek{%
- \testlowgreeki\testlowgreekii\testlowgreekiii}
-\def\testlowgreeku{%
- \testlowgreekiu\testlowgreekiiu\testlowgreekiiiu}
-\def\test#1{\; #1}
+\textsc{Example 8:}
+\begin{verbatim}
+% Adds instructions to produce a pdf conforming to PDF/A-1b
+%\pdfcompresslevel=0 % uncomment for debugging the pdf
+%\pdfgentounicode=1
+%\input glyphtounicode.tex % now part of latex
+\InputIfFileExists{glyphtounicode-cmr.tex}{}{}
+\InputIfFileExists{glyphtounicode-ntx.tex}{}{}
+\usepackage[a-1b]{pdfx} % version 1.6.4 or higher
+\usepackage[<specify babel languages>]{babel}% load before XCharter
+\usepackage[scaled=.98,sups,osf]{XCharter}% osf in text, lining figures in math
+\usepackage[scaled=1.04,varqu,varl]{inconsolata}% inconsolata typewriter
+\usepackage[type1]{sourcesanspro}% sans serif
+\usepackage[uprightscript,charter,vvarbb,scaled=1.05]{newtxmath}
+\linespread{1.04}
+\end{verbatim}
-%\newpage
-\textbf{Greek letters in version 1.11:} \[\testupgreek\]
-\[\testupgreekit\]
-\[\testlowgreek\]
-\[\testlowgreeku\]
-{\boldmath
-\[\testupgreek\]
-\[\testupgreekit\]
-\[\testlowgreek\]
-\[\testlowgreeku\]
-}
\section{Text effects under \texttt{fontaxes}}
This package loads the {\tt fontaxes} package in order to access italic and slanted small caps. You should pay attention to the fact that {\tt fontaxes} modifies the behavior of some basic \LaTeX\ text macros such as \verb|\textsc| and \verb|\textup|. Under normal \LaTeX, some text effects are combined, so that, for example, \verb|\textbf{\textit{a}}| produces bold italic {\tt a}, while other effects are not, e.g., \verb|\textsc{\textup{a}}| has the same effect as \verb|\textup{a}|, producing the letter {\tt a} in upright, not small cap, style. With {\tt fontaxes}, \verb|\textsc{\textup{a}}| produces instead upright small cap {\tt a}. It offers a macro \verb|\textulc| that undoes small caps, so that, e.g., \verb|\textsc{\textulc{a}}| produces {\tt a} in non-small cap mode, with whatever other style choices were in force, such as bold or italics.
@@ -387,7 +433,7 @@ Any {\tt utf8}-encoded text typed outside of a \verb|\foreignlanguage{}{}| block
\textsc{XCharter-Italic-tlf-t2a.tfm}:\\
\fonttable{XCharter-Italic-tlf-t2a.tfm}
-\textsc{Note:} Currently, the \LaTeX\ support files for T$2$A encoded \emph{XCharter} cover only the figure styles {\tt lining}, {\tt oldstyle} and {\tt superiors}.
+%\textsc{Note:} Currently, the \LaTeX\ support files for T$2$A encoded \emph{XCharter} cover the figure styles {\tt tabular lining}, {\tt tabular oldstyle}, {\tt proportional lining}, {\tt proportional oldstyle} and {\tt superiors}.
\section{Serbian Cyrillic}
Serbian and Russian Cyrillic differ in the following ways.