summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-03 16:36:26 +0000
committerKarl Berry <karl@freefriends.org>2007-09-03 16:36:26 +0000
commit64ae5b941e66a80eef3b9d4aaf25b122c0a112f2 (patch)
tree786c7bad7ea78c9604e972614f4c0863fdd6defc /Master/texmf-dist/tex
parentfa374a1bfc1a4ab04e5c4b4572faeb04fe858693 (diff)
xltxtra update (1sep07)
git-svn-id: svn://tug.org/texlive/trunk@4857 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty117
1 files changed, 84 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty b/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
index d5641f00dba..9ed57894c5b 100644
--- a/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
+++ b/Master/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
@@ -8,31 +8,34 @@
%%
%% ____________________________
%% The xltxtra package
-%% (C) 2006 Will Robertson
+%% (C) 2006/2007 Will Robertson
%% License information appended
%%
-%%
\ProvidesPackage{xltxtra}
- [2006/06/13 v0.2 Improvements for the XeTeX/LaTeX format]
+ [2007/09/01 v0.3b Improvements for the "XeLaTeX" format]
+\newif\if@xxt@nosscript@
+\newif\if@xxt@nologos@
+\newif\if@xxt@nohyphen@
+\newif\if@xxt@noemph@
+\DeclareOption{no-sscript}{\@xxt@nosscript@true}
+\DeclareOption{no-logos}{\@xxt@nologos@true}
+\DeclareOption{no-hyphen}{\@xxt@nohyphen@true}
+\DeclareOption{no-emph}{\@xxt@noemph@true}
+\ProcessOptions*
\RequirePackage{ifxetex}
\RequireXeTeX
\RequirePackage{graphicx}
\RequirePackage{fontspec}
\RequirePackage{xunicode}
-\newlength\xxt@kern@Te
-\newlength\xxt@kern@eX
-\newlength\xxt@lower@e
-\newlength\xxt@kern@La
-\newlength\xxt@kern@aT
-\newlength\xxt@kern@eL
\newcommand*\TeX@logo@spacing[6]{%
- \setlength\xxt@kern@Te{#1}%
- \setlength\xxt@kern@eX{#2}%
- \setlength\xxt@lower@e{#3}%
- \setlength\xxt@kern@La{#4}%
- \setlength\xxt@kern@aT{#5}%
- \setlength\xxt@kern@eL{#6}%
+ \def\xxt@kern@Te{#1}%
+ \def\xxt@kern@eX{#2}%
+ \def\xxt@lower@e{#3}%
+ \def\xxt@kern@La{#4}%
+ \def\xxt@kern@aT{#5}%
+ \def\xxt@kern@eL{#6}%
}
+\unless\if@xxt@nologos@
\DeclareRobustCommand\TeX{%
\leavevmode
\smash{%
@@ -52,6 +55,7 @@
}%
\kern\xxt@kern@aT
\TeX}}
+\fi
\DeclareRobustCommand\XeTeX{%
\leavevmode
\smash{%
@@ -96,8 +100,17 @@
\raise\dimen0\hbox{\rotatebox{180}{\box0}}%
\fi}\kern\xxt@kern@eL\LaTeX}}
\TeX@logo@spacing{-0.15em}{-0.15em}{0.5ex}{-0.36em}{-0.15em}{-0.1em}
+\@ifpackageloaded{hyperref}{%
+ \pdfstringdefDisableCommands{%
+ \def\TeX{TeX}%
+ \def\XeTeX{XeTeX}%
+ \def\LaTeX{LaTeX}%
+ \def\LaTeXe{LaTeX2e}
+ \def\XeLaTeX{XeLaTeX}
+}}{}
\RequirePackage{etex}
\RequirePackage{fixltx2e}[2006/03/24]
+\unless\if@xxt@noemph@
\DeclareRobustCommand\em
{\@nomath\em
\edef\@tempa{\f@shape}%
@@ -110,8 +123,8 @@
\DeclareTextFontCommand{\emph}{\em}
\let\emshape\itshape
\let\eminnershape\upshape
-\newcommand*\robust@let@nc[2]{%
- \expandafter\let\expandafter#1\csname #2 \endcsname}
+\fi
+\unless\if@xxt@nohyphen@
\DeclareRobustCommand{\-}{%
\discretionary{%
\char\ifnum\hyphenchar\font<\z@
@@ -120,21 +133,33 @@
\hyphenchar\font
\fi}{}{}}
\def\xlx@defaulthyphenchar{`\-}
-\robust@let@nc\faketextsubscript{textsubscript}
-\robust@let@nc\faketextsuperscript{textsuperscript}
-\DeclareRobustCommand*\textsubscript{%
- \@ifstar{\faketextsubscript}{\@@textsubscript}}
-\newcommand\@@textsubscript[1]{%
+\fi
+\DeclareRobustCommand*\fakesubscript[1]{%
+ \@textsubscript{\selectfont#1}}
+\DeclareRobustCommand*\fakesuperscript[1]{%
+ \@textsuperscript{\selectfont#1}}
+\if@xxt@nosscript@
+ \DeclareRobustCommand*\textsubscript{%
+ \@ifstar{\realsubscript}{\fakesubscript}}
+ \DeclareRobustCommand*\textsuperscript{%
+ \@ifstar{\realsuperscript}{\fakesuperscript}}
+\else
+ \DeclareRobustCommand*\textsubscript{%
+ \@ifstar{\fakesubscript}{\realsubscript}}
+ \DeclareRobustCommand*\textsuperscript{%
+ \@ifstar{\fakesuperscript}{\realsuperscript}}
+\fi
+\DeclareRobustCommand*\realsubscript[1]{%
\begingroup
\c@zf@script 1818326126\relax
\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
\zf@set@font@type
\ifzf@atsui
\zf@make@aat@feature@string{10}{2}%
- \unless\ifx\zf@thisfontfeature\@empty
+ \unless\ifx\@tempa\@empty
{\addfontfeature{VerticalPosition=Inferior}#1}%
\else
- \faketextsubscript{#1}%
+ \fakesubscript{#1}%
\fi
\fi
\ifzf@icu
@@ -146,24 +171,22 @@
\if@tempswa
{\addfontfeature{VerticalPosition=ScientificInferior}#1}%
\else
- \faketextsubscript{#1}%
+ \fakesubscript{#1}%
\fi
\fi
\fi
\endgroup}
-\DeclareRobustCommand*\textsuperscript{%
- \@ifstar{\faketextsuperscript}{\@@textsuperscript}}
-\newcommand\@@textsuperscript[1]{%
+\DeclareRobustCommand*\realsuperscript[1]{%
\begingroup
\c@zf@script 1818326126\relax
\font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt
\zf@set@font@type
\ifzf@atsui
\zf@make@aat@feature@string{10}{1}%
- \unless\ifx\zf@thisfontfeature\@empty
+ \unless\ifx\@tempa\@empty
{\addfontfeature{VerticalPosition=Superior}#1}%
\else
- \faketextsuperscript{#1}%
+ \fakesuperscript{#1}%
\fi
\fi
\ifzf@icu
@@ -171,10 +194,11 @@
\if@tempswa
{\addfontfeature{VerticalPosition=Superior}#1}%
\else
- \faketextsuperscript{#1}%
+ \fakesuperscript{#1}%
\fi
\fi
\endgroup}
+\def\@makefnmark{\mbox{\normalfont\textsuperscript{\@thefnmark}}}
\newcommand*\vfrac[2]{%
\begingroup
\c@zf@script 1818326126\relax
@@ -199,8 +223,33 @@
\xxt@namedglyph@fallback{#1}%
\fi}
\newcommand\xxt@namedglyph@fallback[1]{[#1]}
+\newbox\xxt@tempbox
+\def\showhyphens#1{%
+ \typeout{^^J***********************
+ \string\showhyphens:
+ ***********************}%
+ \@for\@ii:=#1\do{\xxt@showhyphens{\@ii}}%
+ \typeout{^^J***********************%
+ ***************%
+ ***********************^^J}}
+\def\xxt@showhyphens#1{%
+ \setbox\@tempboxa=\vbox{%
+ \hsize1sp \hbadness10000 \hfuzz\maxdimen
+ \everypar={} \leftskip\z@ \rightskip\leftskip
+ \pretolerance\m@ne \noindent \hskip\z@ #1\par
+ \global\setbox\xxt@tempbox=\hbox{}\xxt@sh@cat}%
+ \setbox\@tempboxa=\hbox to \maxdimen{\unhbox\xxt@tempbox}}
+\def\xxt@sh@cat{\unskip\unpenalty
+ \setbox\@tempboxa=\lastbox
+ \unless\ifvoid\@tempboxa
+ \global\setbox\xxt@tempbox=\hbox{%
+ \unhbox\@tempboxa
+ \unskip\unskip
+ \unhbox\xxt@tempbox}%
+ \expandafter\xxt@sh@cat
+ \fi}
%%
-%% Copyright (C) 2006 by Will Robertson <wspr81@gmail.com>
+%% Copyright (C) 2006/2007 by Will Robertson <wspr81@gmail.com>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
@@ -210,7 +259,9 @@
%% by Will Robertson.
%%
%% This work consists of the file xltxtra.dtx
-%% and the derived files xltxtra.sty and xltxtra.pdf.
+%% and the derived files xltxtra.sty,
+%% xltxtra.ins, and
+%% xltxtra.pdf.
%%
%%
%% End of file `xltxtra.sty'.