diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-29 21:51:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-29 21:51:02 +0000 |
commit | 30e11d658c0df10f5739383e0e4e92e6e440c617 (patch) | |
tree | 763f84c94693e8bbac07e3587831839238bba67e /Master/texmf-dist/tex/latex/xcjk2uni | |
parent | 3603d66ecbc122dc0b287c5cebde72beafeba67c (diff) |
xcjk2uni (29apr14)
git-svn-id: svn://tug.org/texlive/trunk@33752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xcjk2uni')
8 files changed, 100 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBg5plus.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBg5plus.def index 5f0741461fd..ea9d3c3fe2b 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBg5plus.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBg5plus.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UBg5plus.def', %% generated from file `UBg5plus.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UBg5plus.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_Bg5+_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBig5.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBig5.def index 96adaba295b..c8d5724cde1 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBig5.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UBig5.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UBig5.def', %% generated from file `UBig5.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UBig5.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_Bg5_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGB.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGB.def index 149a46b767a..24713291e40 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGB.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGB.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UGB.def', %% generated from file `UGB.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UGB.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_GB_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGBK.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGBK.def index 31db3a575aa..c70d7aa6c35 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGBK.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UGBK.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UGBK.def', %% generated from file `UGBK.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UGBK.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_GBK_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UJIS.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UJIS.def index 5b5db0d5ee8..2c389d22d85 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UJIS.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UJIS.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UJIS.def', %% generated from file `UJIS.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UJIS.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_JIS_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UKS.def b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UKS.def index d646d147653..d2bb139ade1 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UKS.def +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-UKS.def @@ -2,6 +2,10 @@ %% This is file `xCJK2uni-UKS.def', %% generated from file `UKS.sfd' by `xCJK2uni-make.ltx'. %% +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ + {Convert CJK character to Unicode.} +\ProvidesExplFile{xCJK2uni-UKS.def} + {\ExplFileDate}{0.2}{\ExplFileDescription} \cs_new_nopar:cpn { CJKtu_KS_sfd_map:nn } #1 { \cs_if_exist_use:cF diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-make.ltx b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-make.ltx index b0a68ae1af3..ea5e247e456 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-make.ltx +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni-make.ltx @@ -21,17 +21,62 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xCJK2uni.dtx 512 2013-08-17 15:03:03Z sobenlee $ +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ {Convert CJK character to Unicode.} \ProvidesExplFile{xCJK2uni-make.ltx} - {\ExplFileDate}{0.1}{\ExplFileDescription} + {\ExplFileDate}{0.2}{\ExplFileDescription} +\msg_new:nnn { xCJK2uni } { file-not-found } + { + SFD file~`#2'~for~encoding~`#1'~not~found.\\ + xCJK2uni~will~not~work! + } +\msg_new:nnn { xCJK2uni } { shell-escape } + { Please~call~`#1'~with~the~`--shell-escape'~option. } +\char_set_catcode_letter:N \@ +\int_compare:nNnF + { + \cs_if_exist_use:NF \pdf@shellescape + { \cs_if_exist_use:NF \shellescape { \pdfshellescape } } + } = \c_one + { + \msg_fatal:nnx { xCJK2uni } { shell-escape } + { + \luatex_if_engine:TF { LuaLaTeX } + { + \pdftex_if_engine:TF + { \if_case:w \pdftex_pdfoutput:D LaTeX \else: pdfLaTeX \fi: } + { XeLaTeX } + } + } + } +\ior_new:N \g__CJKtu_sfd_ior +\tl_new:N \g__CJKtu_path_str +\tl_const:Nn \c__CJKtu_cmd_tl { kpsewhich ~ UGBK.sfd } +\luatex_if_engine:TF + { \tl_gset:Nx \g__CJKtu_path_str { \pdf@pipe { \c__CJKtu_cmd_tl } } } + { + \tex_immediate:D \tex_write:D 18 + { \c__CJKtu_cmd_tl > \c_job_name_tl .aux } + \ior_open:NnTF \g__CJKtu_sfd_ior { \c_job_name_tl .aux } + { + \ior_get_str:NN \g__CJKtu_sfd_ior \g__CJKtu_path_str + \ior_close:N \g__CJKtu_sfd_ior + } + { \msg_fatal:nnnn { xCJK2uni } { file-not-found } { GBK } { UGBK.sfd } } + } +\tl_if_blank:oTF { \g__CJKtu_path_str } + { \msg_fatal:nnnn { xCJK2uni } { file-not-found } { GBK } { UGBK.sfd } } + { + \seq_set_split:NnV \l_tmpa_seq { / } \g__CJKtu_path_str + \seq_pop_right:NN \l_tmpa_seq \g__CJKtu_path_str + \tl_gset:Nx \g__CJKtu_path_str { \seq_use:Nn \l_tmpa_seq { / } } + } \tl_const:Nx \c__CJKtu_hash_str { \iow_char:N \# } \tl_const:Nx \c__CJKtu_lbrace_str { \iow_char:N \{ } \tl_const:Nx \c__CJKtu_rbrace_str { \iow_char:N \} } \tl_const:Nx \c__CJKtu_backslash_str { \iow_char:N \\ } \tl_const:Nx \c__CJKtu_indent_str { \c_catcode_other_space_tl \c_catcode_other_space_tl } -\ior_new:N \g__CJKtu_sfd_ior \iow_new:N \g__CJKtu_sfd_map_iow \iow_new:N \g__CJKtu_sfd_cmap_iow \seq_new:N \l__CJKtu_sfd_plane_seq @@ -49,7 +94,7 @@ \cs_new_protected_nopar:Npn \__CJKtu_write_file:nnn #1#2#3 { \group_begin: - \file_path_include:n { sfd/ } + \file_path_include:n { \g__CJKtu_path_str / } \ior_open:NnTF \g__CJKtu_sfd_ior { #3.sfd } { \group_end: @@ -81,11 +126,6 @@ \msg_critical:nnxx { xCJK2uni } { file-not-found } {#1} { #3.sfd } } } -\msg_new:nnn { xCJK2uni } { file-not-found } - { - SFD file~`#2'~for~encoding~`#1'~not~found.\\ - xCJK2uni~will~not~work! - } \group_begin: \char_set_lccode:nn { \c_zero } { `\\ } \char_set_lccode:nn { \c_one } { `\x } @@ -123,7 +163,7 @@ \iow_now:Nx \g__CJKtu_sfd_map_iow { \c__CJKtu_indent_str \c__CJKtu_indent_str \c__CJKtu_indent_str - \seq_use:Nnnn \l__CJKtu_sfd_line_seq { \or: } { \or: } { \or: } + \seq_use:Nn \l__CJKtu_sfd_line_seq { \or: } \token_to_str:N \or: } } @@ -208,6 +248,7 @@ %%~This~is~file~`xCJK2uni-#2.def',\iow_newline: %%~generated~from~file~`#2.sfd'~by~`xCJK2uni-make.ltx'.\iow_newline: %% \iow_newline: + \__CJKtu_identification:n { xCJK2uni-#2.def } \cs_new_nopar:cpn { ~ CJKtu_#1_sfd_map:nn ~ } ~ \c__CJKtu_hash_str 1 \iow_newline: \c__CJKtu_indent_str \c__CJKtu_lbrace_str \iow_newline: \c__CJKtu_indent_str \c__CJKtu_indent_str @@ -219,6 +260,26 @@ \c__CJKtu_indent_str \c__CJKtu_rbrace_str } } +\group_begin: +\char_set_catcode_space:n { 32 } +\tl_const:Nx \c__CJKtu_svn_id_str + {\tl_to_str:n {$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $}} +\group_end: +\cs_new_nopar:Npx \__CJKtu_identification:n #1 + { + \token_to_str:N \GetIdInfo \c__CJKtu_svn_id_str + \iow_newline: + \c__CJKtu_indent_str + \c__CJKtu_lbrace_str Convert~CJK~character~to~Unicode. \c__CJKtu_rbrace_str + \iow_newline: + \token_to_str:N \ProvidesExplFile \c__CJKtu_lbrace_str #1 \c__CJKtu_rbrace_str + \iow_newline: + \c__CJKtu_indent_str + \c__CJKtu_lbrace_str \token_to_str:N \ExplFileDate \c__CJKtu_rbrace_str + \c__CJKtu_lbrace_str 0.2 \c__CJKtu_rbrace_str + \c__CJKtu_lbrace_str \token_to_str:N \ExplFileDescription \c__CJKtu_rbrace_str + \iow_newline: + } \cs_new_protected_nopar:Npn \__CJKtu_write_sfd_map_trailer:n #1 { \iow_now:Nx \g__CJKtu_sfd_map_iow diff --git a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni.sty b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni.sty index 7fd1cc9744c..e80bf60234a 100644 --- a/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni.sty +++ b/Master/texmf-dist/tex/latex/xcjk2uni/xCJK2uni.sty @@ -21,10 +21,10 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo$Id: xCJK2uni.dtx 512 2013-08-17 15:03:03Z sobenlee $ +\GetIdInfo$Id: xCJK2uni.dtx 643 2014-04-29 09:36:22Z sobenlee $ {Convert CJK character to Unicode.} \ProvidesExplPackage{\ExplFileName} - {\ExplFileDate}{0.1}{\ExplFileDescription} + {\ExplFileDate}{0.2}{\ExplFileDescription} \pdftex_if_engine:F { \msg_new:nnn { xCJK2uni } { pdflatex } @@ -82,7 +82,7 @@ \int_set_eq:Nc \l__CJKtu_gap_end_int { c__CJKtu_ #1 _gap_end_int } \int_set_eq:Nc \l__CJKtu_plane_int { c__CJKtu_ #1 _plane_int } \cs_if_exist:cF { CJKtu_ #1 _sfd_map:nn } - { \group_begin: \ExplSyntaxOn \file_input:n { xCJK2uni-#2.def } \group_end: } + { \group_begin: \file_input:n { xCJK2uni-#2.def } \group_end: } \cs_set_eq:Nc \CJKtu_sfd_map:nn { CJKtu_ #1 _sfd_map:nn } } \cs_new_protected_nopar:Npn \__CJKtu_use_enc_map:n #1 @@ -130,7 +130,7 @@ { \CJKtu_byte_map:nn { `#1 } {#2} } \cs_new_nopar:Npn \__CJKtu_byte:Nwnw #1 ^^7f #2 ^^7f { \CJKtu_byte_map:nn { `#1 } {#2} } -\cs_new_protected_nopar:Npn \__CJKtu_bookmarks_hook: +\cs_new_protected_nopar:Npn \CJKtu_bookmarks_hook: { \cs_set_eq:NN ^^7f \__CJKtu_byte:Nwnw \cs_set_eq:NN \CJK@XX \CJKtu_byte:NN @@ -205,7 +205,7 @@ \cs_if_free:NF \pdfstringdefDisableCommands { \hypersetup { CJKbookmarks = false } - \pdfstringdefDisableCommands { \__CJKtu_bookmarks_hook: } + \pdfstringdefDisableCommands { \CJKtu_bookmarks_hook: } } } } |