summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-05-27 01:06:15 +0000
committerNorbert Preining <preining@logic.at>2013-05-27 01:06:15 +0000
commit05b77f5f5173540aa52f68ee3679d1aa64109001 (patch)
tree0a263e9c690d55b0bc56059201e6978214ad284f /Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
parent4cb8bf2d77cb2fc95eff89d2ca4dd613839e6ed4 (diff)
sourcecodepro 5/25
git-svn-id: svn://tug.org/texlive/trunk@30691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty')
-rw-r--r--Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty41
1 files changed, 24 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty b/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
index 69e28811aa9..3e7a40b914d 100644
--- a/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
+++ b/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
@@ -1,6 +1,6 @@
-% Source Sans Pro for LaTeX
+% Source Code Pro for LaTeX
%
-% Silke Hofstra, silke@slxh.nl
+% Silke Hofstra, tex@slxh.nl
%
% This file selects either the OTF or the TYPE1 fonts based on
% the LaTeX engine used.
@@ -10,11 +10,12 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{sourcecodepro}[2012/12/24 v2.0 Adobe's Source Code Pro typeface]
-\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
+\RequirePackage{ifxetex,ifluatex,xkeyval}
% Switches
\newif\ifsourcecodepro@otf
\newif\ifsourcecodepro@default
+\newif\ifsourcecodepro@ttdefault
\newif\ifsourcecodepro@oldstyle
\newif\ifsourcecodepro@black
\newif\ifsourcecodepro@semibold
@@ -47,13 +48,15 @@
\DeclareOptionX{scale} {\renewcommand*{\sourcecodepro@scale}{#1}}
\DeclareOptionX{scaled} {\renewcommand*{\sourcecodepro@scale}{#1}}
\DeclareOptionX{default} {\sourcecodepro@defaulttrue}
+\DeclareOptionX{ttdefault} {\sourcecodepro@ttdefaulttrue}
+\DeclareOptionX{nottdefault} {\sourcecodepro@ttdefaultfalse}
\DeclareOptionX{type1} {\sourcecodepro@otffalse}
\DeclareOptionX{t1} {\sourcecodepro@otffalse}
\DeclareOptionX{opentype} {\sourcecodepro@otftrue}
\DeclareOptionX{otf} {\sourcecodepro@otftrue}
% Default options
-\ExecuteOptionsX{lining,bold,regular}
+\ExecuteOptionsX{ttdefault,lining,bold,regular}
\ProcessOptionsX\relax
% Load OpenType files
@@ -96,13 +99,15 @@
Scale = \sourcecodepro@scale ,
Extension = .otf }
- % Sans serif font
- \setmonofont
- [ UprightFont = *-\sourcecodepro@regstyle ,
- ItalicFont = *-\sourcecodepro@regstyle ,
- BoldFont = *-\sourcecodepro@boldstyle ,
- BoldItalicFont = *-\sourcecodepro@boldstyle ]
- {SourceCodePro}
+ % Monospace font
+ \ifsourcecodepro@ttdefault
+ \setmonofont
+ [ UprightFont = *-\sourcecodepro@regstyle ,
+ ItalicFont = *-\sourcecodepro@regstyle ,
+ BoldFont = *-\sourcecodepro@boldstyle ,
+ BoldItalicFont = *-\sourcecodepro@boldstyle ]
+ {SourceCodePro}
+ \fi
% Font families
% Regular/Bold
@@ -174,12 +179,14 @@
\fi
\fi
- % Sans serif font
- \renewcommand*
- {\sfdefault}
- {SourceCodePro-T\sourcecodepro@figurestyle}
+ % Monospace font
+ \ifsourcecodepro@ttdefault
+ \renewcommand*
+ {\ttdefault}
+ {SourceCodePro-T\sourcecodepro@figurestyle}
+ \fi
- % If source sans pro is the default font \oldstylenums needs a new definition.
+ % If source code pro is the default font \oldstylenums needs a new definition.
\ifsourcecodepro@default
\renewcommand*\oldstylenums[1]{%
\begingroup
@@ -195,7 +202,7 @@
% Set default font family
\ifsourcecodepro@default
- \let\familydefault\sfdefault
+ \let\familydefault\ttdefault
\fi
\endinput \ No newline at end of file