texlive[62715] branches/branch2021.final/Master/texmf-dist:

commits+karl at tug.org commits+karl at tug.org
Tue Mar 15 20:57:15 CET 2022


Revision: 62715
          http://tug.org/svn/texlive?view=revision&revision=62715
Author:   karl
Date:     2022-03-15 20:57:15 +0100 (Tue, 15 Mar 2022)
Log Message:
-----------
bxorigcapt (15mar22) (branch)

Modified Paths:
--------------
    branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
    branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/README.md
    branches/branch2021.final/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty

Modified: branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE	2022-03-15 19:56:55 UTC (rev 62714)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE	2022-03-15 19:57:15 UTC (rev 62715)
@@ -1,6 +1,6 @@
 The MIT License
 
-Copyright (c) 2017-2018 Takayuki YATO (aka. "ZR")
+Copyright (c) 2016-2022 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: branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/README.md
===================================================================
--- branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/README.md	2022-03-15 19:56:55 UTC (rev 62714)
+++ branches/branch2021.final/Master/texmf-dist/doc/latex/bxorigcapt/README.md	2022-03-15 19:57:15 UTC (rev 62715)
@@ -55,24 +55,31 @@
 
 ### Package Loading
 
-    \usepackage[<language>]{bxorigcapt}
+    \usepackage[<option>,...]{bxorigcapt}
 
-The package option specifies a Babel language, and requires that the
-caption names provided by the document class (actually the ones that are
-effective when this package is loaded) should be used as the caption names
-for that language.
+Available options are:
 
-The option can be omitted; in that case, the main language of Babel will
-be assumed.
+  - a Babel language name: Specifies the target language. The default
+    target language is the main language of Babel.
+  - `warn`: Issues a warning (instead of an info) if Babel is never
+    loaded in the preamble.
 
 ### Usage
 
-For present, this package has no public commands. All the settings are
-done through the package option.
+Once this package is loaded, the caption names provided by the document
+class (actually the ones that are effective when this package is loaded)
+will be used as the caption names for the target language (which is
+specified by the package option).
 
+This package has no public commands.
+
+
 Revision History
 ----------------
 
+  * Version 0.4  〈2022/03/12〉
+      - Adjustment for new version of Babel.
+      - Add option `warn`.
   * Version 0.3  〈2018/09/05〉
       - Add support for Polyglossia.
   * Version 0.2a 〈2017/05/03〉

Modified: branches/branch2021.final/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
===================================================================
--- branches/branch2021.final/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty	2022-03-15 19:56:55 UTC (rev 62714)
+++ branches/branch2021.final/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty	2022-03-15 19:57:15 UTC (rev 62715)
@@ -1,7 +1,7 @@
 %%
 %% This is file 'bxorigcapt.sty'.
 %%
-%% Copyright (c) 2017-2018 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2016-2022 Takayuki YATO (aka. "ZR")
 %%   GitHub:   https://github.com/zr-tex8r
 %%   Twitter:  @zr_tex8r
 %%
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bxorigcapt}[2018/09/05 v0.2a]
+\ProvidesPackage{bxorigcapt}[2022/03/12 v0.4]
 \def\bxoc at pkgname{bxorigcapt}
 \providecommand*\bxDebug[1]{}
 
@@ -38,34 +38,54 @@
 %% \bxoc at target@lang
 \let\bxoc at target@lang\relax
 
-%% language options
+%% \bxoc at warn@or at info
+\let\bxoc at warn@or at info\PackageInfo
+
+%% handle options
+% 'warn'
+\DeclareOption{warn}{%
+  \let\bxoc at warn@or at info\PackageWarning
+}
+% language options
 \DeclareOption*{%
   \edef\bxoc at target@lang{\CurrentOption}%
 }
 % dispatch
 \ProcessOptions*
+\bxDebug{target language = %
+  \ifx\bxoc at target@lang\relax (main)\else \bxoc at target@lang\fi}
 
 %--------------------------------------- environment
 
+%% switch 'bxoc at etoolbox@available'
+\newif\ifbxoc at etoolbox@available
 %% switch 'bxoc at polyglossia@available'
 \newif\ifbxoc at polyglossia@available
 \begingroup
