summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty41
1 files changed, 34 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty b/Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty
index 8b1105150de..3038eb90397 100644
--- a/Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty
+++ b/Master/texmf-dist/tex/latex/bxtexlogo/bxtexlogo.sty
@@ -1,7 +1,7 @@
%%
%% This is file 'bxtexlogo.sty'.
%%
-%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2017, 2018 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxtexlogo}[2017/11/11 v0.3]
+\ProvidesPackage{bxtexlogo}[2018/03/31 v0.4]
%% preparation
\def\bxlg@pkgname{bxtexlogo}
@@ -160,7 +160,8 @@
\leavevmode\lower.5ex\hbox{J}\bxlg@akern{-.15}\hologo{BibTeX}}
\bxtexlogoDeclare{primary}{pBibTeX}[]{p\hologo{BibTeX}}
\bxtexlogoDeclare{primary}{upBibTeX}[]{up\hologo{BibTeX}}
-\bxtexlogoDeclare{primary}{TikZ}{Ti\textit{k}Z\bxlg@nonuc}
+\bxtexlogoDeclare{primary}{TikZ}{%
+ Ti\bxtexlogoItalicOrSlant{k}Z\bxlg@nonuc}
%% old or not-so-famous
\bxtexlogoDeclare{secondary}{JTeX}{%
@@ -203,6 +204,9 @@
\vbox to\ht\z@{\kern.05em \hbox{\bxlg@smaller{A}}\vss}%
\endgroup
\kern-.23em \TeX}
+\bxtexlogoDeclare{secondary}{ApTeX}{A\kern-.08em \bxlg@logo@@pTeX}
+\bxtexlogoDeclare{secondary}{DVIPDFMx}{% obsolete logo
+ DVI\-PDFM\bxtexlogoItalicOrSlant{x}}
%% fancy things (Not!)
\bxtexlogoDeclare{secondary}{BaSiX}{%
@@ -462,6 +466,7 @@
%% variables
\let\bxlg@slant@val\relax
+\newdimen\bxlg@g@height
%%<+> \bxtexlogoFontSlant
% Uses the slant value of the current font.
@@ -482,6 +487,7 @@
\aftergroup\bxlg@slant@c}
\def\bxlg@slant@c{%
\leavevmode
+ \global\bxlg@g@height\ht\z@
\ifdim\bxlg@slant@val\p@=\z@ \box\z@
\else
\@tempdima\wd\z@ \wd\z@\z@
@@ -503,18 +509,23 @@
\def\bxlg@implement@slant{%
\begingroup
\chardef\bxlg@tmpb=0
- \def\bxlg@tmpa{\special{ps: currentpoint grestore moveto}}
+ \def\bxlg@tmpa{\special{ps: currentpoint grestore moveto}}%
\ifx\bxlg@tmpa\Grot@end \chardef\bxlg@tmpb=1 \fi
- \def\bxlg@tmpa{\special{pdf:etrans}}
+ \def\bxlg@tmpa{\special{pdf:etrans}}%
\ifx\bxlg@tmpa\Grot@end \chardef\bxlg@tmpb=2 \fi
- \def\bxlg@tmpa{\pdfrestore}
+ \def\bxlg@tmpa{\pdfrestore}%
\ifx\bxlg@tmpa\Grot@end \chardef\bxlg@tmpb=3 \fi
- \def\bxlg@tmpa{\pdfextension restore\relax}
+ \def\bxlg@tmpa{\pdfextension restore\relax}%
\ifx\bxlg@tmpa\Grot@end \chardef\bxlg@tmpb=4 \fi
+ \def\bxlg@tmpa{dvipdfmx.def}%
+ \ifx\bxlg@tmpa\Gin@driver \chardef\bxlg@tmpb=2 \fi
+ \def\bxlg@tmpa{xetex.def}%
+ \ifx\bxlg@tmpa\Gin@driver \chardef\bxlg@tmpb=2 \fi
\bxDebug{[gdriver=\the\bxlg@tmpb]}%
\ifcase\bxlg@tmpb
% unknown, then leave unimplmented
\or % dvips
+ % TODO: implement
\or % dvipdfmx
\gdef\bxlg@slant@start{\special{%
pdf:btrans matrix 1 0 \bxlg@slant@val\space 1 0 0}}
@@ -533,6 +544,22 @@
\endgroup}
\AtBeginDocument{\bxlg@implement@slant}
+%% \bxlg@fallback@slant
+\def\bxlg@fallback@slant{0.167}
+
+%%<+> \bxtexlogoItalicOrSlant
+% Uses the slant value of the current font.
+\newcommand*\bxtexlogoItalicOrSlant[1]{%
+ \textit{%
+ \@tempdima\fontdimen\@ne\font
+ \ifdim\@tempdima>\z@
+ #1%
+ \else
+ \bxtexlogoSlant\bxlg@fallback@slant{#1}%
+ \@tempdima\bxlg@fallback@slant\bxlg@g@height
+ \kern.75\@tempdima
+ \fi}}
+
%--------------------------------------- small-caps
%% constants