diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/README | 232 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.pdf | bin | 0 -> 157803 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.tex | 76 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.pdf | bin | 0 -> 101778 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.tex | 48 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty | 569 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/bxcjkjatype.tlpsrc | 0 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc | 1 |
10 files changed, 954 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE b/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE new file mode 100644 index 00000000000..4acbc245013 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/LICENSE @@ -0,0 +1,27 @@ +$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) 2013 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/bxcjkjatype/README b/Master/texmf-dist/doc/latex/bxcjkjatype/README new file mode 100644 index 00000000000..82c4a3088dc --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/README @@ -0,0 +1,232 @@ +BXcjkjatype Package +=================== + +LaTeX: Support for Japanese typesetting with pdfLaTeX and CJK package + +This package provides working configuration of the CJK package suitable +for Japanese typesetting of moderate quality. Moreover, it facilirates +use of the CJK package for pLaTeX users, by providing commands that +are similar to those used by the pLaTeX kernel and some other packages +used with it. + +Note that while the CJK package supports many input encodings, this +package supports only UTF-8. + +### System requirement + + * TeX format: LaTeX. + * TeX engine: pdfTeX (DVI or PDF mode). + * DVI driver: Anything. + - Non-default font settings require dvipdfmx or pdfTeX. + * Dependent packages: + - CJK, CJKutf8, CJKspace, CJKpunct, etoolnoc; + - ipaex-type1 (when using default font mapping); + - zhmetrics (when using non-default font mapping). + +### Installation + + - `*.sty` → $TEXMF/tex/latex/BXcjkjatype + +The bxcjkjatype Package +----------------------- + +### Package Loading + + \usepackage[<option>,...]{bxcjkjatype} + +The available options are described hereafter. + +#### Options for auto-wrapping + +These options enable one to wrap the document body with a `CJK(*)` +environemnt automatically and safely. They are suitable when a document +contains much amount of CJK text, or some “moving arguemnts” hold +CJK text. + + * `whole`, `wholeCJK*`: Wraps the whole document body with a `CJK*` + environment (precisely speaking, with + `\begin{uCJK*}` ... `\end{uCJK*}` ). + * `wholeCJK`: Wraps the whole document body with a `CJK` environment + (precisely speaking, with + `\begin{uCJK}` ... `\end{uCJK}` ). + * `nowhole` (default): Negation of `wholeCJK*` or `wholeCJK`. + +#### Options for “auto-tilde” + +The option `autotilde` triggers automatic invocation of `\CJKtilde`, +which makes a tilde character (`~`) insert “shibuaki” (a thin space +between alphabetic and ideographic letters) rather than a no-break +space (standard). No-break spaces can still be inserted by the command +`\nbs`, and `\standardtilde` cancels the effect of `\CJKtilde`. (The +commands mentioned here belong to CJK package.) + + * `autotilde`: Makes `\CJKtilde` invoked at the beginning of every + `CJK(*)` environemnt. + * `noautotilde` (default): Negation of `autotilde`. + +#### Options for font-mapping + +One can use preset font mappings in the same way as in the [pxchfon +package]. Please refer to the manual of that package for detailed +explanation of this feature. + + * `oneweight`, `nooneweight`: The same as in pxchfon. + * One can use font preset options (such as `ms`) which are available + in pxchfon (except obsolete ones). + * `ipaex-type1`: Disables the font management of this package and + directly uses the families provided by the ipaex-type1 package, + namely `ipxm` and `ipxg`. In this setting the value of `\mcdefault` + is `ipxm` and the value of `\gtdefault` and `\mgdefault` is `ipxg`, + so that the higher level commands (such as `\sffamily` and + `\gtfamily`) can work correctly. + +[pxchfon package]: http://www.ctan.org/pkg/pxchfon + +#### Other options + + * `everypage`: Outputs the font mapping information on every page of + the resulted DVI document. Available only with `dvipdfmx` driver. + * `noeverypage` (default): Negation of `everypage`. + * driver options: + `pdftex`, `dvipdfmx`, `dvips` and `none` are available. The driver + setting is relevant only when using font mappings other than the + default one (ipaex-type1 fonts), so one need not care of drivers + in using default fonts. Moreover, non-default font mappings are + supported only by `pdftex` and `dvipdfmx`, and these two values are + auto-detected (`pdftex` is default in PDF mode and `dvipdfmx` in + DVI mode). Thus one will never need to specify the driver. + +### Usage + +#### Selecting CJK fonts + +The present package provides three “generic” CJK families in the same +way as pLaTeX plus the [japanese-otf package]: Mincho family +(`\mcfamily`), Gothic family (`\gtfamily`), and Maru-gothic family +(`\mgfamily`). In default setting, the font set from the ipaex-type1 +package are allocated; Mincho family uses IPA Mincho font, and Gothic +and Maru-gothic families use IPA Gothic font. This allocation can be +altered by users. + + * `\mcfamily`: Changes the CJK family to Mincho family. Equivalent + to `\CJKfamily{\mcdefault}`. + * `\gtfamily`: Changes the CJK family to Gothic family. Equivalent + to `\CJKfamily{\gtdefault}`. + * `\mgfamily`: Changes the CJK family to Maru-gothic family. + Equivalent to `\CJKfamily{\mgdefault}`. + +More advanced commands: + + * `\mcdefault`/`\gtdefault`/`\mgdefault`: The names of CJK families + corresponding to the three generic families. In the standard + allocation their values are `mc`/`gt`/`mg` respectively and the + allocation is used as default. + + * `\setCJKfamilydefault{<CJK-family>}`: Declares the default CJK + family. This default value is used when family names are missing + in some commands, such as `\CJKfamily{}` and `\begin{CJK}{UTF8}{}`. + The (redefined) `\normalfont` also switches the CJK family to the + family specified by this command. + + The default value of this default family is the “counterpart” of + the alphabetic font family which is in effect at the beginning of + the document body. (See the next subsection.) + +[japanese-otf package]: http://www.ctan.org/pkg/japanese-otf + +#### Synchronization of CJK and non-CJK families + +The CJK pakcage (and pTeX engine) manages separate “current families” +for CJK and alphabetic (non-CJK) families. While this treatment has its +merit, synchronization of the two “current families” is convenient in +many cases. Accordingly, tHe present package redefines some of the +LaTeX commands that switches current alphabetic font families so that +the CJK family will be switched to the counterpart of the current +alphabetic family, where the “counterpart” is defined as follows: + + * `\rmfamily` (Serif) → `\mcfamily` (Mincho) + * `\sffamily` (Sans-serif) → `\gtfamily` (Gothic) + * `\ttfamily` (Monospae) → `\gtfamily` (Gothic) + * The counterpart of the other families is `\mcfamily`. + +Redefined commands: + + * `\rmfamily`/`\sffamily`/`\ttfamily`: Changes the CJK family to + the counterpart of the alphabetic font family after the original + function. + * `\normalfont`: Changes the CJK family to the default CJK family + specified by `\setCJKfamilydefault` comamnd. + +There are shorthand forms of `CJK`/`CJK*` environemnts: + + * `\begin{uCJK*}...\end{uCJK*}`: Equivalent to: + + \begin{CJK*}{UTF8}{counterpart}...\end{CJK*} + + where `counterpart` means the counterpart of the current alphabetic + font family. + + Note that this is *not* equivalent to + + \begin{CJK*}{UTF8}{}...\end{CJK*} + + structure, which uses the default CJK family. + + * `\begin{uCJK}...\end{uCJK}`: Equivalent to: + + \begin{CJK}{UTF8}{counterpart}...\end{CJK} + +#### Font mapping + +The usage of these commands are the same as in the pxchfon package. +Please refer to the manual of that package for detail. + + * `\setminchofont[<id>]{<font-file>}` + * `\setgothicfont[<id>]{<font-file>}` + * `\setmarugothicfont[<id>]{<font-file>}` + * `\setlightminchofont[<id>]{<font-file>}` + * `\setmediumminchofont[<id>]{<font-file>}` + * `\setboldminchofont[<id>]{<font-file>}` + * `\setmediumgothicfont[<id>]{<font-file>}` + * `\setboldgothicfont[<id>]{<font-file>}` + * `\setxboldgothicfont[<id>]{<font-file>}` + +However there is a major limitation as to the use of font mapping with +the pdfTeX engine. One can use only TrueType fonts and moreover +TTC format is not allowed. (One can use any flavor of OpenType fonts +when using dvipdfmx.) + +#### Other commands + + * `\UTF{<hexadecimal-number>}`: Inputs a CJK character through Unicode + codepoint value. `\UTF{5B57}` is equivalent to `\Unicode{"5B}{"57}`. + * `\CJKecglue`: Insers a “shibuaki” space. This will be invoked by + `~` when `\CJKtilde` is in effect. This command can be redefined by + users to adjust the value of shibuaki space, just like `\CJKglue`. + For example: + + \renewcommand{\CJKecglue}{\hspace{0.125em minus 0.125em}} + +### Remarks + + * The standard font families provided by this package does *not* + support vertical writing, even when using default ipaex-type1 font + set. However, the families provided by ipaex-type1 (`ipxm` and + `ipxg`) do support vertical writing, and one can utilize these + families directly by specifying `ipaex-type1` option. + +Revision History +---------------- + + * Version 0.2b <2013/09/28> + - Added `\UTF`, `\CJKecglue`. + + * Version 0.2a <2013/08/08> + - Added `autotilde` option. + + * Version 0.2 <2013/08/08> + - The first public version. + +-------------------- +Takayuki YATO (aka. "ZR") +http://zrbabbler.sp.land.to/ diff --git a/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.pdf b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.pdf Binary files differnew file mode 100644 index 00000000000..cdc9b97afa6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.pdf diff --git a/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.tex b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.tex new file mode 100644 index 00000000000..79fec7f0353 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype-beamer.tex @@ -0,0 +1,76 @@ +% This file is encoded in UTF-8. +% To be typeset with pdflatex or latex + dvipdfmx. +\documentclass[12pt]{beamer} % for pdfTeX +%\documentclass[12pt,dvipdfmx]{beamer} % for dvipdfmx +\hypersetup{unicode}%← needed to make bookmark text right +\usepackage[whole]{bxcjkjatype}% needed 'whole' +%% That'all! You can do 日本語 right now! +\usetheme{Warsaw} +%--------------------------------------- +\title{How to do 日本語 with pdf{\TeX}} +\author{ZR 某} +\date{某日 of August, 2013} +%--------------------------------------- +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +%--------------------------------------- +\section{日本語 with bxcjkjatype package} + +\begin{frame}[fragile]{First} + Load the \alert{bxcjkjatype} package in preamble.\par + Use of \structure{\texttt{whole}} option is often suitable.\par + \begin{exampleblock}{とある Example} +\begin{verbatim} +\documentclass[a4paper]{article} +\usepackage[whole]{bxcjkjatype} +\end{verbatim} + \end{exampleblock} +\end{frame} + +\begin{frame}[fragile]{Second} + Write whatever 日本語 text you like in the document body.\par + You can use ひらがな, カタカナ, 漢字, and/or + any character available in the standard fonts + (\structure{IPAex明朝/ゴシック}).\par + \begin{exampleblock}{とある Example} +\begin{verbatim} +\documentclass[a4paper]{article} +\usepackage[whole]{bxcjkjatype} +\begin{document} +私のホバークラフトは鰻でいっぱいです。 +\end{document} +\end{verbatim} + \end{exampleblock} + \structure{※} Must use UTF-8.\par +\end{frame} + +\begin{frame}[fragile]{Third} + Compile the document as usual.\par + +\begin{verbatim} +pdflatex sample.tex +\end{verbatim} +\end{frame} + +\begin{frame}{Last}\relax + {\LARGE\alert{完成!}\par} + \begin{block}{とある Output} + \rmfamily + 私のホバークラフトは鰻でいっぱいです。 + \end{block} +\end{frame} + +%--------------------------------------- +\section{Conclusion (Not!)} + +\begin{frame}{おしまい} + \transdissolve[duration=0.5] + \centering\Large + \structure{Happy 日本語 {\TeX}ing!} +\end{frame} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.pdf b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.pdf Binary files differnew file mode 100644 index 00000000000..960978c5355 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.pdf diff --git a/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.tex b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.tex new file mode 100644 index 00000000000..1a9e117b2f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bxcjkjatype/sample-bxcjkjatype.tex @@ -0,0 +1,48 @@ +% This file is encoded in UTF-8. +% (bxcjkjatype supports only UTF-8.) +% To be typeset with pdflatex, latex + dvipdfmx, or latex + dvips +\documentclass[a4paper]{article} +% hyperref may require an explicit driver option +% (bxcjkjatype does not.) +%\documentclass[a4paper,dvipdfmx]{article} + +% The 'whole' option makes the whole document body wraped with an +% CJK* environment. +\usepackage[whole]{bxcjkjatype} + +% After loading the package, you can write 日本語 text, even in the +% preamble. You can define a macro which includes 日本語. +\newcommand\Nihongo{日本語} + +% You can make PDF files which holds correct CJK text as document +% information, such as boookmarks. +\usepackage[unicode,% ←needed to make bookmark text right + bookmarks=true,colorlinks=true]{hyperref} + +% Here I use Standard fonts (IPAex fonts) for Mincho and Gothic +% families. For Maru-gothic family, I use "Rounded M+ 1c Regular" +% (available at http://d.hatena.ne.jp/itouhiro/20120226). +\setmarugothicfont{rounded-mplus-1c-regular.ttf} + +\begin{document} +% (Now already in a CJK* environment.) + +% You can safely put a section heading containing 日本語! +\section{Preparing 文書 in \Nihongo\ using pdf\TeX} +The 文書 contains 日本語 and English. + +\section{Font selection} +\begin{itemize} +% \rmfamily designates Mincho family. +\item \rmfamily Mincho (明朝) family. + % If you have specified a bold Mincho font with + % \setboldminchofont, then you will see it working. + % \textbf{And bold (太字) version.} +% \sffamily designates Gothic family. +\item \sffamily Gothic (ゴシック) family. +% \mgfamily changes only CJK family, so alphabetic font family +% remains unchanged (i.e. \sffamily). +\item \mgfamily Maru-gothic (丸ゴシック) family. +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty b/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty new file mode 100644 index 00000000000..0f386f87f36 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bxcjkjatype/bxcjkjatype.sty @@ -0,0 +1,569 @@ +% +% bxcjkjatype.sty +% + +%% package declaration +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bxcjkjatype}[2013/09/28 v0.2b] +\def\bxjy@pkgname{bxcjkjatype} + +%% definitions +\def\bxjy@error{\PackageError\bxjy@pkgname} +\def\bxjy@warn{\PackageWarning\bxjy@pkgname} +\def\bxjy@info{\PackageInfo\bxjy@pkgname} + +%--------------------------------------- helpers + +%% variables +\newif\ifbxjy@ok + +%% unique tokens +\def\bxjy@mark{\bxjy@mark@} +\def\bxjy@end{\bxjy@end@} + +%% \bxjy@ifprimitive\CS{<true>}{<false>} +\@onlypreamble\bxjy@ifprimitive +\def\bxjy@ifprimitive#1{% + \edef\bxjy@tmpa{\string#1}% + \edef\bxjy@tmpb{\meaning#1}% + \ifx\bxjy@tmpa\bxjy@tmpb \expandafter\@firstoftwo + \else \expandafter\@secondoftwo \fi +} + +%--------------------------------------- environment check + +%% engine check +\bxjy@oktrue +\bxjy@ifprimitive\kanjiskip{\bxjy@okfalse}{} +\bxjy@ifprimitive\luatexversion{\bxjy@okfalse}{} +\bxjy@ifprimitive\XeTeXversion{\bxjy@okfalse}{} +\bxjy@ifprimitive\eTeXversion{}{\bxjy@okfalse} +\ifbxjy@ok\else + \bxjy@error{The engine in use is not supported}% + {Only pdfTeX engine is supported.\MessageBreak + Package loading is aborted.} +\expandafter\endinput\fi\relax + +%--------------------------------------- option handling + +%% Declares options +\let\bxjy@driver\@undefined +\let\bxjy@none=n +\let\bxjy@pdftex=p +\let\bxjy@dvipdfmx=d +\DeclareOption{none}{\let\bxjy@driver\bxjy@none} +\DeclareOption{dvips}{\let\bxjy@driver\bxjy@none} +\DeclareOption{pdftex}{\let\bxjy@driver\bxjy@pdftex} +\DeclareOption{dvipdfmx}{\let\bxjy@driver\bxjy@dvipdfmx} +\let\bxjy@whole=f +\DeclareOption{whole}{\let\bxjy@whole=t} +\DeclareOption{wholeCJK*}{\let\bxjy@whole=t} +\DeclareOption{wholeCJK}{\let\bxjy@whole=p} +\DeclareOption{nowhole}{\let\bxjy@whole=f} +\newif\ifbxjy@everypage +\DeclareOption{everypage}{\bxjy@everypagetrue} +\DeclareOption{noeverypage}{\bxjy@everypagefalse} +\let\bxjy@oneweight=f +\DeclareOption{ipaex-type1}{\let\bxjy@oneweight=i} +\DeclareOption{oneweight}{\let\bxjy@oneweight=t} +\DeclareOption{nooneweight}{\let\bxjy@oneweight=f} +\newif\ifbxjy@autotilde +\DeclareOption{autotilde}{\bxjy@autotildetrue} +\DeclareOption{noautotilde}{\bxjy@autotildefalse} +\newif\ifbxjy@CJKpunct \bxjy@CJKpuncttrue +\DeclareOption{CJKpunct}{\bxjy@CJKpuncttrue} +\DeclareOption{noCJKpunct}{\bxjy@CJKpunctfalse} +\newif\ifbxjy@CJKspace \bxjy@CJKspacetrue +\DeclareOption{CJKspace}{\bxjy@CJKspacetrue} +\DeclareOption{noCJKspace}{\bxjy@CJKspacefalse} +% preset spec options +\def\bxjy@all@main@preset{% + %(uniweight) + ms,ipa,ipaex,% + %(multiweight) + ms-hg,ipa-hg,moga-mobo,moga-maruberi,% + kozuka-pro,kozuka-pr6,kozuka-pr6n,% + hiragino-pro,hiragino-pron,morisawa-pro,morisawa-pr6n} +\let\bxjy@main@preset\relax +\def\bxjy@do#1{\DeclareOption{#1}{\def\bxjy@main@preset{#1}}} +\@for\bxjy@x:=\bxjy@all@main@preset\do{% + \expandafter\bxjy@do\expandafter{\bxjy@x}} +%% Dispatch options +\ProcessOptions* + +%--------------------------------------- configuration check + +%% Check the driver specified +\def\bxjy@tmpa#1#2{% + \bxjy@info{Driver auto-detected: #2}% + \let\bxjy@driver#1} +\def\bxjy@tmpb#1#2{% + \bxjy@error{Wrong driver specified, changed to: #2}\@ehc% + \let\bxjy@driver#1} +\ifnum\ifdefined\pdfoutput\pdfoutput\else\z@\fi>\z@ + \unless\ifdefined\bxjy@driver + \bxjy@tmpa\bxjy@pdftex{pdftex}% + \else\unless\ifx\bxjy@driver\bxjy@pdftex + \bxjy@tmpb\bxjy@pdftex{pdftex}% + \fi\fi +\else + \unless\ifdefined\bxjy@driver + \bxjy@tmpa\bxjy@dvipdfmx{dvipdfmx}% + \else\ifx\bxjy@driver\bxjy@pdftex + \bxjy@tmpb\bxjy@dvipdfmx{dvipdfmx}% + \fi\fi +\fi + +%% Consistency check +\ifx i\bxjy@oneweight \unless\ifx\bxjy@main@preset\relax + \bxjy@error{Preset options cannot go with 'ipaex-type1'}\@ehc + \let\bxjy@main@preset\relax +\fi\fi +\ifx \bxjy@driver\bxjy@none \unless\ifx\bxjy@main@preset\relax + \bxjy@error{Preset options require a valid driver}\@ehc + \let\bxjy@main@preset\relax +\fi\fi + +%--------------------------------------- preparations + +%% Load CJK package and friends +\RequirePackage{CJK} +\@namedef{opt@CJK.sty}{encapsulated} +\let\CJK@global\relax +\let\CJK@active\relax +\let\CJK@local\relax +\RequirePackage{CJKutf8} +\ifbxjy@CJKspace +\RequirePackage{CJKspace} +\fi +\ifbxjy@CJKpunct +\RequirePackage{CJKpunct} +\fi + +%% Load other packages +\RequirePackage{etoolbox} +\ifbxjy@everypage\ifx\bxjy@driver\bxjy@dvipdfmx + \RequirePackage{atbegshi} +\fi\fi +%% + +%%<+> \FirstCJKUse +%%<+> \EveryCJKUse +\appto\CJKhook{% + \bxjy@first@cjk@use@hook + \bxjy@every@cjk@use@hook} +\def\bxjy@first@cjk@use@hook{% + \global\let\bxjy@first@cjk@use@hook\relax} +\let\bxjy@every@cjk@use@hook\@empty +\newcommand*\FirstCJKUse{% + \gappto\bxjy@first@cjk@use@hook} +\newcommand*\EveryCJKUse{% + \gappto\bxjy@every@cjk@use@hook} + +%--------------------------------------- user interface + +%%%%<*> \setminchofont/\setgothicfont/etc. +\newcommand*\setminchofont{\bxjy@setfont{mnl,mnr,mnb}} +\newcommand*\setgothicfont{\bxjy@setfont{gtr,gtb,gtx,gtu}} +\newcommand*\setlightminchofont{\bxjy@setfont{mnl}} +\newcommand*\setmediumminchofont{\bxjy@setfont{mnr}} +\newcommand*\setboldminchofont{\bxjy@setfont{mnb}} +\newcommand*\setmediumgothicfont{\bxjy@setfont{gtr}} +\newcommand*\setboldgothicfont{\bxjy@setfont{gtb}} +\newcommand*\setxboldgothicfont{\bxjy@setfont{gtx}} +\newcommand*\setoneweightgothicfont{\bxjy@setfont{gtu}} +\newcommand*\setmarugothicfont{\bxjy@setfont{mgr}} +\def\bxjy@setfont#1{\@ifnextchar[%] + {\bxjy@setfont@a{#1}}{\bxjy@setfont@a{#1}[]}} +\def\bxjy@setfont@a#1[#2]#3{% + \ifx\bxjy@driver\bxjy@none + \bxjy@error{The command is invalid in dvips mode}\@eha + \else + \@for\bxjy@x:={#1}\do{% + \ifx @#2@\@namedef{bxjy@FS/\bxjy@x}{#3}% + \else\ifx\bxjy@driver\bxjy@dvipdfmx + \@namedef{bxjy@FS/\bxjy@x}{:#2:#3}% + \else % ttc is unavailable in pdfTeX + \bxjy@error{pdfTeX does not support TTC}\@eha + \fi\fi}% + \fi} +\@for\bxjy@x:={% + mnr,mnb,gtr,gtb,gtx,gtu,mgr% +}\do{\@namedef{bxjy@FS/\bxjy@x}{}} + +%%<*> \begin{uCJK} +\@ifdefinable{\uCJK}{% + \def\uCJK{% + \bxjy@set@genfam + \CJK{UTF8}{\bxjy@genfam}} + \let\enduCJK\endCJK +} +%%<*> \begin{uCJK*} +\@ifdefinable{\uCJK*}{% + \csdef{uCJK*}{% + \bxjy@set@genfam + \CJK{UTF8}{\bxjy@genfam}} + \cslet{enduCJK*}\endCJK +} + +%%<*> \setCJKfamilydefault{<fam>} +\newbool{bxjy@default@set} +\newrobustcmd*\setCJKfamilydefault[1]{% + \bxjy@default@settrue + \CJKencfamily{UTF8}{#1}} +\AtEndOfPackage{% + \bxjy@default@setfalse} + +%% \bxjy@set@genfam +\def\bxjy@set@genfam{% + \bxjy@okfalse + \edef\bxjy@tmpa{\f@family}% + \edef\bxjy@tmpb{\sfdefault}% + \ifx\bxjy@tmpa\bxjy@tmpb \bxjy@oktrue \fi + \edef\bxjy@tmpb{\ttdefault}% + \ifx\bxjy@tmpa\bxjy@tmpb \bxjy@oktrue \fi + \edef\bxjy@genfam{\ifbxjy@ok \gtdefault \else \mcdefault \fi}} + +%% autotilde +\EveryCJKUse{% + \ifbxjy@autotilde \CJKtilde \fi} + +%%<*> \UTF{<hex-number>} +\newcommand*\UTF[1]{% + \edef\bxjy@tmpa{#1}% + \expandafter\bxjy@utf@a\bxjy@tmpa\bxjy@mark000000\bxjy@end} +\def\bxjy@utf@a#1#2#3#4#5#6#7#8\bxjy@end{% + \bxjy@utf@b#1#2#3#4#5#6#7\bxjy@end} +\def\bxjy@utf@b#1\bxjy@mark#2\bxjy@end{% + \uppercase{\bxjy@utf@c#2#1}\bxjy@end} +\def\bxjy@utf@c#1#2#3#4#5#6\bxjy@end{% + \Unicode{"#1#2#3#4}{"#5#6}} + +%%<*> \CJKecglue +\unless\ifdefined\CJKecglue + \def\CJKtilde{% + \CJK@global\def~{\CJKecglue\ignorespaces}} + \def\CJKecglue{\hspace{0.25em plus 0.125em minus 0.08em}} +\fi + +%%<*> \> +\def\bxjy@tmpa{\mskip\medmuskip} +\ifx\>\bxjy@tmpa + \def\>{\ifmmode\mskip\medmuskip\else \CJKecglue\ignorespaces \fi} +\fi + +%--------------------------------------- fontmap internals + +%% \bxjy@noembed +\def\bxjy@noembed{*} + +%% \bxjy@cmap@embed/\bxjy@cmap@noembed +\def\bxjy@cmap@embed{unicode} +\def\bxjy@cmap@noembed{UniJIS2004-UTF16-H} + +%% \bxjy@NEF/<sym> +\def\bxjy@do#1#2{% + \def\bxjy@tmpb{#2}% + \@for\bxjy@tmpa:=#1\do{% + \cslet{bxjy@NEF/\bxjy@tmpa}\bxjy@tmpb}} +\bxjy@do{mnr,mnb}{Ryumin-Light} +\bxjy@do{gtr,gtb,gtx,gtu,mgr}{GothicBBB-Medium} + +%% \bxjy@addtospec{<id>} +\@onlypreamble\bxjy@addtospec +\def\bxjy@addtospec#1{% + \begingroup + \let\Entry\bxjy@Entry\let\ \space + \@nameuse{bxjy@ME/#1}% + \endgroup} +\@onlypreamble\bxjy@Entry +\def\bxjy@Entry#1{% + \letcs\FONT{bxjy@FS/#1}% + \ifx\FONT\bxjy@noembed + \let\unicode\bxjy@cmap@noembed + \edef\FONT{!\@nameuse{bxjy@NEF/#1}}% + \else\unless\ifx\FONT\@empty + \let\unicode\bxjy@cmap@embed + \fi\fi + \ifx\FONT\@empty \expandafter\@gobble + \else \expandafter\bxjy@entry@sub \fi} +\ifx\bxjy@driver\bxjy@dvipdfmx + \def\bxjy@entry@sub#1{%<tfm-spec> + \xappto\bxjy@spec{% + \noexpand\special{pdf:mapline #1 \unicode\ \FONT}}} + \let\bxjy@spec\@empty +\else\ifx\bxjy@driver\bxjy@pdftex + \def\bxjy@entry@sub#1{%<tfm-spec> + \pdfmapline{=#1 <\FONT}} +\else % invalid in dvips +\fi\fi + +%--------------------------------------- map entry definitions + +%% \bxjy@mapentry{<id>}{<text>} +\def\bxjy@mapentry#1{% + \expandafter\bxjy@mapentry@a\csname bxjy@ME/#1\endcsname} +\def\bxjy@mapentry@a#1{\@onlypreamble#1\def#1} + +%% the map entries +\bxjy@mapentry{STDU}{% (uniweight) +\Entry{mnr}{unisong@Unicode@}% +\Entry{gtu}{unihei@Unicode@}% +\Entry{mgr}{unikai@Unicode@}% +} +\bxjy@mapentry{STDM}{% (nouniweight) +\Entry{mnr}{unisong@Unicode@}% +\Entry{mnb}{unili@Unicode@}% +\Entry{gtr}{unihei@Unicode@}% +\Entry{gtb}{uniyou@Unicode@}% +\Entry{gtx}{unifs@Unicode@}% +\Entry{mgr}{unikai@Unicode@}% +} + +%--------------------------------------- NFSS declarations + +%%<*> \mcdefault/\gtdefault/\mgdefault +\providecommand{\mcdefault}{mc} +\providecommand{\gtdefault}{gt} +\providecommand{\mgdefault}{mg} + +%%<*> \mcfamily/\gtfamily/\mgfamily +\newrobustcmd*{\mcfamily}{% + \not@math@alphabet\mcfamily\relax + \CJKfamily{\mcdefault}} +\newrobustcmd*{\gtfamily}{% + \not@math@alphabet\mcfamily\relax + \CJKfamily{\gtdefault}} +\newrobustcmd*{\mgfamily}{% + \not@math@alphabet\mcfamily\relax + \CJKfamily{\mgdefault}} + +%% Add patches to \rmfamily, etc. +\csappto{rmfamily }{% + \CJKfamily{\mcdefault}} +\csappto{sffamily }{% + \CJKfamily{\gtdefault}} +\csappto{ttfamily }{% + \CJKfamily{\gtdefault}} +\csappto{normalfont }{% + \CJKfamily{}} + +%%<*> \ebseries +\ifx f\bxjy@oneweight + \providerobustcmd*{\ebseries}{% + \not@math@alphabet\ebseries\relax + \fontseries\ebdefault\selectfont} + \providecommand{\ebdefault}{eb} +\fi +\let\bxjy@CJKnormal\CJKnormal +\protected\def\CJKnormal{\bxjy@CJKnormal} + +%% \bxjy@decl@series +\@onlypreamble\bxjy@decl@series +\def\bxjy@decl@series#1#2#3{% +\DeclareFontShape{C70}{#1}{#2}{n}{<->#3}{\CJKnormal}% +\DeclareFontShape{C70}{#1}{#2}{sl}{<->CJKssub*#1/#2/n}{\CJKnormal}% +\DeclareFontShape{C70}{#1}{#2}{it}{<->CJKssub*#1/#2/n}{\CJKnormal}% +\DeclareFontShape{C70}{#1}{#2}{sc}{<->CJKssub*#1/#2/n}{\CJKnormal}} +%% \bxjy@decl@family +\@onlypreamble\bxjy@decl@family +\def\bxjy@decl@family#1#2#3#4{% +\DeclareFontFamily{C70}{#1}{\hyphenchar\font\m@ne}% +\bxjy@decl@series{#1}{m}{#2}% +\bxjy@decl@series{#1}{bx}{#3}% +\bxjy@decl@series{#1}{b}{CJKssub*#1/bx/n}% +\bxjy@decl@series{#1}{eb}{#4}} + +%% the declarations +\ifx f\bxjy@oneweight +\bxjy@decl@family{mc}{CJK*unisong}{CJK*unili}{CJKssub*mc/bx/n} +\bxjy@decl@family{gt}{CJK*unihei}{CJK*uniyou}{CJK*unifs} +\bxjy@decl@family{mg}{CJK*unikai}{CJKssub*mg/m/n}{CJKssub*mg/m/n} +\else\ifx t\bxjy@oneweight +\bxjy@decl@family{mc}{CJK*unisong}{CJKssub*gt/m/n}{CJKssub*gt/m/n} +\bxjy@decl@family{gt}{CJK*unihei}{CJKssub*gt/m/n}{CJKssub*gt/m/n} +\bxjy@decl@family{mg}{CJK*unikai}{CJKssub*mg/m/n}{CJKssub*mg/m/n} +\else\ifx i\bxjy@oneweight +\renewcommand{\mcdefault}{ipxm} +\renewcommand{\gtdefault}{ipxg} +\renewcommand{\mgdefault}{ipxg} +\fi\fi\fi + +%% Set default CJK family +\setCJKfamilydefault{\mcdefault} + +%% \bxjy@check@alldefined +\@onlypreamble\bxjy@check@alldefined +\def\bxjy@check@alldefined#1{% + \bxjy@oktrue + \@for\bxjy@x:={#1}\do{% + \expandafter\ifx\csname bxjy@FS/\bxjy@x\endcsname\@empty + \bxjy@okfalse \fi}} +%% When no font is selected for a family by \set...font, then thm +% must be switched to that of ipxex-type1. +\FirstCJKUse{% +\bxjy@check@alldefined{mnr,mnb}% +\unless\ifbxjy@ok +\bxjy@decl@family{mc}{CJK*ipxm-r-u}{CJKssub*gt/m/n}{CJKssub*gt/m/n} +\fi +\bxjy@check@alldefined{gtr,gtb,gtx}% +\unless\ifbxjy@ok +\bxjy@decl@family{gt}{CJK*ipxg-r-u}{CJKssub*gt/m/n}{CJKssub*gt/m/n} +\fi +\bxjy@check@alldefined{mgr}% +\unless\ifbxjy@ok +\bxjy@decl@family{mg}{CJK*ipxg-r-u}{CJKssub*gt/m/n}{CJKssub*gt/m/n} +\fi +} + +%--------------------------------------- begin-document hook + +\ifx\bxjy@driver\bxjy@dvipdfmx %<*dvipdfmx> + +%% \bxjy@set@page@hook{<text>} +\ifbxjy@everypage +\def\bxjy@set@page@hook#1{% + \AtBeginShipout{\setbox\AtBeginShipoutBox=\vbox{% + \baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@ + #1\copy\AtBeginShipoutBox}}} +\else +\let\bxjy@set@page@hook\AtBeginDvi +\fi + +\else %<!*dvipdfmx> +\let\bxjy@set@page@hook\@gobble +\fi %</dvipdfmx> + +%% The begin-document hook for font mapping +\AtBeginDocument{% + \ifx f\bxjy@oneweight \bxjy@addtospec{STDM}% + \else\ifx t\bxjy@oneweight \bxjy@addtospec{STDU}% + \fi\fi + \bxjy@set@page@hook{\bxjy@spec}% +} + +%% The document hooks for 'whole' option +\AtBeginDocument{% + \unless\ifbxjy@default@set + \bxjy@set@genfam + \setCJKfamilydefault{\bxjy@genfam}% + \fi} +\ifx t\bxjy@whole + \AtBeginDocument{\csuse{CJK*}{UTF8}{}} + \AtEndDocument{\clearpage\csuse{endCJK*}} +\else\ifx p\bxjy@whole + \AtBeginDocument{\CJK{UTF8}{}} + \AtEndDocument{\clearpage\CJK} +\fi\fi + +%% Invokes first-CJK hook at begin-document +\AtBeginDocument{\bxjy@first@cjk@use@hook} + +%--------------------------------------- preset font mappings + +%% \bxjy@declare@preset{<name>}{<text>} +\def\bxjy@declare@preset#1{% + \expandafter\bxjy@decl@preset@a\csname bxjy@the@preset@#1\endcsname} +\def\bxjy@decl@preset@a#1{\@onlypreamble#1\def#1} + +%% \bxjy@declare@preset@alias{<name1>}{<name2>} +\def\bxjy@declare@preset@alias#1#2{% + \expandafter\bxjy@decl@preset@alias@a\csname bxjy@the@preset@#1% + \expandafter\endcsname\csname bxjy@the@preset@#2\endcsname} +\def\bxjy@decl@preset@alias@a#1#2{\@onlypreamble#1\let#1#2} + +%% \bxjy@uniweight{<font-mn>}{<font-gt>} +\@onlypreamble\bxjy@uniweight +\def\bxjy@uniweight#1#2{% + \setminchofont{#1}\setgothicfont{#2}\setmarugothicfont{#2}} + +%% \bxjy@multiweight{<font-mnl>}{<font-mnr>}{<font-mnb>} +%% {<font-gtr>}{<font-gtb>}{<font-gtx>}{<font-gtu>}{<font-mgr>} +\@onlypreamble\bxjy@multiweight +\def\bxjy@multiweight#1#2#3#4#5#6#7#8{% + \setminchofont{#2}\setgothicfont{#7}\setmarugothicfont{#8}% + \ifx f\bxjy@oneweight + \setboldminchofont{#3}% #1 ignored + \setmediumgothicfont{#4}\setboldgothicfont{#5}\setxboldgothicfont{#6}% + \fi} + +%% \bxjy@use@preset{<name>} +\def\bxjy@use@preset#1{% + \csname bxjy@the@preset@#1\endcsname} + +%% for compatibility +\def\bxjy@MI{:0:} +\let\bxjy@enable@switch@realfont\relax +\let\usecmapforalphabet\relax + +%%%% definitions of main preset mappings +%(uniweight) +\bxjy@declare@preset{ms}{% + \bxjy@uniweight{:0:msmincho.ttc}{:0:msgothic.ttc}} +\bxjy@declare@preset{ipa}{% + \bxjy@uniweight{ipam.ttf}{ipag.ttf}} +\bxjy@declare@preset{ipaex}{% + \bxjy@uniweight{ipaexm.ttf}{ipaexg.ttf}} +%(multiweight) +\bxjy@declare@preset{ms-hg}{% + \bxjy@multiweight{:0:msmincho.ttc}{:0:msmincho.ttc}{:0:hgrme.ttc}% + {:0:hgrgm.ttc}{:0:hgrge.ttc}{:0:hgrsgu.ttc}{:0:msgothic.ttc}{hgrsmp.ttf}} +\bxjy@declare@preset{ipa-hg}{% + \bxjy@multiweight{ipam.ttf}{ipam.ttf}{:0:hgrme.ttc}% + {:0:hgrgm.ttc}{:0:hgrge.ttc}{:0:hgrsgu.ttc}{ipag.ttf}{hgrsmp.ttf}} +\bxjy@declare@preset{moga-mobo}{% + \bxjy@enable@switch@realfont + \bxjy@multiweight{\bxjy@MI mogam.ttc}{\bxjy@MI mogam.ttc}% + {\bxjy@MI mogamb.ttc}{\bxjy@MI mogag.ttc}{\bxjy@MI mogagb.ttc}% + {\bxjy@MI mogagb.ttc}{\bxjy@MI mogag.ttc}{\bxjy@MI mobog.ttc}} +\bxjy@declare@preset{moga-maruberi}{% + \bxjy@enable@switch@realfont + \bxjy@multiweight{\bxjy@MI mogam.ttc}{\bxjy@MI mogam.ttc}% + {\bxjy@MI mogamb.ttc}{\bxjy@MI mogag.ttc}{\bxjy@MI mogagb.ttc}% + {\bxjy@MI mogagb.ttc}{\bxjy@MI mogag.ttc}{MTLmr3m.ttf}} +\bxjy@declare@preset{kozuka-pro}{% + \usecmapforalphabet + \bxjy@multiweight{KozMinPro-Light.otf}{KozMinPro-Regular.otf}% + {KozMinPro-Bold.otf}{KozGoPro-Regular.otf}{KozGoPro-Bold.otf}% + {KozGoPro-Heavy.otf}{KozGoPro-Medium.otf}{KozGoPro-Heavy.otf}} +\bxjy@declare@preset{kozuka-pr6}{% + \usecmapforalphabet + \bxjy@multiweight{KozMinProVI-Light.otf}{KozMinProVI-Regular.otf}% + {KozMinProVI-Bold.otf}{KozGoProVI-Regular.otf}{KozGoProVI-Bold.otf}% + {KozGoProVI-Heavy.otf}{KozGoProVI-Medium.otf}{KozGoProVI-Heavy.otf}} +\bxjy@declare@preset{kozuka-pr6n}{% + \usecmapforalphabet + \bxjy@multiweight{KozMinPr6N-Light.otf}{KozMinPr6N-Regular.otf}% + {KozMinPr6N-Bold.otf}{KozGoPr6N-Regular.otf}{KozGoPr6N-Bold.otf}% + {KozGoPr6N-Heavy.otf}{KozGoPr6N-Medium.otf}{KozGoPr6N-Heavy.otf}} +\bxjy@declare@preset{hiragino-pro}{% + \usecmapforalphabet + \bxjy@multiweight{HiraMinPro-W2.otf}{HiraMinPro-W3.otf}% + {HiraMinPro-W6.otf}{HiraKakuPro-W3.otf}{HiraKakuPro-W6.otf}% + {HiraKakuStd-W8.otf}{HiraKakuPro-W6.otf}{HiraMaruPro-W4.otf}} +\bxjy@declare@preset{hiragino-pron}{% + \usecmapforalphabet + \bxjy@multiweight{HiraMinProN-W2.otf}{HiraMinProN-W3.otf}% + {HiraMinProN-W6.otf}{HiraKakuProN-W3.otf}{HiraKakuProN-W6.otf}% + {HiraKakuStdN-W8.otf}{HiraKakuProN-W6.otf}{HiraMaruProN-W4.otf}} +\bxjy@declare@preset{morisawa-pro}{% + \usecmapforalphabet + \bxjy@multiweight{A-OTF-RyuminPro-Light.otf}{A-OTF-RyuminPro-Light.otf}% + {A-OTF-FutoMinA101Pro-Bold.otf}{A-OTF-GothicBBBPro-Medium.otf}% + {A-OTF-FutoGoB101Pro-Bold}{A-OTF-MidashiGoPro-MB31.otf}% + {A-OTF-GothicBBBPro-Medium.otf}{A-OTFJun101Pro-Light.otf}} +\bxjy@declare@preset{morisawa-pr6n}{% + \usecmapforalphabet + \bxjy@multiweight{A-OTF-RyuminPr6N-Light.otf}{A-OTF-RyuminPr6N-Light.otf}% + {A-OTF-FutoMinA101Pr6N-Bold.otf}{A-OTF-GothicBBBPr6N-Medium.otf}% + {A-OTF-FutoGoB101Pr6N-Bold}{A-OTF-MidashiGoPr6N-MB31.otf}% + {A-OTF-GothicBBBPr6N-Medium.otf}{A-OTFJun101Pr6N-Light.otf}} + +%% ... and invokes the specified one! +\ifx\bxjy@main@preset\relax\else +\bxjy@use@preset{\bxjy@main@preset} +\fi + +%--------------------------------------- all done +\endinput +%% EOF diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index c32b5ee8d1a..9a14007a9ed 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -94,7 +94,7 @@ my @TLP_working = qw( boxedminipage boxhandler bpchem bpolynomial bracketkey braids braille braket breakcites breakurl bropd brushscr bullcntr bundledoc burmese bussproofs - bxbase bxdpx-beamer bxeepic bxjscls bytefield + bxbase bxcjkjatype bxdpx-beamer bxeepic bxjscls bytefield c-pascal cabin cachepic calcage calctab calculator calligra calligra-type1 calrsfs cals calxxxx-yyyy cancel canoniclayout cantarell diff --git a/Master/tlpkg/tlpsrc/bxcjkjatype.tlpsrc b/Master/tlpkg/tlpsrc/bxcjkjatype.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/bxcjkjatype.tlpsrc diff --git a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc index ffaab72963f..bfdb1f7f457 100644 --- a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc @@ -12,6 +12,7 @@ depend asymptote-by-example-zh-cn depend asymptote-faq-zh-cn depend asymptote-manual-zh-cn depend bxbase +depend bxcjkjatype depend bxjscls depend c90 depend cjk |