summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-04 22:14:38 +0000
committerKarl Berry <karl@freefriends.org>2017-05-04 22:14:38 +0000
commit06ecc9f9415924da0dc43ceffdcf0e970c745ad9 (patch)
tree0b2260cb67e638ac64d976b5d03d630baaec304a
parent673a8d0f7aca9c451d1a2e325e8479824b1a0df2 (diff)
bxorigcapt (4may17)
git-svn-id: svn://tug.org/texlive/trunk@44195 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/bxorigcapt/LICENSE21
-rw-r--r--Master/texmf-dist/doc/latex/bxorigcapt/README.md81
-rw-r--r--Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty173
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc1
6 files changed, 277 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE b/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
new file mode 100644
index 00000000000..8ada757fbc8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bxorigcapt/LICENSE
@@ -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.
diff --git a/Master/texmf-dist/doc/latex/bxorigcapt/README.md b/Master/texmf-dist/doc/latex/bxorigcapt/README.md
new file mode 100644
index 00000000000..83095fa7de2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bxorigcapt/README.md
@@ -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
diff --git a/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty b/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
new file mode 100644
index 00000000000..6de4b9386ef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bxorigcapt/bxorigcapt.sty
@@ -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@pkgname{bxorigcapt}
+\providecommand*\bxDebug[1]{}
+
+%% code guard
+\edef\bxoc@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@restore@codes
+\let\bxoc@restore@codes\relax}
+
+%--------------------------------------- options
+
+%% \bxoc@target@lang
+\let\bxoc@target@lang\relax
+
+%% language options
+\DeclareOption*{%
+ \edef\bxoc@target@lang{\CurrentOption}%
+}
+% dispatch
+\ProcessOptions*
+
+%--------------------------------------- general
+
+%% \bxoc@name@list
+% The list of caption names.
+\@onlypreamble\bxoc@name@list
+\def\bxoc@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@deprecated@ldf@list
+% The list of the names of deprecated commands.
+\@onlypreamble\bxoc@deprecated@ldf@list
+\def\bxoc@deprecated@ldf@list{}
+
+%--------------------------------------- public commands
+
+%%<+> \bxorigcaptDeprecateCommand{<csname>,...}
+\@onlypreamble\bxorigcaptDeprecateCommand
+\newcommand*\bxorigcaptDeprecateCommand[1]{%
+ \edef\bxoc@deprecated@ldf@list{\bxoc@deprecated@ldf@list,#1}}
+
+%--------------------------------------- hook
+
+%% \bxoc@babel@hook
+% Note that \bxoc@babel@hook must be invoked between the loading
+% of babel and the dispatch of babel's begin-document hook.
+\@onlypreamble\bxoc@babel@hook
+\let\bxoc@babel@hook\@empty
+\@ifpackageloaded{babel}{%
+ \AtEndOfPackage{\bxoc@babel@hook}%
+}{%else
+ \AtBeginDocument{%
+ \@ifpackageloaded{babel}{%
+ \bxoc@babel@hook
+ }{%else
+ \PackageWarning\bxoc@pkgname
+ {Babel is not loaded,}%
+ }%
+ }%
+}
+
+%--------------------------------------- deprecated ldf stuffs
+
+%% \bxoc@clear@deprecated@ldf
+\@onlypreamble\bxoc@clear@deprecated@ldf
+\def\bxoc@clear@deprecated@ldf{%
+ \begingroup
+ \@for\bxoc@tmpa:=\bxoc@deprecated@ldf@list\do{%
+ \ifx\@bxoc@tmpa\@empty\else
+ \expandafter\ifx\csname \bxoc@tmpa\endcsname\relax\else
+ \bxDebug{Smashed \@backslashchar\bxoc@tmpa}%
+ \global\expandafter\let\csname\bxoc@tmpa\endcsname\@empty
+ \fi
+ \fi
+ }%
+ \endgroup
+ \bxoc@clear@deprecated@ldf@a
+}
+\@onlypreamble\bxoc@clear@deprecated@ldf@a
+\def\bxoc@clear@deprecated@ldf@a{%
+ \global\let\bxoc@clear@deprecated@ldf@a\relax
+ \gdef\bxorigcaptDeprecateCommand##1{%
+ \edef\bxoc@deprecated@ldf@list{##1}%
+ \bxoc@clear@deprecated@ldf}}
+\g@addto@macro\bxoc@babel@hook{\bxoc@clear@deprecated@ldf}
+
+%--------------------------------------- save and restore
+
+%% variables
+\let\bxoc@@today\relax
+% \[bxoc@@<caption>name]
+
+%% \bxoc@save@captions
+%% \bxoc@restore@captions
+\@onlypreamble\bxoc@save@captions
+\let\bxoc@save@captions\@empty
+\let\bxoc@restore@captions\@empty
+\begingroup
+ \@for\bxoc@tmpa:=\bxoc@name@list\do{%
+ \edef\bxoc@next{%
+ \noexpand\g@addto@macro\noexpand\bxoc@save@captions{%
+ \let\expandafter\noexpand\csname bxoc@@\bxoc@tmpa name\endcsname
+ \expandafter\noexpand\csname\bxoc@tmpa name\endcsname}%
+ }\bxoc@next
+ \edef\bxoc@next{%
+ \noexpand\g@addto@macro\noexpand\bxoc@restore@captions{%
+ \let\expandafter\noexpand\csname \bxoc@tmpa name\endcsname
+ \expandafter\noexpand\csname bxoc@@\bxoc@tmpa name\endcsname}%
+ }\bxoc@next
+ }
+\endgroup
+
+%% \bxoc@restore@date
+\def\bxoc@restore@date{%
+ \let\today\bxoc@@today
+}
+
+%% \bxoc@enable@restore
+\@onlypreamble\bxoc@enable@restore
+\def\bxoc@enable@restore{%
+ \ifx\bxoc@target@lang\relax
+ \let\bxoc@target@lang\bbl@main@language
+ \fi
+ \bxDebug{target=\bxoc@target@lang}%
+ \expandafter\ifx\csname date\bxoc@target@lang\endcsname\relax
+ \PackageError\bxoc@pkgname
+ {Language '\bxoc@target@lang' not defined}%
+ \@ehc
+ \@namedef{date\bxoc@target@lang}{}%
+ \fi
+ \expandafter\ifx\csname captions\bxoc@target@lang\endcsname\relax
+ \@namedef{captions\bxoc@target@lang}{}%
+ \fi
+ \expandafter\g@addto@macro\csname date\bxoc@target@lang\endcsname{%
+ \bxoc@restore@date}%
+ \expandafter\g@addto@macro\csname captions\bxoc@target@lang\endcsname{%
+ \bxoc@restore@captions}%
+}
+
+%% Saves the current captions
+\bxoc@save@captions
+\let\bxoc@@today\today
+\g@addto@macro\bxoc@babel@hook{\bxoc@enable@restore}
+
+%--------------------------------------- done
+\endinput
+%% EOF
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 1916e1fdc0f..a38de48e402 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -124,7 +124,7 @@ my @TLP_working = qw(
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
diff --git a/Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc b/Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/bxorigcapt.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
index 3fc10ab434b..b43ad67f1bd 100644
--- a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
@@ -9,6 +9,7 @@ depend bxbase
depend bxcjkjatype
depend bxjalipsum
depend bxjscls
+depend bxorigcapt
depend convbkmk
depend ifptex
depend ipaex