From 6939ed0afc29a47a10b7cf679b0788b95e68bdf4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 22 Sep 2019 22:15:53 +0000 Subject: bxghost (23sep19) git-svn-id: svn://tug.org/texlive/trunk@52150 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bxghost/LICENSE | 21 +++++ Master/texmf-dist/doc/latex/bxghost/README.md | 37 ++++++++ Master/texmf-dist/tex/latex/bxghost/bxghost.sty | 100 +++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/bxghost.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc | 1 + 6 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/bxghost/LICENSE create mode 100644 Master/texmf-dist/doc/latex/bxghost/README.md create mode 100644 Master/texmf-dist/tex/latex/bxghost/bxghost.sty create mode 100644 Master/tlpkg/tlpsrc/bxghost.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/bxghost/LICENSE b/Master/texmf-dist/doc/latex/bxghost/LICENSE new file mode 100644 index 00000000000..d20a0d418f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxghost/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2019 Takuto ASAKURA (wtsnjp) + +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/bxghost/README.md b/Master/texmf-dist/doc/latex/bxghost/README.md new file mode 100644 index 00000000000..f9096387cc8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxghost/README.md @@ -0,0 +1,37 @@ +# The BXghost Package + +LaTeX: ghost insertion for proper xkanjiskip + +## System requirements + +* TeX format: LaTeX +* TeX engine: LuaTeX, XeTeX, pTeX, upTeX, and ApTeX (pTeX-ng) + +Since this package is intended to create documents in Japanese, it assumes appropriate classes and/or packages are loaded in some engines (e.g., LuaTeX-ja for LuaTeX and bxjscls for XeTeX). BXghost does not load any external packages automatically. + +## Usage + +This package provides following commands: + +* `\eghostguarded{}` inserts *Europian ghost* (invisible and zero-width alphabets) before and after the ``. In math mode, it outputs only `` without the ghosts. +* `\jghostguarded{}` inserts *Japanese ghost* (invisible and zero-width Kanji) before and after the ``. In math mode, it outputs only `` without the ghosts. + +## Acknowledgements + +The logic and style of the code in this package is greatly inspired by [Package PXghost](https://gist.github.com/zr-tex8r/4461060) and various packages in [the BX series](http://zrbabbler.sp.land.to/package.html#ssec-bx). I would like to thank the author of the packages, Dr. Takayuki YATO (aka. [ZR](https://github.com/zr-tex8r)). + +## License + +This package is distributed under [the MIT license](./LICENSE). + +## Revision History + +* Version 0.2.0 ‹2019/09/17› + * Add supports for XeTeX and ApTeX (pTeX-ng) +* Version 0.1.0 ‹2019/09/16› + * The first public version + * Add supports for LuaTeX to the original [PXghost](https://gist.github.com/zr-tex8r/4461060) package + +--- + +Takuto ASAKURA ([wtsnjp](https://twitter.com/wtsnjp)) diff --git a/Master/texmf-dist/tex/latex/bxghost/bxghost.sty b/Master/texmf-dist/tex/latex/bxghost/bxghost.sty new file mode 100644 index 00000000000..552d28ad9cf --- /dev/null +++ b/Master/texmf-dist/tex/latex/bxghost/bxghost.sty @@ -0,0 +1,100 @@ +%% +%% This is file 'bxghost.sty'. +%% +%% Copyright 2019 Takuto ASAKURA (wtsnjp) +%% GitHub: https://github.com/wtsnjp +%% Twitter: @wtsnjp +%% +%% This package is distributed under the MIT License. +%% + +%% package declaration +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bxghost}[2019/09/17 v0.2.0] + +%% preparations +\def\bxqgg@pkgname{bxghost} +\def\bxqgg@warn{\PackageWarningNoLine\bxqgg@pkgname} + +%--------------------------------------- general + +%% \bxqgg@engine : engine type +\def\bxqgg@next#1#2{% + \edef\bxqgg@tmpa{\string#1}\edef\bxqgg@tmpb{\meaning#1}% + \ifx\bxqgg@tmpa\bxqgg@tmpb #2\fi} +\chardef\bxqgg@engine=0 % other TeX +\bxqgg@next\kanjiskip {\chardef\bxqgg@engine=1 }% (u)pTeX (or ApTeX) +\bxqgg@next\luatexversion{\chardef\bxqgg@engine=2 }% LuaTeX +\bxqgg@next\XeTeXversion {\chardef\bxqgg@engine=3 }% XeTeX + +%--------------------------------------- not supported engine + +\ifnum\bxqgg@engine=\z@ + \bxqgg@warn{This engine is not supported, sorry} + \expandafter\endinput +\fi + +%--------------------------------------- eghostguarded + +% use an arbitrary font available in T1 encoding +\font\bxqgg@TI=ec-lmr10 at 1.23456pt +\chardef\bxqgg@cwm=23 % compwordmark (in T1) + +% allow xkanjiskip around +% Note: for XeTeX, xeCJK will handle nicely. We have nothing to do :) +\ifcase\bxqgg@engine +\or % pTeX + \xspcode\bxqgg@cwm=3\relax +\or % LuaTeX + \ltjsetparameter{alxspmode={\bxqgg@cwm,3}} +\fi + +%%<*> \eghostguarded{} +\newcommand*\eghostguarded{% + \ifmmode \expandafter\@firstofone + \else \expandafter\bxqgg@eghostguarded@a + \fi +} +\def\bxqgg@eghostguarded@a#1{% + {\bxqgg@TI\bxqgg@cwm}% + #1% + {\bxqgg@TI\bxqgg@cwm}% +} + +%--------------------------------------- jghostguarded + +%% \bxqgg@fwsp: a zenkaku space (U+3000) +\begingroup + \ifnum\bxqgg@engine=\@ne % pTeX + \kansujichar\@ne=\jis"2121\relax + \xdef\bxqgg@fwsp{\kansuji\@ne} + \else % others + \lccode`\Z="3000\relax + \lowercase{\xdef\bxqgg@fwsp{Z}} + \fi +\endgroup + +%% \bxqgg@kern@m@ne@zw: a negative zenkaku width kern +\ifnum\bxqgg@engine=\@ne + % pTeX knows the unit `zw' + \def\bxqgg@kern@m@ne@zw{\kern-1zw\relax} +\else + % for other engines, we use \zw instead + \def\bxqgg@kern@m@ne@zw{\kern-1\zw\relax} +\fi + +%%<*> \jghostguarded{} +\newcommand*\jghostguarded{% + \ifmmode \expandafter\@firstofone + \else \expandafter\bxqgg@jghostguarded@a + \fi +} +\edef\bxqgg@jghostguarded@a#1{% + \bxqgg@fwsp\bxqgg@kern@m@ne@zw + #1% + \bxqgg@kern@m@ne@zw\bxqgg@fwsp +} + +%--------------------------------------- all done +\endinput +%% EOF diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index e8d7254309c..31a35dd6727 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -133,7 +133,7 @@ my @TLP_working = qw( brandeis-dissertation brandeis-problemset breakcites breakurl bredzenie breqn bropd brushscr bullcntr bundledoc burmese businesscard-qrcode bussproofs bussproofs-extra - bxbase bxcalc bxcjkjatype bxdpx-beamer bxdvidriver + bxbase bxcalc bxcjkjatype bxdpx-beamer bxdvidriver bxghost bxjaholiday bxjaprnind bxpapersize bxpdfver bxeepic bxenclose bxjalipsum bxjscls bxnewfont bxorigcapt bxtexlogo bxwareki bytefield c90 c-pascal cabin cachepic caladea calcage calctab calculation calculator diff --git a/Master/tlpkg/tlpsrc/bxghost.tlpsrc b/Master/tlpkg/tlpsrc/bxghost.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc index 0b2fb192fdd..1d6b389ee38 100644 --- a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc @@ -8,6 +8,7 @@ depend ascmac depend babel-japanese depend bxbase depend bxcjkjatype +depend bxghost depend bxjaholiday depend bxjalipsum depend bxjaprnind -- cgit v1.2.3