texlive[44195] Master: bxorigcapt (4may17)
commits+karl at tug.org
commits+karl at tug.org
Fri May 5 00:14:39 CEST 2017
Revision: 44195
http://tug.org/svn/texlive?view=revision&revision=44195
Author: karl
Date: 2017-05-05 00:14:38 +0200 (Fri, 05 May 2017)
Log Message:
-----------
bxorigcapt (4may17)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/bxorigcapt/
trunk/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
trunk/Master/texmf-dist/doc/latex/bxorigcapt/README.md
trunk/Master/texmf-dist/tex/latex/bxorigcapt/
trunk/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
trunk/Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE 2017-05-04 22:14:38 UTC (rev 44195)
@@ -0,0 +1,21 @@
+The MIT License
+
+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
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Added: trunk/Master/texmf-dist/doc/latex/bxorigcapt/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxorigcapt/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxorigcapt/README.md 2017-05-04 22:14:38 UTC (rev 44195)
@@ -0,0 +1,81 @@
+BXorigcapt Package
+==================
+
+LaTeX: To retain the original caption names when using Babel
+
+This package forces the caption names (`\chaptername`, `\today`, etc)
+declared by the document class in use to be used as the caption names
+for a specific language introduced by the Babel package.
+
+### System requirement
+
+ * TeX format: LaTeX.
+ * TeX engine: Anything.
+ * Dependent packages:
+ - babel
+
+### Installation
+
+ - `*.sty` → $TEXMF/tex/latex/BXorigcapt
+
+### License
+
+This package is distributed under the MIT License.
+
+The bxorigcapt Package
+----------------------
+
+### Introduction
+
+Suppose you have designed a document class tailored for the Esperanto
+language. The class has the following definition of caption names and you
+like it:
+
+ \newcommand\contentsname{Tabelo de Enhavo}
+
+If a document is written solely in Esperanto, then there is no need to
+employ the Babel package. (Yes, the document class should select the
+hyphenation rule for the language.) However, when you want to create
+document that contains Esperanto and German, then you have to utilize
+Babel, to have correct hyphenations for both languages.
+
+ \usepackage[ngerman,esperanto]{babel}
+
+But unfortunately, this changes `\contentsname` from “Tabelo de Enhavo”
+(what you have chosen) to “Enhavo” (what is declared in the language
+definition file of Babel), which is unfavorable.
+
+In fact, when using a document class for a specific language, the most
+suitable caption names *for that language* should be the ones provided by
+the class. The bxorigcapt package realizes this natual request, that is,
+it enables you to make the caption names declared in the current document
+class treated as the caption names for a specific language.
+
+### Package Loading
+
+ \usepackage[<language>]{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.
+
+The option can be omitted; in that case, the main language of Babel will
+be assumed.
+
+### Usage
+
+For present, this package has no public commands. All the settings are
+done through the package option.
+
+Revision History
+----------------
+
+ * Version 0.2a 〈2017/05/03〉
+ - Minor fix.
+ * Version 0.2 〈2016/04/01〉
+ - The first public version.
+
+--------------------
+Takayuki YATO (aka. "ZR")
+https://github.com/zr-tex8r
Property changes on: trunk/Master/texmf-dist/doc/latex/bxorigcapt/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty 2017-05-04 22:14:38 UTC (rev 44195)
@@ -0,0 +1,173 @@
+%%
+%% This is file 'bxorigcapt.sty'.
+%%
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%% GitHub: https://github.com/zr-tex8r
+%% Twitter: @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bxorigcapt}[2017/05/03 v0.2a]
+\def\bxoc at pkgname{bxorigcapt}
+\providecommand*\bxDebug[1]{}
+
+%% code guard
+\edef\bxoc at restore@codes{%
+\catcode39=\the\catcode39%
+\catcode46=\the\catcode46%
+\catcode47=\the\catcode47%
+\catcode58=\the\catcode58%
+\relax}
+\catcode39=12 % <'>
+\catcode46=12 % <.>
+\catcode47=12 % </>
+\catcode58=12 % <:>
+\AtEndOfPackage{%
+\bxoc at restore@codes
+\let\bxoc at restore@codes\relax}
+
+%--------------------------------------- options
+
+%% \bxoc at target@lang
+\let\bxoc at target@lang\relax
+
+%% language options
+\DeclareOption*{%
+ \edef\bxoc at target@lang{\CurrentOption}%
+}
+% dispatch
+\ProcessOptions*
+
+%--------------------------------------- general
+
+%% \bxoc at name@list
+% The list of caption names.
+\@onlypreamble\bxoc at name@list
+\def\bxoc at name@list{%
+ abstract,also,appendix,author,bib,cc,chapter,contents,%
+ encl,figure,glossary,headto,index,listfigure,listtable,%
+ page,part,preface,proof,ps,ref,seealso,see,subject,table,%
+ prepart,postpart,prechapter,postchapter,presection,postsection%
+}
+
+%% \bxoc at deprecated@ldf at list
+% The list of the names of deprecated commands.
+\@onlypreamble\bxoc at deprecated@ldf at list
+\def\bxoc at deprecated@ldf at list{}
+
+%--------------------------------------- public commands
+
+%%<+> \bxorigcaptDeprecateCommand{<csname>,...}
+\@onlypreamble\bxorigcaptDeprecateCommand
+\newcommand*\bxorigcaptDeprecateCommand[1]{%
+ \edef\bxoc at deprecated@ldf at list{\bxoc at deprecated@ldf at list,#1}}
+
+%--------------------------------------- hook
+
+%% \bxoc at babel@hook
+% Note that \bxoc at babel@hook must be invoked between the loading
+% of babel and the dispatch of babel's begin-document hook.
+\@onlypreamble\bxoc at babel@hook
+\let\bxoc at babel@hook\@empty
+\@ifpackageloaded{babel}{%
+ \AtEndOfPackage{\bxoc at babel@hook}%
+}{%else
+ \AtBeginDocument{%
+ \@ifpackageloaded{babel}{%
+ \bxoc at babel@hook
+ }{%else
+ \PackageWarning\bxoc at pkgname
+ {Babel is not loaded,}%
+ }%
+ }%
+}
+
+%--------------------------------------- deprecated ldf stuffs
+
+%% \bxoc at clear@deprecated at ldf
+\@onlypreamble\bxoc at clear@deprecated at ldf
+\def\bxoc at clear@deprecated at ldf{%
+ \begingroup
+ \@for\bxoc at tmpa:=\bxoc at deprecated@ldf at list\do{%
+ \ifx\@bxoc at tmpa\@empty\else
+ \expandafter\ifx\csname \bxoc at tmpa\endcsname\relax\else
+ \bxDebug{Smashed \@backslashchar\bxoc at tmpa}%
+ \global\expandafter\let\csname\bxoc at tmpa\endcsname\@empty
+ \fi
+ \fi
+ }%
+ \endgroup
+ \bxoc at clear@deprecated at ldf@a
+}
+\@onlypreamble\bxoc at clear@deprecated at ldf@a
+\def\bxoc at clear@deprecated at ldf@a{%
+ \global\let\bxoc at clear@deprecated at ldf@a\relax
+ \gdef\bxorigcaptDeprecateCommand##1{%
+ \edef\bxoc at deprecated@ldf at list{##1}%
+ \bxoc at clear@deprecated at ldf}}
+\g at addto@macro\bxoc at babel@hook{\bxoc at clear@deprecated at ldf}
+
+%--------------------------------------- save and restore
+
+%% variables
+\let\bxoc@@today\relax
+% \[bxoc@@<caption>name]
+
+%% \bxoc at save@captions
+%% \bxoc at restore@captions
+\@onlypreamble\bxoc at save@captions
+\let\bxoc at save@captions\@empty
+\let\bxoc at restore@captions\@empty
+\begingroup
+ \@for\bxoc at tmpa:=\bxoc at name@list\do{%
+ \edef\bxoc at next{%
+ \noexpand\g at addto@macro\noexpand\bxoc at save@captions{%
+ \let\expandafter\noexpand\csname bxoc@@\bxoc at tmpa name\endcsname
+ \expandafter\noexpand\csname\bxoc at tmpa name\endcsname}%
+ }\bxoc at next
+ \edef\bxoc at next{%
+ \noexpand\g at addto@macro\noexpand\bxoc at restore@captions{%
+ \let\expandafter\noexpand\csname \bxoc at tmpa name\endcsname
+ \expandafter\noexpand\csname bxoc@@\bxoc at tmpa name\endcsname}%
+ }\bxoc at next
+ }
+\endgroup
+
+%% \bxoc at restore@date
+\def\bxoc at restore@date{%
+ \let\today\bxoc@@today
+}
+
+%% \bxoc at enable@restore
+\@onlypreamble\bxoc at enable@restore
+\def\bxoc at enable@restore{%
+ \ifx\bxoc at target@lang\relax
+ \let\bxoc at target@lang\bbl at main@language
+ \fi
+ \bxDebug{target=\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}%
+ \@ehc
+ \@namedef{date\bxoc at target@lang}{}%
+ \fi
+ \expandafter\ifx\csname captions\bxoc at target@lang\endcsname\relax
+ \@namedef{captions\bxoc at target@lang}{}%
+ \fi
+ \expandafter\g at addto@macro\csname date\bxoc at target@lang\endcsname{%
+ \bxoc at restore@date}%
+ \expandafter\g at addto@macro\csname captions\bxoc at target@lang\endcsname{%
+ \bxoc at restore@captions}%
+}
+
+%% Saves the current captions
+\bxoc at save@captions
+\let\bxoc@@today\today
+\g at addto@macro\bxoc at babel@hook{\bxoc at enable@restore}
+
+%--------------------------------------- done
+\endinput
+%% EOF
Property changes on: trunk/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2017-05-04 22:14:01 UTC (rev 44194)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2017-05-04 22:14:38 UTC (rev 44195)
@@ -124,7 +124,7 @@
bullcntr bundledoc burmese bussproofs
bxbase bxcjkjatype bxdpx-beamer bxdvidriver
bxpapersize bxpdfver bxeepic bxenclose
- bxjalipsum bxjscls bxnewfont bytefield
+ bxjalipsum bxjscls bxnewfont bxorigcapt bytefield
c90 c-pascal cabin cachepic caladea calcage calctab calculation calculator
calligra calligra-type1 callouts calrsfs cals calxxxx-yyyy cancel
canoniclayout cantarell
Added: trunk/Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc 2017-05-04 22:14:01 UTC (rev 44194)
+++ trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc 2017-05-04 22:14:38 UTC (rev 44195)
@@ -9,6 +9,7 @@
depend bxcjkjatype
depend bxjalipsum
depend bxjscls
+depend bxorigcapt
depend convbkmk
depend ifptex
depend ipaex
More information about the tex-live-commits
mailing list