summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2012-09-28 23:10:47 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2012-09-28 23:10:47 +0000
commit7bdec67dc91c1e2990c131b4c6af3fd94a8d520f (patch)
treeee760a4186ff84eb04efd56fc085de1a57bd4b85 /Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex
parent27fd84b5bfffb6b59d3110e9f68902d62a454ce7 (diff)
upTeX Ver1.11-20120921a
git-svn-id: svn://tug.org/texlive/trunk@27848 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex')
-rw-r--r--Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex165
1 files changed, 127 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex b/Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex
index 97b8527c156..50f0aef3426 100644
--- a/Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex
+++ b/Master/texmf-dist/doc/uptex/base/samples/bkmk-utf8.tex
@@ -1,75 +1,126 @@
-\newif\ifuptexmode\uptexmodefalse
+% -*- coding: utf-8 -*-
+%%%%%%%%
+% To control hyperref on command line,
+% you can select one of (1),(2a),(2b),(3).
+% (1) do not treat hyperref
+% $ uplatex bkmk-utf8.tex
+% (2a) hyperref + dvipdfmx (with CMap conversion)
+% $ uplatex "\def\withhyperref{dvipdfmx}\input" bkmk-utf8.tex
+% (2b) hyperref + dvipdfmx + "convbkmk.rb -o"/out2uni (w/o CMap conversion)
+% $ uplatex "\def\withhyperref{dvipdfmx}\def\nocmap{true}\input" bkmk-utf8.tex
+% (3) hyperref + dvips + convbkmk.rb + distiller/ps2pdf
+% $ uplatex "\def\withhyperref{dvips}\input" bkmk-utf8.tex
+%%%%%%
+\newif\ifuptexmode\uptexmodefalse
\ifnum\jis"2121="3000
%% for upLaTeX
- \documentclass{ujarticle}
\def\pLaTeXorupLaTeX{upLaTeX}
\uptexmodetrue
\def\innerencoding{UPTEX}
- \def\tounicode{pdf:tounicode UTF8-UCS2}
+ \def\cmap{UTF8-UTF16}
\else
%% for pLaTeX
- \documentclass{jarticle}
\def\pLaTeXorupLaTeX{pLaTeX}
\uptexmodefalse
\ifnum\jis"2121="A1A1
\def\innerencoding{EUC}
- \def\tounicode{pdf:tounicode EUC-UCS2}
+ \def\cmap{EUC-UCS2}
\fi
\ifnum\jis"2121="8140
\def\innerencoding{SJIS}
- \def\tounicode{pdf:tounicode 90ms-RKSJ-UCS2}
+ \def\cmap{90ms-RKSJ-UCS2}
\fi
\fi
+\makeatletter
+
+\def\@opt@{multi}
+\def\@default{default}
+\def\@jarticle{jarticle}
+\def\@tarticle{tarticle}
+\def\@ujarticle{ujarticle}
+
+\ifx\option\@undefined
+ \def\option{default}
+\fi
+
+\ifx\class\@undefined
+ \ifuptexmode
+ \def\class{ujarticle}
+ \else
+ \def\class{jarticle}
+ \fi
+\fi
+\ifuptexmode
+ \edef\@opt@{uplatex,\@opt@}
+\fi
+\ifx\class\@jarticle
+ \documentclass[a4paper,titlepage]{\class}
+\else
+ \ifx\class\@ujarticle
+ \documentclass[a4paper,titlepage]{\class}
+ \else
+ \documentclass[a4paper,titlepage,landscape]{\class}
+ \fi
+\fi
+
\usepackage{graphicx}
+\usepackage{textcomp}
+\usepackage[\@opt@]{otf}
-%%%%%%%%
-% hyperref 関連の制御をコマンドラインから行う
-% (1),(2),(3) のどれかを実行すればよい。
-% (1) 何もしない
-% $ uplatex bkmk-utf8.tex
-% (2) hyperref + dvipdfmx
-% $ uplatex "\def\withhyperref{dvipdfmx}\input" bkmk-utf8.tex
-% (3) hyperref + dvips + modified convert-euc.txt + distiller/ps2pdf
-% hyperref + dvips + convbkmk.rb + distiller/ps2pdf
-% $ uplatex "\def\withhyperref{dvips}\input" bkmk-utf8.tex
-%%%%%%
-\makeatletter
\def\@dvipdfmx{dvipdfmx}
\def\@dvips{dvips}
\ifx\withhyperref\@undefined
\def\withhyperref{undefined}
+ \def\texorpdfstring{%
+ \expandafter\@firstoftwo
+ }
\else
+ \ifx\withhyperref\@dvipdfmx
+ \def\@hyperrefkeyval{dvipdfm}
+ \usepackage{atbegshi}
+ \ifx\nocmap\@undefined
+ \AtBeginShipoutFirst{\special{pdf:tounicode \cmap}}
+ \else
+ \def\cmap{---}
+ \fi
+ \fi
+ \ifx\withhyperref\@dvips
+ \def\@hyperrefkeyval{dvips}
+ \fi
-\ifx\withhyperref\@dvipdfmx
- \def\@hyperrefkeyval{dvipdfm}
-\fi
-\ifx\withhyperref\@dvips
- \def\@hyperrefkeyval{dvips}
-\fi
-
-\usepackage[\@hyperrefkeyval,%
-bookmarks=true,%
-bookmarksnumbered=true,%
-bookmarkstype=toc,%
-%pdfstartview={FitBH -32768},%
-pdftitle={いろいろ確かめてみる},%
-pdfsubject={hyperref編},%
-pdfauthor={名無 権兵衛},%
-pdfkeywords={TeX; dvips; dvipdfmx; bookmark; hyperref; しおり; pdf}%
-]{hyperref}
-
+\ifx\nocmap\@undefined
+ \usepackage[\@hyperrefkeyval,%
+ bookmarks=true,%
+ bookmarksnumbered=true,%
+ bookmarkstype=toc,%
+ %pdfstartview={FitBH -32768},%
+ pdftitle={いろいろ確かめてみる},%
+ pdfsubject={hyperref編},%
+ pdfauthor={名無 権兵衛},%
+ pdfkeywords={TeX; dvips; dvipdfmx; bookmark; hyperref; しおり; pdf}%
+ ]{hyperref}
+\else
+ \input bkmk-docinfo.out
+ \usepackage[dvipdfm,%
+ bookmarks=true,%
+ bookmarksnumbered=true,%
+ bookmarkstype=toc,%
+ %pdfstartview={FitBH -32768},%
+ pdftitle=\PDFTITLE,%
+ pdfsubject=\PDFSUBJECT,%
+ pdfauthor=\PDFAUTHOR,%
+ pdfkeywords=\PDFKEYWORDS%
+ ]{hyperref}
\fi
-\ifx\withhyperref\@dvipdfmx
- \AtBeginDvi{\special{\tounicode}}
\fi
\makeatother
@@ -114,12 +165,19 @@ pdfkeywords={TeX; dvips; dvipdfmx; bookmark; hyperref; しおり; pdf}%
\textwidth162mm
\textheight245mm
+\edef\bs{$\backslash$\kern0em}
+
\begin{document}
\maketitle
\section{section title by ASCII}
test test.
hyperref with: \withhyperref
+\makeatletter
+\ifx\withhyperref\@dvipdfmx
+ ~~CMap:\cmap
+\fi
+\makeatother
\typeout{### hyperref with: \withhyperref}
pLaTeX or upLaTeX: \pLaTeXorupLaTeX
@@ -167,6 +225,34 @@ test test.
\subsection{サブセクション(括弧)}
test test.
+\makeatletter
+\ifx\withhyperref\@undefined
+\else
+
+\section{Escape sequences \texorpdfstring{\textbullet\textdagger\textdaggerdbl\ldots---\textflorin--\textperthousand\texttrademark\texteuro}%
+{\200\201\202\203\204\206\205\213\222\240}など}
+\textbullet\textdagger\textdaggerdbl\ldots---\textflorin--\textperthousand\texttrademark\texteuro など
+
+\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
%%% for upLaTeX only
\ifuptexmode
@@ -200,6 +286,9 @@ test test.
\subsection[韓国語 한국어]{韓国語 {\korrm 한국어}}
{\korrm 한국어}
+
+\subsection{半角カタカナ}
+半角カタカナ
\fi
\end{document}