Debian Codegraph @

texmf-dist/doc/latex/sourcecodepro/sourcecodepro.tex

raw
1 \documentclass[10pt,a4paper,english]{article}
2 \usepackage{geometry,hologo,hyperref,babel,mdwlist,array,multicol,graphicx}
3 \usepackage[default,osf]{sourcesanspro}
4 \usepackage[scaled=.95]{sourcecodepro}
5 \hypersetup{
6 colorlinks,
7 citecolor=blue,
8 filecolor=blue,
9 linkcolor=blue,
10 urlcolor=blue
11 }
12 \newcommand*\file[1]{\href{run:#1.pdf}{#1}}
13
14 \title{\bfseries
15 \Huge sourcecodepro\\
16 \Large Adobe's Source Code Pro typeface for \LaTeX
17 }
18 \author{Silke Hofstra, \href{mailto:[email protected]}{[email protected]}}
19 \date{Documentation for sourcecodepro v2.8.\\ \today}
20
21 \begin{document}
22 \maketitle
23 \begin{multicols}{2}
24 This package provides the Source Code Pro font in an easy to use way. For \hologo{XeLaTeX} and \hologo{LuaLaTeX} users the original OpenType fonts from \href{https://github.com/adobe-fonts/source-code-pro}{GitHub} are used. The entire font family is included.
25
26 This package is also available on \href{https://gitlab.com/slxh/latex/sourcecodepro}{GitLab}.
27
28 \section{Options}
29 The package has the following options:
30 \begin{itemize*}
31 \item \textbf{oldstyle, osf}: use old style numbers.
32 \item \textbf{lining, nf, lf}: use lining numbers.
33 \item \textbf{black}: \texttt{\textbackslash bfseries} is black.
34 \item \textbf{semibold}: \texttt{\textbackslash bfseries} is semibold.
35 \item \textbf{bold}: \texttt{\textbackslash bfseries} is bold.
36 \item \textbf{light}: \texttt{\textbackslash mdseries} is light.
37 \item \textbf{extralight}: \texttt{\textbackslash mdseries} is extra light.
38 \item \textbf{regular}: \texttt{\textbackslash mdseries} is regular.
39 \item \textbf{scale, scaled}: Change the scaling with a factor. For example: \texttt{scale=.5}
40 \item \textbf{ligatures}: Change the ligatures used,
41 see the \href{http://mirrors.ctan.org/macros/latex/contrib/fontspec/fontspec.pdf}{fontspec documentation} for details.
42 For example: \texttt{ligatures=TeX}
43 \item \textbf{default}: Source Code Pro is set as the default font family and as the monotype family.
44 \item \textbf{nottdefault}: Source Code Pro is not set as monospaced family.
45 \item \textbf{type1, t1}: Override automatic detection and use the Type 1 fonts.
46 \item \textbf{opentype, otf}: Override automatic detection and use OpenType fonts.
47 \end{itemize*}
48 The following options are enabled by default: lining, proportional, bold and regular.
49
50 \section{Commands}
51 Commands for all weights are also provided for \hologo{XeTeX} and \hologo{LuaTeX} users.
52 \begin{itemize*}
53 \item \texttt{\bfseries \textbackslash sourcecodepro}
54 -- the regular and bold weights.
55 \item \texttt{\bfseries \textbackslash sourcecodeprolight}
56 -- the light and semibold weights.
57 \item \texttt{\bfseries \textbackslash sourcecodeproextreme}
58 -- the extra light and black weights.
59 \end{itemize*}
60
61 \section{Licence}
62 Adobe's Source Code Pro typeface is available under the \href{http://scripts.sil.org/OFL}{SIL Open Font License 1.1}.\\
63 All \LaTeX\ code is available under the \href{http://www.latex-project.org/lppl/}{\LaTeX\ project public license} v1.3 or later.
64
65 \section{Specimen}
66 Simple specimen can be found on page \pageref{sec:specimen}. Full specimen can be \href{http://adobe-fonts.github.io/source-code-pro/}{acquired from Adobe}. Please note that at the moment Source Code Pro doesn’t have small-caps.
67
68 \section{OpenType}
69 The OpenType fonts have many features, including old style numerals (\texttt{\oldstylenums{1 6 9}})
70 and stylistic alternatives (\texttt{{\addfontfeature{Style=Alternate}a g}}).
71
72 \subsection{Features}
73 A complete list of available font features is available on page \pageref{sec:otfinfo}. More information on how to use font features can be found in the \href{http://mirror.ctan.org/macros/latex/contrib/fontspec/fontspec.pdf}{fontspec documentation}.
74
75 \section{Type1}
76 The following Type1 font families are included:
77 \begin{itemize*}
78 \item SourceCodePro-TLF
79 \item SourceCodePro-TOsF
80 \end{itemize*}
81
82 With series ‘extralight’, ‘light’, ‘regular’, ‘medium’, ‘semibold’, ‘bold’, ‘black’ and shapes ‘n’ and ‘i’.
83
84 \section{Version history}
85 \subsection*{2.8}
86 \begin{itemize*}
87 \item Update the fonts to Roman v2.042 and Italic v1.062.
88 \item Type1 series have been renamed to the values documented above.
89 \end{itemize*}
90
91 \subsection*{2.7}
92 \begin{itemize*}
93 \item Make the ligatures for the OpenType fonts configurable with the \texttt{ligatures} option.
94 \item Update the fonts to Roman v2.030 and Italic v1.050.
95 \item Generate fonts without f-ligatures.
96 \end{itemize*}
97
98 \subsection*{2.6}
99 \begin{itemize*}
100 \item Modified the \texttt{\textbackslash liningnums} to accomodate for the missing \texttt{lnum} feature.
101 \end{itemize*}
102
103 \subsection*{2.5}
104 \begin{itemize*}
105 \item Updated the fonts to 2.010R-ro/1.030R-it.
106 \end{itemize*}
107
108 \subsection*{2.4}
109 \begin{itemize*}
110 \item Added the italic fonts (\emph{beta} v1.002).
111 \item Added the fixed medium font (v1.020).
112 \item Implemented the medium font.
113 \end{itemize*}
114
115 \subsection*{2.3}
116 \begin{itemize*}
117 \item Fixed errors in weight implementation.
118 \end{itemize*}
119
120 \subsection*{2.2}
121 \begin{itemize*}
122 \item Weights are now handled with the \href{http://www.ctan.org/pkg/mweights}{mweights} package.
123 \item Fixed scaling.
124 \end{itemize*}
125
126 \subsection*{2.1}
127 \begin{itemize*}
128 \item Added \texttt{nottdefault} option.
129 \item Fixed issue in which font was set as default sans-serif family instead of the default monospaced family.
130 \end{itemize*}
131
132 \subsection*{2.0}
133 \begin{itemize*}
134 \item Merged all \texttt{.sty} files into \texttt{sourcecodepro.sty}.
135 \item \texttt{default} option now sets the default font family to \texttt{Source Code Pro}, not \texttt{\textbackslash sfdefault}.
136 \item \texttt{type1}, \texttt{t1}, \texttt{opentype} and \texttt{otf} option added to override automatic detection.
137 \item Added \texttt{OT1} to \texttt{fontspec} options.
138 \item Updated fonts to 1.017.
139 \end{itemize*}
140
141 \subsection*{1.02}
142 \begin{itemize*}
143 \item Removed \texttt{proportional} and \texttt{tabular} options.
144 \item Changed the order of \texttt{T1} and \texttt{LY1}.
145 \item Changed \texttt{lining}/\texttt{nf} behaviour.
146 \item Redefined \texttt{\textbackslash oldstylenums}.
147 \end{itemize*}
148
149 \section{Known issues}
150
151 Issues can be reported \href{https://gitlab.com/slxh/latex/sourcecodepro/issues}{on GitLab} and \href{https://github.com/silkeh/latex-sourcecodepro/issues}{GitHub}.
152
153 \newpage
154 \end{multicols}
155
156 \section{Specimen}
157 At the moment Source Code Pro doesn’t have italics or small-caps.
158 \label{sec:specimen}
159 \subsection{OpenType}
160 \begin{figure}[ht]
161 \centering
162 \includegraphics[width=\linewidth]{sourcecodepro-otf-specimen}
163 \end{figure}
164 This table can also be found in \file{sourcecodepro-otf-specimen}.
165
166 \subsection{Type1}
167 \begin{figure}[ht]
168 \centering
169 \includegraphics[width=\linewidth]{sourcecodepro-type1-specimen}
170 \end{figure}
171 This table can also be found in \file{sourcecodepro-type1-specimen}.
172
173 \newpage
174 \section{Opentype features}
175 \label{sec:otfinfo}
176
177 \newcommand*\textfeat[2]{{\sourcecodepro\addfontfeature{RawFeature=+#1}#2}}
178 The following font features are avalable in the font:
179
180 \begin{figure}[ht]
181 \centering
182 \begin{tabular}{>{\ttfamily}l l}
183 case & Case-Sensitive Forms \\
184 ccmp & Glyph Composition/Decomposition \\
185 cv01 & Character Variants 1 - simple a \\
186 cv02 & Character Variants 2 - simple g \\
187 cv04 & Character Variants 4 - serifed i \\
188 cv06 & Character Variants 6 - Sami \symbol{"014A} \\
189 cv07 & Character Variants 7 - cursive \symbol{"03B2} \\
190 cv08 & Character Variants 8 - cursive \symbol{"03B8} \\
191 cv09 & Character Variants 9 - cursive \symbol{"03C6} \\
192 cv10 & Character Variants 10 - Serbian \symbol{"0431} \\
193 cv11 & Character Variants 11 - Cyrillic breve [\symbol{"02D8}] \\
194 cv12 & Character Variants 12 - slashed zero [0] \\
195 cv14 & Character Variants 14 - typographic hyphen [-] \\
196 cv15 & Character Variants 15 - typographic asterisk [*] \\
197 cv16 & Character Variants 16 - slashed dollar sign [\$]\\
198 cv17 & Character Variants 17 - alternate numeral one [1] \\
199 dnom & Denominators \\
200 frac & Fractions \\
201 mark & Mark Positioning \\
202 mkmk & Mark to Mark Positioning \\
203 numr & Numerators \\
204 onum & Oldstyle Figures \\
205 ordn & Ordinals \\
206 salt & Stylistic Alternates \\
207 sinf & Scientific Inferiors \\
208 size & Optical Size \\
209 ss01 & Stylistic Set 1 - typographic alternates [-,*] \\
210 ss02 & Stylistic Set 2 - simple a, cursive \symbol{"03B2} \\
211 ss03 & Stylistic Set 3 - simple g, cursive \symbol{"03B8}, Serbian \symbol{"0431} \\
212 ss04 & Stylistic Set 4 - serifed i \\
213 ss05 & Stylistic Set 5 - Sami \symbol{"014A}, cursive \symbol{"03C6} \\
214 ss06 & Stylistic Set 6 - slashed dollar sign [\$] \\
215 ss07 & Stylistic Set 7 - alternate numeral one [1] \\
216 subs & Subscript \\
217 sups & Superscript \\
218 zero & Slashed Zero
219 \end{tabular}
220 \end{figure}
221
222 \end{document}
223