-  \@tempswafalse
-  % engine check
   \def\bxoc at next#1{%
     \edef\bxoc at tmpa{\string#1}\edef\bxoc at tmpb{\meaning#1}%
     \ifx\bxoc at tmpa\bxoc at tmpb \@tempswatrue \fi
   }
-  \bxoc at next\XeTeXversion
-  \bxoc at next\luatexversion
-  % file check
+  %% set 'bxoc at etoolbox@available'
+  \@tempswafalse
+  \bxoc at next\eTeXversion
   \if at tempswa
-    \IfFileExists{polyglossia.sty}{}{\@tempswafalse}
     \IfFileExists{etoolbox.sty}{}{\@tempswafalse}
   \fi
   \if at tempswa
-    \bxDebug{Polyglossia might be loaded}
-    \global\bxoc at polyglossia@availabletrue
+    \bxDebug{etoolbox is available}
+    \global\bxoc at etoolbox@availabletrue
+    %% set 'bxoc at polyglossia@available'
+    \@tempswafalse
+    \bxoc at next\XeTeXversion
+    \bxoc at next\luatexversion
+    \if at tempswa
+      \IfFileExists{polyglossia.sty}{}{\@tempswafalse}
+    \fi
+    \if at tempswa
+      \bxDebug{Polyglossia is available}
+      \global\bxoc at polyglossia@availabletrue
+    \fi
   \fi
 \endgroup
 
@@ -72,7 +92,7 @@
 %--------------------------------------- general
 
 %% packages
-\ifbxoc at polyglossia@available
+\ifbxoc at etoolbox@available
   \RequirePackage{etoolbox}\relax
 \fi
 
@@ -137,7 +157,7 @@
 \@onlypreamble\bxoc at babel@hook
 \let\bxoc at babel@hook\@empty
 \bxoc at if@babel at or@polyglossia at loaded{%
-  \ifbxoc at polyglossia@available
+  \ifbxoc at etoolbox@available
     \AtEndPreamble{%
       \bxoc at check@conflict
       \bxoc at babel@hook
@@ -146,15 +166,15 @@
     \AtEndOfPackage{\bxoc at babel@hook}%
   \fi
 }{%else
-  \ifbxoc at polyglossia@available
+  \ifbxoc at etoolbox@available
     \AtEndPreamble{%
       \bxoc at if@babel at or@polyglossia at loaded{%
         \bxoc at check@conflict
         \bxoc at babel@hook
       }{%else
-        \PackageWarning\bxoc at pkgname
+        \bxoc at warn@or at info\bxoc at pkgname
          {Neither Polyglossia nor Babel is\MessageBreak
-          loaded,}%
+          loaded, reported}%
       }%
     }%
   \else
@@ -162,8 +182,8 @@
       \@ifpackageloaded{babel}{%
         \bxoc at babel@hook
       }{%else
-        \PackageWarning\bxoc at pkgname
-         {Babel is not loaded,}%
+        \bxoc at warn@or at info\bxoc at pkgname
+         {Babel is not loaded,\MessageBreak reported}%
       }%
     }%
   \fi
@@ -242,7 +262,7 @@
       \@namedef{date\bxoc at target@lang}{}%
     \fi
   \fi
-  \bxDebug{target=\bxoc at target@lang}%
+  \bxDebug{target language = \bxoc at target@lang}%
   \expandafter\ifx\csname date\bxoc at target@lang\endcsname\relax
     \PackageError\bxoc at pkgname
      {Language '\bxoc at target@lang' not defined}%
@@ -256,6 +276,13 @@
     \bxoc at restore@date}%
   \expandafter\g at addto@macro\csname captions\bxoc at target@lang\endcsname{%
     \bxoc at restore@captions}%
+  \ifbxoc at etoolbox@available
+    % do not do 'ensure'!
+    \ifcsundef{bbl at e@\bxoc at target@lang}{}{%else
+      \bxDebug{ensure for \bxoc at target@lang\space invalidated}%
+      \csundef{bbl at e@\bxoc at target@lang}%
+    }%
+  \fi
 }
 
 %% Saves the current captions



More information about the tex-live-commits mailing list.