diff options
author | Chris Johns <chrisj@rtems.org> | 2016-11-06 12:02:47 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2016-11-06 12:02:47 +1100 |
commit | 8330198edc3ec08021f358c3030266194278c5a2 (patch) | |
tree | dfab1a147e46f0bc95abfd1d75863da52c1c4e15 /common/latex/inconsolata.sty | |
parent | waf: note about tex noise when running configure. (diff) | |
download | rtems-docs-8330198edc3ec08021f358c3030266194278c5a2.tar.bz2 |
waf: Add support to handle missing Latex packages on hosts they are not available on.
It appears the support for texlive packages on some hosts is variable. This patch
lets us add missing packages to our source tree so a PDF can be built on
those hosts. The quality of the PDFs created may vary as some short cuts may
have been take. For example lato is a font and only the sty file as been added
and not the actual font which means it's use will default to another font.
Diffstat (limited to 'common/latex/inconsolata.sty')
-rw-r--r-- | common/latex/inconsolata.sty | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/common/latex/inconsolata.sty b/common/latex/inconsolata.sty new file mode 100644 index 0000000..aeada49 --- /dev/null +++ b/common/latex/inconsolata.sty @@ -0,0 +1,92 @@ +% Copyright 2014 Michael Sharpe +% Based initially on Karl Berry's inconsolata.sty. +% You may freely use, modify and/or distribute this file. + +\def\fileversion{1.10} +\def\filedate{2016/02/22} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{inconsolata}[\filedate\space v\fileversion] +\message{`inconsolata-zi4' v\fileversion, \filedate\space Text macros for Inconsolata (msharpe)} + +\RequirePackage{textcomp} +\RequirePackage{keyval} + +\newcount\zifour@ocount +\newif\ifzifour@altzero +\newif\ifzifour@noupq +\define@key{zifour}{scaled}[1.0]{\def\zifour@scaled{s*[#1]}} + +\DeclareOption*{% + \begingroup + \edef\x{\endgroup + \noexpand\setkeys{zifour}{\CurrentOption}}% + \x} + +% by default, change \tt to mean zi4. +\newcommand*{\zifour@default}{% + \renewcommand*{\ttdefault}{zi4}% +} + +% option [nott] to avoid changing tt. +\DeclareOption{nott}{% + \renewcommand*{\zifour@default}{}% +} +% option [noupquote] to prevent loading upquote. +\DeclareOption{noupquote}{% + \zifour@noupqtrue}% + +% option var0---use unslashed zero (slashed is default) +\DeclareOption{var0}{% + \zifour@altzerotrue\advance\zifour@ocount \tw@ % +} +\DeclareOption{varl}{% + \advance\zifour@ocount \@ne % +} +\DeclareOption{varqu}{% + \advance\zifour@ocount 4\relax % +} + +\ProcessOptions* +\zifour@default +\edef\zifour@opt{\the\zifour@ocount} +\ifzifour@altzero + \advance\zifour@ocount -\tw@ +\else + \advance\zifour@ocount \tw@ +\fi +\edef\zifour@altopt{\the\zifour@ocount} +% define an \altzero macro which flips to slashed, unslashed +\def\altzero{{\fontfamily{zi4}% + \fontshape{scit}% + \selectfont 0}} + +\def\zifour@T@ne@nc{T1} +\def\zifour@OT@ne@nc{OT1} +\def\zifour@LY@ne@nc{LY1} +\def\zifour@QX@nc{QX} +\def\zifour@TQS{% +\UndeclareTextCommand{\textquotesingle}{\encodingdefault} +\DeclareTextSymbol{\textquotesingle}{TS1}{39}} + +\ifzifour@noupq% do nothing + % Try to correct for wrong slots for QX + \ifx\encodingdefault\zifour@QX@nc + \zifour@TQS + \else + \ifx\encodingdefault\zifour@LY@ne@nc + \zifour@TQS + \fi + \fi +\else + \AtBeginDocument{% + \ifx\encodingdefault\zifour@T@ne@nc % do nothing + \else + \ifx\encodingdefault\zifour@OT@ne@nc % do nothing + \else + \zifour@TQS + \fi + \fi + \usepackage{upquote}} +\fi + +\endinput |