Debian Codegraph @

texmf-dist/doc/fonts/cochineal/cochineal-otf-doc.tex

raw
1 % !TEX TS-program = xelatex
2 \documentclass[11pt]{article}
3 \usepackage[margin=1in]{geometry}
4 \usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent
5 \usepackage{graphicx}
6 %\pdfmapfile{=Cochineal.map}
7 %\pdfmapfile{=newtx.map}
8 %\usepackage{amssymb}% don't use with newtxmath
9 %SetFonts
10 % cochineal+newtxmath
11 %\usepackage{fontspec}
12 %\setmainfont{erewhon}
13 %\setmainfont{cochineal}
14 \usepackage[p,osf]{cochineal} % use proportional osf
15 \setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
16 %\usepackage[OT2,LGR,T2A,T1]{fontenc}
17 %\usepackage{textcomp}
18 %\usepackage[varqu,varl]{zi4}% inconsolata
19 %\usepackage{amsmath,amsthm}
20 %\usepackage[cochineal,vvarbb]{newtxmath}
21 % option vvarbb gives you stix blackboard bold
22 %\usepackage[cal=boondoxo]{mathalfa}% less slanted than STIX cal
23 %\usepackage{bm}
24 %SetFonts
25 \usepackage{fonttable}
26 %\title{The Cochineal Font Package}
27 %\author{Michael Sharpe}
28 %\date{\today} % Activate to display a given date or no date
29
30 \begin{document}
31 \expandafter\show\csname normalfont \endcsname
32 \setcounter{page}{8}
33 \section*{Running {\tt cochineal} in XeLaTeX or LuaLaTeX}
34 The preceding pages of this document were processed using {\tt pdflatex}, which was the only engine supported by {\tt cochineal.sty}. As of version $1.07$, XeLaTeX and LuaLaTeX are also supported. All {\tt cochineal} options and macros formerly limited to {\tt pdflatex} have been modified and now work essentially the same under bother unicode engines, though the output may not always be precisely the same as with {\tt pdflatex}. There are some macros and options available under unicode engines that go beyond what can be done under {\tt pdflatex}.
35
36 \textsc{Modified Macros and Options:}
37 \begin{itemize}
38 \item
39 \verb|\textfrac| works better under unicode tex because it is possible to adjust kerning between all characters. The effect should not be very noticable, at least in regular style.
40 \item {\tt sups}: the package treats this differently in unicode LaTeX and pdflatex, with handling in the unicode case passed off to the {\tt realscripts} package where the footnote marker font is set to \verb|\normalfont|, meaning that superiors from the current (Cochineal) text font are employed.
41 \item {\tt theoremfont}, {\tt thmtabular}, {\tt thmlining} all function in a similar manner to {\tt pdflatex}.
42 \item {\tt swashQ} operates as before.
43 \item {\tt foresolidus, aftsolidus} are not used in unicode tex.
44 \item {\tt scosf} operates without change.
45 %you have the choice of font to render footnote markers. The differences are as follows.
46 %\begin{itemize}
47 %\item
48 %{\bfseries Unicode latex:}
49 %\begin{itemize}
50 %\item
51 %if you include the option {\tt sups} to {\tt cochineal} and there is no {\tt fnmarkerfont=} option set, then footnote markers are taken from the Cochineal-Roman superiors.
52 %\item if there is a {\tt fnmarkerfont=} option set, then, whether or not there iss a {\tt sups} option set, then, if available, footnote markers will be taken from the superiors in the font family that {\tt fnmarkerfont=} is set to. (When trying a font family, try this in your preamble:
53 %\begin{verbatim}
54 %\newfontfamily\mysu{EBGaramond}{\addfontfeatures{RawFeature=+sups}}
55 %\end{verbatim}
56 %and then, in the body of your document, try typesetting
57 %\begin{verbatim}
58 %X{\mysu 123}X
59 %\end{verbatim}
60
61 %\end{itemize}
62 %\item
63 %{\bfseries pdflatex:}
64 %\end{itemize}•
65 %if you do not include the {\tt fnmarkerfont=} option but you do include {\tt sups}, then footnote markers are taken from {\tt Cochineal-Roman-sups}. There is a new option, {\tt fnmarkerfont} that you can use to specify the font to use for footnote markers. It is ignored when using {\tt pdflatex}.
66 \item \verb|\textcircled| works the same as under {\tt pdflatex}.\textcircled{X}
67 \end{itemize}
68 \textsc{New Macros and Options:}
69 \begin{itemize}
70 \item
71 An alternate version of Q,
72 \Qswash\space (\verb|\Qswash|) and their small cap versions is available using option {\tt altQ}, which sets {\tt StylisticSet=3}. The alternate versions are {\addfontfeatures{RawFeature=+ss03}Q}, {\addfontfeatures{Style=Swash,RawFeature=+ss03}Q}.
73 \item
74 An alternate version of J is available in italic shapes only using option {\tt altJ}, which sets {\tt StylisticSet=2}. The alternate version of \textit{J} is {\itshape {\addfontfeatures{RawFeature=+ss02}\textit{J}}}.
75 %.\textit{J} {\textbf{Bold}} \textsc{SmallCap}
76 \item {\tt oldSS} controls whether the new German capital sharp S is used or whether the old SS is retained. The former is the default but the option {\tt oldSS} forces the latter by setting {\tt StylisticSet=1}. The effects are summarized in the following tables.
77 \begin{center}
78 \begin{tabular}{@{} lcl @{}}
79 \hline
80 Glyph name & glyph & macro\\
81 \hline
82 {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}| or \verb|\SS|\\
83 {\tt uni1E9E.ss01} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\
84 {\tt germandbls.sc} & \textsc{\ss} & \verb|{\textsc{\ss}}| \\
85 {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1,RawFeature=+smcp}\ss} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\
86 \hline
87 \end{tabular}
88 \end{center}
89 \end{itemize}
90 %{\bfseries
91 %\begin{center}
92 % \begin{tabular}{@{} lcl @{}}
93 % \hline
94 % Glyph name & glyph & macro\\
95 % \hline
96 % {\tt uni1E9E} & \symbol{"1E9E} &\verb|\symbol{"1E9E}|\\
97 % {\tt uni1E9E.alt} & {\addfontfeature{StylisticSet=1}\symbol{"1E9E}} & \verb|{\addfontfeature{StylisticSet=1}\symbol{"1E9E}}| \\
98 % {\tt germandbls.sc.ss01} & {\addfontfeature{StylisticSet=1}\textsc{\ss}} & \verb|{\addfontfeature{StylisticSet=1}\textsc{\ss}}| \\
99 % \hline
100 % \end{tabular}
101 %\end{center}
102 %}
103 \noindent Effect of choice of {\tt StylisticSet}:
104
105 \begin{center}
106 \begin{tabular}{@{} ccccc @{}}
107 \hline
108 StylisticSet & \verb|\ss| & \verb|\SS| & \verb|\MakeUppercase{\ss}| & \verb|\textsc{\ss}| \\
109 \hline
110 None & \ss & \SS & \MakeUppercase{\ss} & \textsc{\ss}\\
111
112 =1 & {\addfontfeature{StylisticSet=1}\ss} & {\addfontfeature{StylisticSet=1}\SS} & {\addfontfeature{StylisticSet=1}\MakeUppercase{\ss}} & {\addfontfeature{StylisticSet=1}\textsc{\ss}}\\
113 \hline
114 \end{tabular}
115 \end{center}
116
117 \end{document}
118
119