texlive[43219] Master/texmf-dist: bxdvidriver (13feb17)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 14 00:21:45 CET 2017


Revision: 43219
          http://tug.org/svn/texlive?view=revision&revision=43219
Author:   karl
Date:     2017-02-14 00:21:44 +0100 (Tue, 14 Feb 2017)
Log Message:
-----------
bxdvidriver (13feb17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bxdvidriver/LICENSE
    trunk/Master/texmf-dist/doc/latex/bxdvidriver/README.md
    trunk/Master/texmf-dist/tex/latex/bxdvidriver/bxdvidriver.sty

Modified: trunk/Master/texmf-dist/doc/latex/bxdvidriver/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxdvidriver/LICENSE	2017-02-13 23:21:29 UTC (rev 43218)
+++ trunk/Master/texmf-dist/doc/latex/bxdvidriver/LICENSE	2017-02-13 23:21:44 UTC (rev 43219)
@@ -1,12 +1,6 @@
-$BK\%=%U%H%&%'%"$O(B MIT $B%i%$%;%s%9$N2<$GG[I[$5$l$^$9!#(B
-$BCx:n8"$O:n<T$G$"$k!VH,EP(B $B?rG7!JJLL>(B ZR$B!K!W$KB0$7$^$9!#(B
-$B$^$?K\%=%U%H%&%'%"$OL5J]>Z$G$9!#(B
-
-This software is distributed under the MIT License.
-
 The MIT License
 
-Copyright (c) 2016 Takayuki YATO (aka. "ZR")
+Copyright (c) 2017 Takayuki YATO (aka. "ZR")
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/latex/bxdvidriver/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxdvidriver/README.md	2017-02-13 23:21:29 UTC (rev 43218)
+++ trunk/Master/texmf-dist/doc/latex/bxdvidriver/README.md	2017-02-13 23:21:44 UTC (rev 43219)
@@ -94,9 +94,11 @@
 Revision History
 ----------------
 
+  * Version 0.2a ‹2017/02/13›
+      - Bug fix.
   * Version 0.2  ‹2016/03/26›
       - The first public version.
 
 --------------------
 Takayuki YATO (aka. "ZR")  
-http://zrbabbler.sp.land.to/
+https://github.com/zr-tex8r

Modified: trunk/Master/texmf-dist/tex/latex/bxdvidriver/bxdvidriver.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxdvidriver/bxdvidriver.sty	2017-02-13 23:21:29 UTC (rev 43218)
+++ trunk/Master/texmf-dist/tex/latex/bxdvidriver/bxdvidriver.sty	2017-02-13 23:21:44 UTC (rev 43219)
@@ -2,7 +2,7 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxdvidriver}[2016/03/26 v0.2]
+\ProvidesPackage{bxdvidriver}[2017/02/13 v0.2a]
 
 %% preparation
 \def\bxdd at pkgname{bxdvidriver}
@@ -29,9 +29,9 @@
 %% variables
 \newif\ifbxdd at ok
 \@onlypreamble\bxdd at driver
-\let\bxdd at driver\relax
+\let\bxdd at driver\relax  % driver given to this package
 \@onlypreamble\bxdd at pdf@driver
-\let\bxdd at pdf@driver\relax
+\let\bxdd at pdf@driver\relax  % actual pdf-mode driver, or \relax
 
 %% \[bxdd at T/<driver>]
 \@for\bxdd at x:=\bxdd at dvi@driver at list\do{%
@@ -45,6 +45,12 @@
 \def\bxdd at detokenize@a#1>#2\relax#3{%
   \def#3{#2}}
 
+%% switch 'bxdd at in@preamble'
+\newif\ifbxdd at in@preamble
+\ifx\documentclass\@twoclasseserror
+  \bxdd at in@preambletrue
+\fi
+
 %--------------------------------------- options
 
 %% 'check'/'nocheck'
@@ -53,26 +59,35 @@
   \bxdd at checktrue}
 \DeclareOption{nocheck}{%
   \bxdd at checkfalse}
-%% drivers
+%% driver options
 \DeclareOption*{%
-  \expandafter\let\expandafter\bxdd at tmpa
-      \csname bxdd at T/\CurrentOption\endcsname
-  \ifx\bxdd at tmpa\relax
+  \bxdd at pfxplus\CurrentOption \ifx\bxdd at tmpa\@empty
+    \let\bxdd at tmpa\CurrentOption
+  \else
+    \expandafter\let\csname bxdd at T/\bxdd at tmpa\endcsname=d%
+  \fi
+  \expandafter\let\expandafter\bxdd at tmpb
+      \csname bxdd at T/\bxdd at tmpa\endcsname
+  \ifx\bxdd at tmpb\relax % unknown name
     \PackageError\bxdd at pkgname
-     {Unknown driver name '\CurrentOption' found}%
+     {Unknown driver name '\bxdd at tmpa' found}%
      {The invalid option is ignored.\MessageBreak\@ehc}
-  \else\ifx\bxdd at driver\relax
-    \let\bxdd at driver\CurrentOption
-  \else\ifx\bxdd at driver\CurrentOption
+  \else\ifx\bxdd at driver\relax % first
+    \let\bxdd at driver\bxdd at tmpa
+  \else\ifx\bxdd at driver\bxdd at tmpa % repeated
     \PackageInfo\bxdd at pkgname
-     {Redundant driver option '\CurrentOption',\MessageBreak
+     {Redundant driver option '\bxdd at tmpa',\MessageBreak
       found}%
-  \else
+  \else % second
     \PackageError\bxdd at pkgname
      {Multiple driver options are given\MessageBreak
-      ('\bxdd at driver' and '\CurrentOption')}%
-      {The extra option '\CurrentOption' is ignored.\MessageBreak\@ehc}
+      ('\bxdd at driver' and '\bxdd at tmpa')}%
+      {The extra option '\bxdd at tmpa' is ignored.\MessageBreak\@ehc}
   \fi\fi\fi}
+\def\bxdd at pfxplus#1{%
+  \expandafter\bxdd at pfxplus@a#1\@gobble+\@nil}
+\def\bxdd at pfxplus@a#1+#2\@nil{%
+  \edef\bxdd at tmpa{\ifx\@nil#1\@nil#2\else\fi}}
 %%
 \ProcessOptions*
 
@@ -89,7 +104,7 @@
 
 %--------------------------------------- pdf-mode detection
 
-%% check 'pdfmode'
+%% check 'pdfmode' and set \bxdd at pdf@driver
 \bxdd at oktrue
 \ifluatex
   \let\bxdd at tmpa\m at ne
@@ -113,6 +128,7 @@
 \ifbxdd at ok\else
 \expandafter\endinput\fi\relax
 
+% clear \bxdd at driver if pdf-mode
 \ifx\bxdd at pdf@driver\relax\else
   \PackageInfo\bxdd at pkgname
    {Driver option '\bxdd at driver' is ignored, because\MessageBreak
@@ -120,7 +136,7 @@
   \let\bxdd at driver\relax
 \fi
 
-%--------------------------------------- 
+%--------------------------------------- append to global
 
 %% variables
 \let\bxdd at gopt\relax
@@ -134,6 +150,10 @@
   \@for\bxdd at gopt:=\@classoptionslist\do{%
     \let\bxdd at tmpa\bxdd at gopt \bxdd at detokenize\bxdd at tmpa
     \expandafter\ifx\csname bxdd at T/\bxdd at tmpa\endcsname\relax\else
+      \ifbxdd at in@preamble
+        \@expandtwoargs\@removeelement\bxdd at gopt
+            \@unusedoptionlist\@unusedoptionlist
+      \fi
       \ifx\bxdd at godrv\bxdd at gopt % just redundant
       \else\ifx\bxdd at godrv\relax % first
         \let\bxdd at godrv\bxdd at gopt
@@ -148,6 +168,7 @@
         \let\bxdd at godrv\bxdd at godrv@multiple
       \fi\fi\fi
     \fi}
+  \global\let\@unusedoptionlist\@unusedoptionlist
   \aftergroup\bxdd at okfalse
   \ifx\bxdd at godrv\relax
     \ifx\bxdd at driver\relax\else
@@ -167,6 +188,8 @@
         (see log for detail)}%
        {\@ehd}%
     \fi
+  \else\ifx\bxdd at driver\relax
+    % nothing to do
   \else % inconsistent
     \ifbxdd at check
       \PackageError\bxdd at pkgname
@@ -179,11 +202,11 @@
         because the global option list contains another driver\MessageBreak
         '\bxdd at godrv',}
     \fi
-  \fi\fi\fi
+  \fi\fi\fi\fi
   \endgroup}
 
 %% append the specified driver option
-\ifx\documentclass\@twoclasseserror% in preamble
+\ifbxdd at in@preamble
   \bxdd at scan@global at options
   \ifbxdd at ok
     \edef\bxdd at tmpa{%
@@ -211,7 +234,7 @@
     \bxdd at tmpa}
 \fi
 
-%---------------------------------------
+%--------------------------------------- check for graphics drivers
 
 %% \bxdd at scan@graphics at drivers
 \@onlypreamble\bxdd at scan@graphics at drivers



More information about the tex-live-commits mailing list