summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-07-10 04:10:52 +0000
committerNorbert Preining <preining@logic.at>2012-07-10 04:10:52 +0000
commit61e504064c1e8c39ef6672123abae50232a9dd28 (patch)
treebe89c82f9166013ab9635c452ded5e6e65339ed4
parentb89b66e7a2d0d9c8de2abbfa6b6ed5d100dfa5c3 (diff)
japanese-otf-uptex 0.11
git-svn-id: svn://tug.org/texlive/trunk@26985 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/fonts/japanese-otf-uptex/00otf-uptex.txt10
-rw-r--r--Master/texmf-dist/doc/fonts/japanese-otf-uptex/README6
-rw-r--r--Master/texmf-dist/doc/fonts/japanese-otf-uptex/test/uplatex/uotf-sp-utf8.tex86
-rw-r--r--Master/texmf-dist/tex/platex/japanese-otf-uptex/mlutf.sty10
-rw-r--r--Master/texmf-dist/tex/platex/japanese-otf-uptex/otf.sty137
5 files changed, 234 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/00otf-uptex.txt b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/00otf-uptex.txt
index 874ba3afb45..a37437e8d19 100644
--- a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/00otf-uptex.txt
+++ b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/00otf-uptex.txt
@@ -1,5 +1,5 @@
[ Title ]
-otfbeta-uptex (japanese-otf-uptex) Ver.0.10 2012/04/21
+otfbeta-uptex (japanese-otf-uptex) Ver.0.11 2012/07/09
[ Abstract ]
@@ -171,4 +171,12 @@ Combination of jis2004 and ucs option is not supported yet
Revise.
patch/*.patch::
Revise.
+2012.07.09 Ver0.11
+ ## Thank ZR san for great contribution.
+ sty/otf.sty, sty/mlutf.sty ::
+ Apply new code to support surrogate pairs
+ when macros \UTF{}, \UTFT{}, \UTFC{} and/or \UTFM{} are used with hyperref package.
+ The new code is written by ZR san.
+ test/uplatex/uotftest-utf8.tex ::
+ Revise.
diff --git a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/README b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/README
index 42ee4f0d414..52c63f16fe5 100644
--- a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/README
+++ b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/README
@@ -3,7 +3,7 @@ README
From 00otf-uptex.txt:
[ Title ]
-otfbeta-uptex (japanese-otf-uptex) Ver.0.10 2012/04/21
+otfbeta-uptex (japanese-otf-uptex) Ver.0.11 2012/07/09
[ Abstract ]
@@ -21,11 +21,11 @@ For copyright and licensing, please see COPYRIGHT
The original source has been downloaded from
http://homepage3.nifty.com/ttk/comp/tex/uptex.html
as
- http://homepage3.nifty.com/ttk/comp/tex/otfbeta-uptex-0.10.tar.xz
+ http://homepage3.nifty.com/ttk/comp/tex/otfbeta-uptex-0.11.tar.xz
After that the scripts run and the generated tfm and vf files included.
The scripts were run with the env variable OVP2OVF=wovp2ovf
Norbert Preining <preining@logic.at>
-2012-04-23
+2012-07-10
diff --git a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/test/uplatex/uotf-sp-utf8.tex b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/test/uplatex/uotf-sp-utf8.tex
index 8ec29382514..89b4ef4784c 100644
--- a/Master/texmf-dist/doc/fonts/japanese-otf-uptex/test/uplatex/uotf-sp-utf8.tex
+++ b/Master/texmf-dist/doc/fonts/japanese-otf-uptex/test/uplatex/uotf-sp-utf8.tex
@@ -1,6 +1,29 @@
% -*- coding: utf-8 -*-
+%%%%%%%%
+% To control hyperref on command line,
+% you can select one of (1),(2a),(2b),(3).
+% (1) do not treat hyperref
+% $ uplatex uotf-sp-utf8.tex
+% (2a) hyperref + dvipdfmx (with CMap conversion)
+% $ uplatex "\def\withhyperref{dvipdfmx}\input" uotf-sp-utf8.tex
+% (2b) hyperref + dvipdfmx + out2uni (without CMap conversion)
+% $ uplatex "\def\withhyperref{dvipdfmx}\nocmap{true}\input" uotf-sp-utf8.tex
+% (3) hyperref + dvips + convbkmk.rb + distiller/ps2pdf
+% $ uplatex "\def\withhyperref{dvips}\input" uotf-sp-utf8.tex
+%%%%%%
+
\newif\ifuptexmode\uptexmodefalse
-\ifnum\jis"2121="3000 \uptexmodetrue\fi
+\ifnum\jis"2121="3000
+ \uptexmodetrue
+ \def\tounicode{pdf:tounicode UTF8-UTF16}
+\else
+ \ifnum\jis"2121="A1A1
+ \def\tounicode{pdf:tounicode EUC-UCS2}
+ \fi
+ \ifnum\jis"2121="8140
+ \def\tounicode{pdf:tounicode 90ms-RKSJ-UCS2}
+ \fi
+\fi
\makeatletter
@@ -51,17 +74,48 @@
\edef\@opt@{uplatex,\@opt@}
\fi
\ifx\class\@jarticle
- \documentclass[a4paper,titlepage,draft]{\class}
+ \documentclass[a4paper,titlepage]{\class}
\else
\ifx\class\@ujarticle
- \documentclass[a4paper,titlepage,draft]{\class}
+ \documentclass[a4paper,titlepage]{\class}
\else
- \documentclass[a4paper,titlepage,draft,landscape]{\class}
+ \documentclass[a4paper,titlepage,landscape]{\class}
\fi
\fi
\usepackage[\@opt@]{otf}
+\def\@dvipdfmx{dvipdfmx}
+\def\@dvips{dvips}
+
+\ifx\withhyperref\@undefined
+ \def\withhyperref{undefined}
+ \edef\texorpdfstring#1#2{#1}
+\else
+ \ifx\withhyperref\@dvipdfmx
+ \def\@hyperrefkeyval{dvipdfm}
+ \usepackage{atbegshi}
+ \ifx\nocmap\@undefined
+ \AtBeginShipoutFirst{\special{\tounicode}}
+ \fi
+ \fi
+ \ifx\withhyperref\@dvips
+ \def\@hyperrefkeyval{dvips}
+ \fi
+
+\usepackage[\@hyperrefkeyval,%
+bookmarks=true,%
+bookmarksnumbered=true,%
+bookmarkstype=toc,%
+%pdfstartview={FitBH -32768},%
+pdftitle={japanese-otfのテスト},%
+pdfsubject={Unicode supplementary plane編},%
+pdfauthor={upTeXプロジェクト},%
+pdfkeywords={TeX; dvips; dvipdfmx; bookmark; hyperref; しおり; pdf}%
+]{hyperref}
+
+\fi
+
\makeatother
\usepackage{redeffont}
@@ -148,6 +202,30 @@ mg/m & {\mgfamily ひらかな} & {\mgfamily 漢字} & {\mgfamily\UTF{20B9F}\UTF
銀\ajVar{座}アスター。
銀座アスター。
+\makeatletter
+\ifx\withhyperref\@undefined
+\else
+
+\section{見出しに\texorpdfstring{\bs}{\134}UTF, \texorpdfstring{\bs}{\134}UTFC, \texorpdfstring{\bs}{\134}UTFMなど}
+\subsection{日本:\UTF{9aa8}\UTF{6D77} 簡体字:\UTFC{9aa8}\UTFC{6D77} 繁體字:\UTFT{9AA8}\UTFT{6d77} 朝鮮:\UTFK{9AA8}\UTFK{6d77}}
+日本:\UTF{9aa8}\UTF{6D77} 簡体字:\UTFC{9aa8}\UTFC{6D77} 繁體字:\UTFT{9AA8}\UTFT{6d77} 朝鮮:\UTFK{9AA8}\UTFK{6d77}
+
+\subsection{ハングル:\UTFK{c548}\UTFK{b155}\UTFK{d558}\UTFK{C138}\UTFK{C694}}
+ハングル:\UTFK{c548}\UTFK{b155}\UTFK{d558}\UTFK{C138}\UTFK{C694}
+
+\subsection{日本:\UTF{20509}\UTF{241FE} 簡体字:\UTFC{20509}\UTFC{241FE} 多言語:\UTFM{20509}\UTFM{241FE}}
+日本:\UTF{20509}\UTF{241FE} 簡体字:\UTFC{20509}\UTFC{241FE} 多言語:\UTFM{20509}\UTFM{241FE}
+
+\subsection{日本:\UTF{20509}\UTF{241FE} 簡体字:\UTFC{20509}\UTFC{241FE} 多言語:\UTFM{20509}\UTFM{241FE}}
+日本:\UTF{20509}\UTF{241FE} 簡体字:\UTFC{20509}\UTFC{241FE} 多言語:\UTFM{20509}\UTFM{241FE}
+
+\subsection{日本:\UTF{20b9f}\UTF{26402} 繁體字:\UTFT{20b9f}\UTFT{26402} 多言語:\UTFM{20b9f}\UTFM{26402}}
+日本:\UTF{20b9f}\UTF{26402} 繁體字:\UTFT{20b9f}\UTFT{26402} 多言語:\UTFM{20b9f}\UTFM{26402}
+
+\subsection{簡体字:\UTFC{20087}\UTFC{200cc} 繁體字:\UTFT{20087}\UTFT{200cc} 多言語:\UTFM{20087}\UTFM{200cc}}
+簡体字:\UTFC{20087}\UTFC{200cc} 繁體字:\UTFT{20087}\UTFT{200cc} 多言語:\UTFM{20087}\UTFM{200cc}
+\fi
+\makeatother
\clearpage
[mc/m]
diff --git a/Master/texmf-dist/tex/platex/japanese-otf-uptex/mlutf.sty b/Master/texmf-dist/tex/platex/japanese-otf-uptex/mlutf.sty
index 427c73167e7..441931fc6b2 100644
--- a/Master/texmf-dist/tex/platex/japanese-otf-uptex/mlutf.sty
+++ b/Master/texmf-dist/tex/platex/japanese-otf-uptex/mlutf.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{mlutf}[2004/04/17 v1.1.2 psitau, u0.10 ttk]
+\ProvidesPackage{mlutf}[2004/04/17 v1.1.2 psitau, u0.11 ttk]
%force catcode of \" be 12
\count@\catcode`\"
\catcode`\"=12
@@ -27,10 +27,10 @@
%end of changing catcode of \"
\gdef\Redefine@MLUTF{%
\@ifpackageloaded{hyperref}{%
- \def\hyper@UTFC##1{\ifHy@pdfstring\0x##1\else\csname UTFC \endcsname{##1}\fi}
- \def\hyper@UTFK##1{\ifHy@pdfstring\0x##1\else\csname UTFK \endcsname{##1}\fi}
- \def\hyper@UTFT##1{\ifHy@pdfstring\0x##1\else\csname UTFT \endcsname{##1}\fi}
- \def\hyper@UTFM##1{\ifHy@pdfstring\0x##1\else\csname UTFM \endcsname{##1}\fi}
+ \def\hyper@UTFC##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFC \endcsname{##1}\fi}
+ \def\hyper@UTFK##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFK \endcsname{##1}\fi}
+ \def\hyper@UTFT##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFT \endcsname{##1}\fi}
+ \def\hyper@UTFM##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTFM \endcsname{##1}\fi}
\def\UTFC{\protect\hyper@UTFC}
\def\UTFK{\protect\hyper@UTFK}
\def\UTFT{\protect\hyper@UTFT}
diff --git a/Master/texmf-dist/tex/platex/japanese-otf-uptex/otf.sty b/Master/texmf-dist/tex/platex/japanese-otf-uptex/otf.sty
index cc504f3ab75..14e879e44d9 100644
--- a/Master/texmf-dist/tex/platex/japanese-otf-uptex/otf.sty
+++ b/Master/texmf-dist/tex/platex/japanese-otf-uptex/otf.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{otf}[2012/04/11 v1.7b5 psitau, u0.10 ttk]
+\ProvidesPackage{otf}[2012/04/11 v1.7b5 psitau, u0.11 ttk]
%for processing options
\newif\if@kana \@kanafalse
\newif\if@macro \@macrotrue
@@ -57,9 +57,142 @@
}
\fi
\gdef\Redefine@UTF{\@ifpackageloaded{hyperref}{%
- \def\hyper@UTF##1{\ifHy@pdfstring\0x##1\else\csname UTF \endcsname{##1}\fi}
+ \def\hyper@UTF##1{\ifHy@pdfstring\hyper@UTF@{##1}\else\csname UTF \endcsname{##1}\fi}
\def\UTF{\protect\hyper@UTF}}{}
}
+% support surrogate pair in \hyper@UTF@{} by ZR-san
+\def\otf@end{\otf@end@}
+\def\otf@mark{\otf@mark@}
+\def\otf@triexpandafter{%
+ \expandafter\expandafter\expandafter
+}
+\begingroup \catcode`\|=0
+\gdef\otf@cond#1|fi{%
+ #1\expandafter\@firstoftwo
+ |else \expandafter\@secondoftwo
+ |fi
+}
+\endgroup
+\def\otf@next#1#2#3#4#5{%
+ \@namedef{otf@qh/#1#2}{#3}%
+ \@namedef{otf@hq/#3}{#1#2}%
+ \@namedef{otf@lhq/#4#5}{#1#2}%
+}
+\@for\otf@x:={%
+ 00001,01102,02203,03304,10405,11506,12607,13708,%
+ 20809,2190A,22A0B,23B0C,30C0D,31D0E,32E0F,33F10}\do{%
+ \expandafter\otf@next\otf@x
+}
+\def\otf@next#1{%
+ \lowercase{\def\otf@y{#1}}%
+ \@namedef{otf@hd/#1}{#1}%
+ \@namedef{otf@hd/\otf@y}{#1}%
+}
+\@tfor\otf@x:=0123456789ABCDEF\do{%
+ \expandafter\otf@next\otf@x
+}
+\def\hyper@UTF@#1{%
+ \expandafter\otf@hy@utf@pre@a#1\relax{}\otf@mark\otf@end
+}
+\def\otf@hy@utf@pre@a{%
+ \expandafter\otf@hy@utf@pre@b\romannumeral-`>%
+}
+\def\otf@hy@utf@pre@b#1#{%
+ \otf@cond \ifx\otf@end#1\otf@end \fi{%
+ \otf@hy@utf@bombout
+ }{%
+ \otf@hy@utf@pre@c#1%
+ }%
+}
+\def\otf@hy@utf@pre@c#1{%
+ \otf@cond \ifx#1\relax \fi{%
+ \otf@hy@utf@pre@end
+ }{%
+ \otf@triexpandafter\otf@hy@utf@pre@d
+ \csname otf@hd/\string#1\endcsname
+ }%
+}
+\def\otf@hy@utf@pre@d#1{%
+ \otf@cond \ifx#1\relax \fi{%
+ \otf@hy@utf@bombout
+ }{%
+ \otf@hy@utf@pre@e#1%
+ }%
+}
+\def\otf@hy@utf@pre@e#1#2\otf@mark#3\otf@end{%
+ \otf@cond \if 0#1\fi{%
+ \otf@cond \ifx\otf@end#3\otf@end \fi{%
+ \otf@hy@utf@pre@f{#2}{#3}%
+ }{%
+ \otf@hy@utf@pre@f{#2}{#3#1}%
+ }%
+ }{%
+ \otf@hy@utf@pre@f{#2}{#3#1}%
+ }%
+}
+\def\otf@hy@utf@pre@f#1#2{%
+ \otf@hy@utf@pre@a#1\otf@mark#2\otf@end
+}
+\def\otf@hy@utf@pre@end#1\otf@mark#2\otf@end{%
+ \otf@cond \ifx\otf@end#1\otf@end \fi{%
+ \otf@hy@utf@sw{#2}%
+ }{%
+ \otf@hy@utf@error
+ }%
+}
+\def\otf@hy@utf@bombout#1\otf@end{%
+ \otf@hy@utf@error
+}
+
+\def\otf@hy@utf@sw#1{%
+ \otf@cond \ifnum"0#1>"10FFFF \fi{%
+ \otf@hy@utf@error
+ }{%
+ \otf@hy@utf@sw@a{#1}%
+ }%
+}
+\def\otf@hy@utf@sw@a#1{%
+ \otf@cond \ifnum"0#1>"FFFF \fi{%
+ \otf@hy@utf@big#1"000000\otf@end
+ }{%
+ \otf@hy@utf@small#1"0000\otf@end
+ }%
+}
+\def\otf@hy@utf@small#1#2#3#4#5#6\otf@end{%
+ \otf@hy@utf@small@a#1#2#3#4#5\otf@end
+}
+\def\otf@hy@utf@small@a#1"#2\otf@end{%
+ \otf@hy@utf@unit{#2#1}%
+}
+\def\otf@hy@utf@big#1#2#3#4#5#6#7#8\otf@end{%
+ \otf@hy@utf@big@a#1#2#3#4#5#6#7\otf@end
+}
+\def\otf@hy@utf@big@a#1"#2\otf@end{%
+ \otf@hy@utf@big@b#2#1\otf@end
+}
+\def\otf@hy@utf@big@b#1#2#3#4{%
+ \otf@triexpandafter\otf@hy@utf@big@c
+ \csname otf@lhq/#1#2\otf@triexpandafter\endcsname
+ \csname otf@hq/#3\otf@triexpandafter\endcsname
+ \csname otf@hq/#4\endcsname
+}
+\def\otf@hy@utf@big@c#1#2#3#4#5#6{%
+ \otf@triexpandafter\otf@hy@utf@big@d
+ \csname otf@qh/2#1\otf@triexpandafter\endcsname
+ \csname otf@qh/#2#3\otf@triexpandafter\endcsname
+ \csname otf@qh/#4#5\otf@triexpandafter\endcsname
+ \csname otf@qh/3#6\endcsname
+}
+\def\otf@hy@utf@big@d#1#2#3#4#5\otf@end{%
+ \otf@hy@utf@unit{D#1#2#3}%
+ \otf@hy@utf@unit{D#4#5}%
+}
+\def\otf@hy@utf@error{%
+ \otf@hy@utf@unit{FFFD}%
+}
+\def\otf@hy@utf@unit#1{%
+ \0x#1%
+}
\AtBeginDocument{\Redefine@UTF}
%internal macros
%macros by iNOUE Koich!