diff options
author | Karl Berry <karl@freefriends.org> | 2016-11-06 22:18:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-11-06 22:18:06 +0000 |
commit | ce76f6bbc047961361f6912c65156bc89a08e4b2 (patch) | |
tree | 92519370b5850aed821a56678fc80dd26378fa5f /Master/texmf-dist | |
parent | c4687e0b7130f9b9bcf46645596fb9ecbb301ce5 (diff) |
bxjalipsum (6nov16)
git-svn-id: svn://tug.org/texlive/trunk@42446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/bxjalipsum/LICENSE | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxjalipsum/README.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjalipsum/bxjalipsum.sty | 136 |
3 files changed, 116 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/bxjalipsum/LICENSE b/Master/texmf-dist/doc/latex/bxjalipsum/LICENSE index 49f803e083e..9e7e5a082c2 100644 --- a/Master/texmf-dist/doc/latex/bxjalipsum/LICENSE +++ b/Master/texmf-dist/doc/latex/bxjalipsum/LICENSE @@ -1,9 +1,3 @@ -$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") diff --git a/Master/texmf-dist/doc/latex/bxjalipsum/README.md b/Master/texmf-dist/doc/latex/bxjalipsum/README.md index d6af25ae9bf..cd7560bd906 100644 --- a/Master/texmf-dist/doc/latex/bxjalipsum/README.md +++ b/Master/texmf-dist/doc/latex/bxjalipsum/README.md @@ -12,7 +12,7 @@ language, the package uses some real text in public domain. ### System requirement * TeX format: LaTeX. - * TeX engine: pTeX / upTeX / XeTeX / LuaTeX. + * TeX engine: pdfTeX / pTeX / upTeX / XeTeX / LuaTeX. * Dependent packages: - intcalc (when using non-e-TeX engines) @@ -56,6 +56,13 @@ No options are available. * `\jalipsumjugemu`: The shorthand for `\jalipsum{jugemu}`. * `\jalipsumjugemuP`: The shorthand for `\jalipsum{jugemuP}`. +### Notices on use with pdfTeX + + * In using with pdfTeX, Japanese (non-ASCII) characters are represented + as UTF-8 byte sequences. Thus there must be some mechanism (such as + the CJKutf8 package) that will decode such sequences and display the + Japanese characters properly. + ### Notices for the TeX-programmers * All the commands are fully expandable. @@ -70,6 +77,8 @@ No options are available. Revision History ---------------- + * Version 0.3 〈2016/11/06〉 + - Added the support for pdfTeX. * Version 0.2 〈2016/08/15〉 - The first public version. diff --git a/Master/texmf-dist/tex/latex/bxjalipsum/bxjalipsum.sty b/Master/texmf-dist/tex/latex/bxjalipsum/bxjalipsum.sty index 988a63fffb7..658ce7899cc 100644 --- a/Master/texmf-dist/tex/latex/bxjalipsum/bxjalipsum.sty +++ b/Master/texmf-dist/tex/latex/bxjalipsum/bxjalipsum.sty @@ -1,8 +1,16 @@ -% bxjalipsum.sty +%% +%% This is file 'bxjalipsum.sty'. +%% +%% Copyright (c) 2016 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{bxjalipsum}[2016/08/15 v0.2] +\ProvidesPackage{bxjalipsum}[2016/11/06 v0.3] \def\bxjl@pkgname{bxjalipsum} %% preparation @@ -11,6 +19,34 @@ \newif\ifbxjl@CJKtilde \providecommand\bxDebug[1]{} +%% code guards +\edef\bxjl@restore@codes{% + \catcode33=\the\catcode33% + \catcode34=\the\catcode34% + \catcode43=\the\catcode43% + \catcode45=\the\catcode45% + \catcode46=\the\catcode46% + \catcode47=\the\catcode47% + \catcode58=\the\catcode58% + \catcode60=\the\catcode60% + \catcode62=\the\catcode62% + \catcode96=\the\catcode96% + \catcode126=\the\catcode126% +\relax} +\catcode33=12 % <!> +\catcode34=12 % <"> +\catcode43=12 % <+> +\catcode45=12 % <-> +\catcode46=12 % <.> +\catcode47=12 % </> +\catcode58=12 % <:> +\catcode60=12 % <<> +\catcode62=12 % <>> +\catcode96=12 % <`> +\catcode126=13 % <~> +\AtEndOfPackage{% + \bxjl@restore@codes \let\bxjl@restore@codes\relax} + %--------------------------------------- package options % 'noCJKtilde'/'CJKtilde' @@ -87,11 +123,6 @@ \ifx b\bxjl@engine\else \bxjl@CJKtildefalse \fi -\ifx b\bxjl@engine - \PackageError\bxjl@pkgname - {The pdfTeX engine is not (yet) supported}% - {Package loading is aborted.\MessageBreak\@ehc} -\expandafter\endinput\fi\relax %--------------------------------------- error message \ifbxjl@etex %---<*eTeX> @@ -360,11 +391,11 @@ %--------------------------------------- paipo decoder %% variables -\let\bxjl@g@chr\relax +\let\bxjl@chr\relax \let\bxjl@@cr\relax \let\bxjl@@iai\relax \let\bxjl@tbuf\relax -\let\bxjl@edef@res\relax +\let\bxjl@let@res\relax %% \bxjl@pdecode\CS{<p-code>} \chardef\bxjl@cst@x=10 @@ -372,10 +403,12 @@ \chardef\bxjl@cst@cxxviii=128 \chardef\bxjl@cst@clx=160 \bxjl@preamble\def\bxjl@pdecode#1#2{% - \def\bxjl@edef@res{\edef#1}% - \let\bxjl@@iai\relax\let\bxjl@@cr\relax - \let\bxjl@tbuf\@empty\edef\bxjl@next{#2}% - \expandafter\bxjl@pdecode@a\bxjl@next00% + \def\bxjl@let@res{\let#1}% + \begingroup + \bxjl@set@activechar + \let\bxjl@@iai\relax\let\bxjl@@cr\relax + \let\bxjl@tbuf\@empty\edef\bxjl@next{#2}% + \expandafter\bxjl@pdecode@a\bxjl@next00% } \bxjl@preamble\def\bxjl@pdecode@a#1#2{% \bxjl@cc"#1#2\relax @@ -413,13 +446,15 @@ \expandafter\bxjl@pdecode@jacod\bxjl@next } \bxjl@preamble\def\bxjl@pdecode@e{% - \def\bxjl@@cr{\noexpand\\}% - \def\bxjl@@iai{\noexpand~}% - \ifbxjl@CJKtilde\else - \let\bxjl@@iai\@empty - \fi - \bxjl@edef@res{\bxjl@tbuf}% - \let\bxjl@tbuf\@empty + \def\bxjl@@cr{\noexpand\\}% + \def\bxjl@@iai{\noexpand~}% + \ifbxjl@CJKtilde\else + \let\bxjl@@iai\@empty + \fi + \xdef\bxjl@g@tmpa{\bxjl@tbuf}% + \endgroup + \bxjl@let@res\bxjl@g@tmpa + \let\bxjl@g@tmpa\@empty } % \bxjl@preamble\def\bxjl@pdecode@add#1{% @@ -431,11 +466,11 @@ \else \bxjl@get@alchr\bxjl@cc 0% \fi - \bxjl@pdecode@add\bxjl@g@chr + \bxjl@pdecode@add\bxjl@chr } \bxjl@preamble\def\bxjl@pdecode@jachr{% \bxjl@get@jachr\bxjl@cc - \bxjl@pdecode@add\bxjl@g@chr + \bxjl@pdecode@add\bxjl@chr } % \ifx l\bxjl@engine @@ -457,24 +492,64 @@ \bxjl@pdecode@nxt } \else + \chardef\bxjl@UERDX="40 + \chardef\bxjl@UELDC="E0 + \chardef\bxjl@UELDB="C0 + \chardef\bxjl@UELDA="80 + \mathchardef\bxjl@UEMDB="7FF + \bxjl@preamble\def\bxjl@pdecode@jacod#1#2#3#4#5#6#7#8{% + \bxjl@cc="#5#6#7#8\relax + \bxjl@get@utfchr + \bxjl@pdecode@add\bxjl@chr + \bxjl@pdecode@nxt + } + \bxjl@preamble\def\bxjl@get@utfchr{% + \let\bxjl@chr\@empty + \ifnum\bxjl@cc>\bxjl@UEMDB % 3-byte + \bxjl@get@utfchr@a + \bxjl@get@utfchr@a + \advance\bxjl@cc\bxjl@UELDC + \uccode`\~\bxjl@cc \uppercase{\edef\bxjl@chr{~\bxjl@chr}}% + \else % 2-byte + \bxjl@get@utfchr@a + \advance\bxjl@cc\bxjl@UELDB + \uccode`\~\bxjl@cc \uppercase{\edef\bxjl@chr{~\bxjl@chr}}% + \fi + } + \bxjl@preamble\def\bxjl@get@utfchr@a{% + \@tempcnta\bxjl@cc + \divide\bxjl@cc\bxjl@UERDX + \@tempcntb-\bxjl@cc \multiply\@tempcntb\bxjl@UERDX + \advance\@tempcnta\@tempcntb \advance\@tempcnta\bxjl@UELDA + \uccode`\~\@tempcnta \uppercase{\edef\bxjl@chr{~\bxjl@chr}}% + } \fi\fi\fi %% \bxjl@get@alchr \bxjl@preamble\def\bxjl@get@alchr#1#2{% - \begingroup - \uccode`#2=#1\relax - \uppercase{\gdef\bxjl@g@chr{#2}}% - \endgroup + \uccode`#2=#1\relax + \uppercase{\def\bxjl@chr{#2}}% } %% \bxjl@get@jachr \bxjl@preamble\def\bxjl@get@jachr#1{% - \begingroup - \kansujichar\@ne=#1\relax - \xdef\bxjl@g@chr{\kansuji\@ne}% - \endgroup + \kansujichar\@ne=#1\relax + \edef\bxjl@chr{\kansuji\@ne}% } +%% \bxjl@set@activechar +\ifx b\bxjl@engine + \bxjl@preamble\def\bxjl@set@activechar{% + \@tempcnta\bxjl@cst@cxxviii + \@whilenum{\@tempcnta<\@cclvi}\do{% + \catcode\@tempcnta\active + \uccode`\~\@tempcnta \uppercase{\let~\relax}% freeze + \advance\@tempcnta\@ne}% + } +\else + \bxjl@preamble\def\bxjl@set@activechar{} +\fi + %% \bxjl@pc/<num> \def\do#1#2{\@namedef{bxjl@pc/\number"#1}{#2}} \do{A1}{81423002} @@ -560,6 +635,7 @@ \bxjl@pdecode#2{#3}% } + %=============================== %% text 'iroha' % The 'Iroha' poem |