summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-28 15:52:45 +0000
committerKarl Berry <karl@freefriends.org>2010-05-28 15:52:45 +0000
commit2da77d0cc0ada0dede0a76ef2823d3ad34db2fa7 (patch)
tree9a93a2bddbc18388c99cdab50c88e17ae82048de /Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
parent881ee118259a2f9961f7cef4e1b26bcf65488346 (diff)
fontspec beta 1 (27may10)
git-svn-id: svn://tug.org/texlive/trunk@18558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty114
1 files changed, 114 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
new file mode 100644
index 00000000000..d40bb9cf370
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -0,0 +1,114 @@
+%%
+%% This is file `fontspec-patches.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fontspec.dtx (with options: `patches')
+%%
+%% _________________________________________
+%% The fontspec package for XeLaTeX/LuaLaTeX
+%% (C) 2004--2010 Will Robertson and Khaled Hosny
+%%
+%% License information appended.
+%%
+%%
+\ProvidesPackage{fontspec-patches}
+ [2010/05/27 v2.0b1 Advanced font selection for XeLaTeX/LuaLaTeX]
+\ExplSyntaxOn
+\RequirePackage{fixltx2e}[2006/03/24]
+\DeclareRobustCommand \em {
+ \@nomath\em
+ \tl_if_eq:xxTF \f@shape \itdefault \eminnershape \emshape
+}
+\DeclareTextFontCommand{\emph}{\em}
+\let\emshape\itshape
+\let\eminnershape\upshape
+\DeclareRobustCommand{\-}{%
+ \discretionary{%
+ \char\ifnum\hyphenchar\font<\z@
+ \xlx@defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi}{}{}}
+\def\xlx@defaulthyphenchar{`\-}
+\def\xxt@visiblespace{
+ \iffontchar\font"2423
+ \expandafter\textvisiblespace
+ \else
+ \expandafter\xxt@visiblespace@fallback
+ \fi
+}
+\def\xxt@visiblespace@fallback{
+ {
+ \usefont{EU1}{lmtt}{\f@series}{\f@shape}
+ \textvisiblespace
+ }
+}
+\begingroup
+ \catcode`\~=\active
+ \gdef\xxt@vprintspaces{\catcode`\~\active\let \xxt@visiblespace}
+\endgroup
+\def\verb{
+ \relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+ \@ifstar\@@sverb\@verb
+}
+\def\@@sverb{\xxt@vprintspaces\@sverb}
+\AtBeginDocument{
+ \fontspec_patch_verbatim:
+ \fontspec_patch_moreverb:
+ \fontspec_patch_fancyvrb:
+ \fontspec_patch_listings:
+}
+\cs_set:Npn \fontspec_patch_verbatim: {
+ \@ifpackageloaded{verbatim}{
+ \@namedef{verbatim*}{
+ \begingroup\@verbatim\xxt@vprintspaces\verbatim@start
+ }
+ }{
+ \@namedef{verbatim*}{\@verbatim\xxt@vprintspaces\@sxverbatim}
+ }
+}
+\cs_set:Npn \fontspec_patch_moreverb: {
+ \@ifpackageloaded{moreverb}{
+ \@namedef{listingcont*}{
+ \def\verbatim@processline{
+ \thelisting@line \global\advance\listing@line\c_one
+ \the\verbatim@line\par
+ }
+ \@verbatim\xxt@vprintspaces\verbatim@start
+ }
+ }{}}
+\cs_set:Npn \fontspec_patch_fancyvrb: {
+ \@ifpackageloaded{fancyvrb}{
+ \let\FancyVerbSpace\xxt@visiblespace
+ }{}
+}
+\cs_set:Npn \fontspec_patch_listings: {
+ \@ifpackageloaded{listings}{
+ \let\lst@visiblespace\xxt@visiblespace
+ }{}
+}
+%%
+%% Copyright 2004--2010 Will Robertson <wspr81@gmail.com>
+%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "author-maintained" by Will Robertson.
+%%
+%% This work consists of this file fontspec.dtx
+%% and the derived files fontspec.sty,
+%% fontspec.lua,
+%% fontspec.cfg,
+%% fontspec.ins,
+%% fontspec-example.ltx,
+%% and fontspec.pdf.
+%%
+%%
+%% End of file `fontspec-patches.sty'.