X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=fc4fcf48f076ad21607a1e4941c9359f42a8f788;hb=f13b626507752c5b68b8b174a8d8481b1e9fc744;hp=c19af6d92c69dd60a9b3a0fb62d5d87342a96fb4;hpb=12c71b882da843b8bcaa12c321cef9228cd3e08c;p=luatex-ja%2Fluatexja.git
diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx
index c19af6d..fc4fcf4 100644
--- a/doc/luatexja.dtx
+++ b/doc/luatexja.dtx
@@ -4,7 +4,10 @@
% To typeset this manual, you need following two fonts:
% - KozMinPr6N-Regular.otf
% - KozGoPr6N-Medium.otf
-% - ipamjm.ttf
+% - KozGoPr6N-Regular.otf
+
+%%%%% section ==> ç«
+%%%%% subsection => ç¯
%\documentclass[a4paper,titlepage]{article}
%\documentclass[a4paper,titlepage]{ltjsarticle}
@@ -29,13 +32,13 @@
\let\@listfiles\empty
%<*en>
-\usepackage[margin=25mm,footskip=6mm]{geometry}
+\usepackage[margin=25mm,lmargin=30mm,rmargin=30mm,footskip=6mm]{geometry}
\usepackage{luatexja-adjust}\ltjdisableadjust
\parskip=\smallskipamount
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
- {3.25ex \@plus1ex \@minus.2ex}%
- {-1em}%
- {\normalfont\normalsize\bfseries\raisebox{.2ex}{$\mdlgblksquare\mkern1mu$}}}
+ {3.25ex \@plus1ex \@minus.2ex}%
+ {-1em}%
+ {\normalfont\normalsize\bfseries\raisebox{.2ex}{$\mdlgblksquare\mkern1mu$}}}
%
%<*ja>
\usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry}
@@ -44,20 +47,34 @@
%
\usepackage{amsmath,array,tikz,pict2e,multienum,float}
-\usepackage{booktabs,multicol}
+\usepackage{booktabs,multicol,luatexja-ruby}
%%%%%%%% listings
+
+%%%%%%%% IVS
+
+\def\IVS#1{\char\numexpr "E0100+#1\relax}%"
+\def\IVSA#1#2#3#4#5{%
+ \textcolor{blue}{\raisebox{3.5pt}{\tt%
+ \fboxsep=0.5pt\fbox{\tiny \oalign{0#1#2\crcr#3#4#5\crcr}}}}%
+}
+{\catcode`\%=11
+ \gdef\IVSB#1{\expandafter\IVSA\directlua{
+ local cat_str = luatexbase.catcodetables['string']
+ tex.sprint(cat_str, string.format('%X', 0xE00EF+#1))
+}}}
+
\usepackage{listings,showexpl}
\lstset{
basicstyle=\ttfamily\small, pos=r, breaklines=true,
numbers=none, rframe={}, basewidth=0.5em, numberstyle=\tiny, numbersep=0.5em,
- explpreset={numberstyle=\tiny, numbers=left, numbersep=1em}
+ explpreset={numberstyle=\tiny, numbers=left, numbersep=1em, columns=fixed}
}
% Suppress output from showexpl to stdout.
\let\SX@Info\relax
%%%%%%%% hyperref
-\usepackage{hyperref}
+\usepackage{hyperref,bookmark}
%<*en>
\title{The \LuaTeX-ja package}
\author{The \LuaTeX-ja project team}
@@ -91,7 +108,9 @@
\usepackage{luatexja-otf}
%\usepackage{lmodern}
\directlua{luatexja.otf.enable_ivs()}
+\usepackage[match]{luatexja-fontspec}
\usepackage[kozuka-pr6n]{luatexja-preset}
+\setmonojfont{KozGoPr6N-Regular.otf}
%<*ja>
\def\emph#1{\textbf{\textgt{#1}}}
\def\headfont{\normalfont\bfseries\gtfamily}
@@ -104,11 +123,6 @@
\setmathfont{xits-math.otf}
\frenchspacing
%
-\DeclareRobustCommand\ttfamily
- {\not@math@alphabet\ttfamily\mathtt
- \romanfamily\ttdefault\ttjfam\selectfont}
-\newjfontfamily\ttjfam{KozGoPr6N-Regular.otf}
-
%%%%%%%% logo
\usepackage{metalogo}
@@ -125,10 +139,10 @@
\newenvironment{cslist}{%
% \leftskip2\zw
% \leftskip2em
- \parindent=0pt\def\makelabel##1{{\tt\char92##1}}
+ \parindent=0pt\def\makelabel##1{{\tt\textbackslash ##1}}
\def\{{\char`\{}\def\}{\char`\}}
\let\origitem=\item
- \def\item[##1]{\par\smallskip\par\hskip-\leftskip\makelabel{##1}\par}
+ \def\item[##1]{\par\smallskip\par\hskip-\leftskip\makelabel{##1}\par\nobreak}
\@totalleftmargin\leftskip
}{\par%
%\medskip
@@ -146,6 +160,8 @@
\fi
\vskip\belowcaptionskip}
+\def\_{\leavevmode \kern .06em\vbox {\hrule \@width .333em}}
+
%%%%%%%%
\makeatother
%%%%%%%%
@@ -158,8 +174,13 @@
\begin{document}
+\lstset{
+ vscmd=\IVSB
+}
+
\catcode`\<=13
-\def<#1>{{\normalfont\rm\itshape$\langle$#1$\rangle$}}
+\def<#1>{{\normalfont\rm\itshape$\langle$#1\/$\rangle$}}
+\let\LARG=<
\maketitle
\tableofcontents
@@ -343,10 +364,10 @@ The followings are major changes from \pTeX:
ã¡ã{}ã£ã¨ ã¡ã\/ã£ã¨
\end{verbatim}
%<*en>
- If you want to do so, please put an empty hbox between it instead:
+ If you want to do so, please put an empty horizontal box (hbox) between it instead:
%
%<*ja>
- ããåããã¨ããããããã°ï¼ç©ºã®æ°´å¹³ããã¯ã¹ãéã«æãã°ããï¼
+ ããåããã¨ããããããã°ï¼ç©ºã®æ°´å¹³ããã¯ã¹(hbox)ãéã«æãã°ããï¼
%
\begin{verbatim}
ã¡ã\hbox{}ã£ã¨
@@ -358,7 +379,7 @@ The followings are major changes from \pTeX:
fonts are identified.
%
%<*ja>
-\item å¦çä¸ã§ã¯ï¼2ã¤ã®åæãã©ã³ãã¯ï¼ãå®éã®ããã©ã³ããç°ãªãã ãã®å ´åã«ã¯åä¸è¦
+\item å¦çä¸ã§ã¯ï¼2ã¤ã®åæãã©ã³ãã¯ï¼å®ãã©ã³ããç°ãªãã ãã®å ´åã«ã¯åä¸è¦
ãããï¼
%
\end{itemize}
@@ -407,7 +428,7 @@ In this document, the following terms and notations are used:
\begin{itemize}
%<*en>
\item \textbf{JAchar}: standing for characters which used in Japanese typesetting,
- such as Hiragana, Katakana, Kanji and other Japanese punctuation marks.
+ such as Hiragana,~Katakana, Kanji, and~other Japanese punctuation marks.
%
%<*ja>
\item \textbf{JAchar}: ã²ãããªï¼ã«ã¿ã«ãï¼æ¼¢åï¼åæç¨ã®ç´ç©ã¨ãã£ã
@@ -445,14 +466,15 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
ããã±ã¼ã¸ãã¯ã©ã¹ã表ãï¼
%
%<*en>
-\item In this document, natural numbers start from~0.
+\item In this document, natural numbers start from~zero.
+ $\omega$ denotes the set of all natural numbers.
%
%<*ja>
-\item æ¬ããã¥ã¡ã³ãã§ã¯ï¼èªç¶æ°ã¯0ããå§ã¾ãï¼
+\item æ¬ããã¥ã¡ã³ãã§ã¯ï¼èªç¶æ°ã¯0ããå§ã¾ãï¼èªç¶æ°å
¨ä½ã®éåã¯$\omega$ã¨è¡¨è¨ããï¼
%
\end{itemize}
-%\subsection{About the project}
+%\subsection{About the Project}
%\subsection{ããã¸ã§ã¯ãã«ã¤ãã¦}
%\paragraph{Project Wiki} Project Wiki is under construction.
@@ -503,47 +525,41 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
%\subsection{Installation}
%\subsection{ã¤ã³ã¹ãã¼ã«}
-%To install the \LuaTeX-ja\ package, you will need:
+%To install the \LuaTeX-ja\ package, you will need the following engine and packages:
%\LuaTeX-jaããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ã«ã¯ï¼æ¬¡ã®ãã®ãå¿
è¦ã§ããï¼
\begin{itemize}
\item \LuaTeX\ beta-0.74.0 (or later)
-\item \Pkg{luaotfload} v2.2
-\item \Pkg{luatexbase} v0.6~(2013/05/04)
+\item \Pkg{luaotfload} v2.2 (or later)
+\item \Pkg{luatexbase} v0.6 (or later)
+\item \Pkg{everysel} v1.2 (or later)
\item \Pkg{xunicode} v0.981~(2011/09/09)
\item \Pkg{adobemapping} (Adobe cmap and pdfmapping files)
\end{itemize}
%<*en>
-\emph{From this version of \LuaTeX-ja, \TeX~Live~2012 (or older version) is
-no longer supported, since \LuaTeX\ binary and \Pkg{luaotfload} is updated in
-\TeX~Live~2013.}
-And conversely, older versions of \LuaTeX-ja (20130318.1 or earlier) don't work in
-\TeX~Live~2013.
+\emph{This version of \LuaTeX-ja no longer supports \TeX~Live~2012 (or older version),
+since \LuaTeX\ binary and \Pkg{luaotfload} is updated in
+\TeX~Live~2013.}
\medskip
Now \LuaTeX-ja is available from the following archive and distributions:
\begin{itemize}
\item CTAN (in the \texttt{macros/luatex/generic/luatexja} directory)
- \item MiK\TeX\ (in \texttt{luatexja.tar.lzma})
+ \item MiK\TeX\ (in \texttt{luatexja.tar.lzma}); see the next subsection
\item \TeX\ Live (in \texttt{texmf-dist/tex/luatex/luatexja})
\item W32\TeX\ (in \texttt{luatexja.tar.xz})
\end{itemize}
-If you are using \TeX~Live~2013, you can install \LuaTeX-ja
+If you are using \TeX~Live~2014, you can install \LuaTeX-ja
from \TeX~Live manager (\texttt{tlmgr}):
\begin{verbatim}
$ tlmgr install luatexja
\end{verbatim}
-
-\medskip
-
-If you want to install manually, do the following instruvtions:
%
%<*ja>
-\emph{æ¬ãã¼ã¸ã§ã³ä»¥éã®\LuaTeX-jaã¯\TeX~Live~2012以åã§ã¯åä½ããªãï¼}
+\emph{æ¬ãã¼ã¸ã§ã³ã®\LuaTeX-jaã¯\TeX~Live~2012以åã§ã¯åä½ããªãï¼}
ããã¯ï¼\LuaTeX ã¨\Pkg{luaotfload}ã\TeX~Live~2013ã«ããã¦æ´æ°ããããã¨ã«ããï¼
-éã«ï¼20130318.1以åã®\LuaTeX-jaã¯\TeX~Live~2013ã§ã¯åä½ããªãï¼
\medskip
@@ -555,16 +571,16 @@ If you want to install manually, do the following instruvtions:
\item W32\TeX\ (\texttt{luatexja.tar.xz})
\end{itemize}
-ä¾ãã°\TeX~Live~2013ãå©ç¨ãã¦ãããªãï¼\LuaTeX-jaã¯\TeX~Live manager (\texttt{tlmgr})ã
+ä¾ãã°\TeX~Live~2014ãå©ç¨ãã¦ãããªãï¼\LuaTeX-jaã¯\TeX~Live manager (\texttt{tlmgr})ã
使ã£ã¦ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ããï¼
\begin{verbatim}
$ tlmgr install luatexja
\end{verbatim}
+%
-\medskip
+%\paragraph{Manual installation}
+%\paragraph{æåã¤ã³ã¹ãã¼ã«æ¹æ³}
-æåã§ã¤ã³ã¹ãã¼ã«ããå ´åã®æ¹æ³ã¯ä»¥ä¸ã®ããã«ãªãï¼
-%
\begin{enumerate}
%<*en>
\item Download the source archive, by one of the following method.
@@ -674,34 +690,52 @@ Note that \texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} are not need
å¾æ¥æ¥æ¬èªã®æåã³ã¼ãã¨ãã¦ç¨ãããã¦ããEUC-JPãShift-JISã¯ä½¿ç¨ã§ããªãï¼
%
%<*en>
-\item \LuaTeX-ja is very slower than \pTeX. Using LuaJIT\TeX\ slightly improve the situation.
+\item \LuaTeX-ja is very slower than \pTeX.
+Generally speaking, LuaJIT\TeX\ processes \LuaTeX-ja
+about 30\% faster than \LuaTeX, but not always.
%
%<*ja>
-\item \LuaTeX-jaã¯åä½ã\pTeX ã«æ¯ã¹ã¦é常ã«é
ãï¼ã³ã¼ããå¤æ´ãã¦å¾ã
ã«éããã¦ãããï¼
-ã¾ã æºè¶³ã§ããé度ã§ã¯ãªãï¼LuaJIT\TeX ãç¨ããã¨\LuaTeX ã®ã ããã1.3åã®é度ã§åãããã§ããï¼
+\item \LuaTeX-jaã¯åä½ã\pTeX ã«æ¯ã¹ã¦é常ã«é
ãï¼
+ã³ã¼ãã調æ´ãã¦å¾ã
ã«éããã¦ãããï¼ã¾ã æºè¶³ã§ããé度ã§ã¯ãªãï¼
+LuaJIT\TeX ãç¨ããã¨\LuaTeX ã®ã ããã1.3åã®é度ã§åãããã§ãããï¼
+IPA mjææãªã©ã®å¤§ãããã©ã³ããç¨ããå ´åã«ã¯\LuaTeX ãããé
ããªããã¨ãããï¼
%
-
+\item%
%<*en>
-\item \emph{Note for MiK\TeX\ users:} \LuaTeX-ja requires that two CMap files,
-\texttt{UniJIS2004-UTF32-H} and \texttt{Adobe-Japan1-UCS2}, must be found
-by Kpathsearch.
-You can check this by \texttt{kpsewhich} command (the output may be changed):
+\textbf{Note for MiK\TeX\ users}\quad
+\LuaTeX-ja requires that several CMap files%
+\footnote{\texttt{UniJIS2004-UTF32-H} and \texttt{Adobe-Japan1-UCS2}.}
+must be found from \LuaTeX.
+Strictly speaking, those CMaps are needed
+only in the first run of \LuaTeX-ja after installing or updating.
+But it seems that MiK\TeX\ does not satisfy this condition,
+so you will encounter an error like the following:
%
%<*ja>
-\item \emph{MiK\TeX å©ç¨è
ã¸ã®æ³¨æï¼}\LuaTeX-jaãåä½ããããã«ã¯ï¼
+\LuaTeX-jaãåä½ããããã«ã¯ï¼\emph{å°å
¥ã»æ´æ°å¾ã®ååèµ·åæã«}
\texttt{UniJIS2004-UTF32-H}, \texttt{Adobe-Japan1-UCS2}ã¨ãã2ã¤ã®CMapã
-Kpathsearchã«ãã£ã¦è¦ã¤ãããããã¨ãå¿
è¦ã§ããï¼\TeX\ LiveãW32\TeX ã¦ã¼ã¶ã¯
-æ®éã«ã¤ã³ã¹ãã¼ã«ããã°ãã®ããã«ãªã£ã¦ããã¯ãã§ããï¼
-
-確èªããã«ã¯ï¼ä»¥ä¸ã®ããã« \texttt{kpsewhich} ã³ãã³ããå®è¡ããã°ããï¼
+\LuaTeX ã«ãã£ã¦è¦ã¤ãããããã¨ãå¿
è¦ã§ããï¼
+ãããMiK\TeX ã§ã¯ãã®ããã«ãªã£ã¦ããªãã®ã§ï¼æ¬¡ã®ã¨ã©ã¼ãçºçããã ããï¼
%
\begin{verbatim}
-$ kpsewhich -format=cmap UniJIS2004-UTF32-H
-/opt/texlive/2013/texmf-dist/fonts/cmap/adobemapping/aj16/CMap/UniJIS2004-UTF32-H
-$ kpsewhich -format=cmap Adobe-Japan1-UCS2
-/opt/texlive/2013/texmf-dist/fonts/cmap/adobemapping/ToUnicode/Adobe-Japan1-UCS2
+! LuaTeX error ...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua
+bad argument #1 to 'open' (string expected, got nil)
\end{verbatim}
+%<*en>
+If so, please execute a batch file which is written on
+\href{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{ the Project Wiki (English)}.
+This batch file creates a temporaly directory, copy CMaps in it,
+run \LuaTeX-ja in this directory, and finally delete the temporaly directory.
+%
+%<*ja>
+ãã®ãããªå ´åã«ã¯ï¼
+\href{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{%
+ ããã¸ã§ã¯ãWikiè±èªçããããã¼ã¸}ä¸ã«æ¸ããã¦ããããããã¡ã¤ã«ã
+å®è¡ãã¦æ¬²ããï¼ãã®ããããã¡ã¤ã«ã¯ï¼ä½æ¥ç¨ãã£ã¬ã¯ããªã«CMapéã
+ã³ãã¼ãï¼ãã®ä¸ã§\LuaTeX-ja ã®ååèµ·åãè¡ãï¼ä½æ¥ç¨ãã£ã¬ã¯ããªãæ¶ãä½æ¥ããã¦ããï¼
+%
+
\end{itemize}
%\subsection{Using in plain \TeX}
@@ -743,7 +777,7 @@ $ kpsewhich -format=cmap Adobe-Japan1-UCS2
%
\begin{itemize}
%<*en>
-\item It is widely accepted that fonts ``Ryumin-Light'' and
+\item It is widely accepted that fonts ``Ryumin-Light'' and
``GothicBBB-Medium'' aren't embedded into PDF files, and a PDF reader
substitute them by some external Japanese fonts (\textit{e.g.},
Ryumin-Light is substituted with Kozuka Mincho in Adobe Reader).
@@ -803,7 +837,7 @@ for Japanese, you only have to load \texttt{luatexja.sty}:
\usepackage{luatexja}
\end{verbatim}
%<*en>
-It also does minimal settings (counterparts in \pLaTeX\ are \texttt{
+It also does minimal settings (counterparts in \pLaTeX\ are \texttt{%
plfonts.dtx} and \texttt{pldefs.ltx}):
%
%<*ja>
@@ -897,7 +931,7 @@ Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
æ¥æ¬èªææ¸ãçµçããããã«ã¯ï¼\texttt{article.cls}, \texttt{book.cls}ã¨ãã£ã
欧æç¨ã®ã¯ã©ã¹ãã¡ã¤ã«ã§ã¯ãªãï¼åæç¨ã®ã¯ã©ã¹ãã¡ã¤ã«ãç¨ããæ¹ãããï¼
ç¾æç¹ã§ã¯ï¼\Pkg{jclasses}ï¼\pLaTeX ã®æ¨æºã¯ã©ã¹ï¼ã¨\Pkg{jsclasses}
-ï¼å¥¥ææ´å½¦æ°ã«ããã¯ã©ã¹ãã¡ã¤ã«ï¼ã«å¯¾å¿ãããã®ã¨ãã¦ï¼\Pkg{ltjclasses}ï¼
+ï¼å¥¥ææ´å½¦æ°ã«ããã\pLaTeXe æ°ããã¥ã¡ã³ãã¯ã©ã¹ãï¼ã«å¯¾å¿ãããã®ã¨ãã¦ï¼\Pkg{ltjclasses}ï¼
\Pkg{ltjsclasses}ãããããç¨æããã¦ããï¼
%
@@ -905,11 +939,11 @@ Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
%\section{ãã©ã³ãã®å¤æ´}
\subsection{plain \TeX~and~\LaTeXe}
-\label{ssub-chgfnt}
+\label{ssec-chgfnt}
\paragraph{plain \TeX}
%<*en>
-To change Japanese fonts in plain \TeX, you must use the control sequence
+To change Japanese fonts in plain \TeX, you must use the command
\verb+\jfont+. So please see Subsection~\ref{ssec-jfont}.
%
%<*ja>
@@ -928,7 +962,7 @@ For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ (
\begin{itemize}
%<*en>
\item Commands \verb+\fontfamily+, \verb+\fontseries+,
- \verb+\fontshape+ and \verb+\selectfont+ can be used to change
+ \verb+\fontshape+, and \verb+\selectfont+ can be used to change
attributes of Japanese fonts.
%
%<*ja>
@@ -972,22 +1006,23 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
%
%<*en>
- \verb+\fontencoding{}+ changes the encoding of alphabetic fonts
+ \verb+\fontencoding{+\verb+}+ changes the encoding of alphabetic fonts
or Japanese fonts depending on the argument. For example,
\verb+\fontencoding{JY3}+ changes the encoding of Japanese fonts to
- \texttt{JY3} and \verb+\fontencoding{T1}+ changes the encoding of
+ \texttt{JY3},and \verb+\fontencoding{T1}+ changes the encoding of
alphabetic fonts to \texttt{T1}.
- \verb+\fontfamily+ also changes the family of Japanese fonts, alphabetic
- fonts, \emph{or both}. For detail, see Subsection~\ref{ssub-nfsspat}.
+ \verb+\fontfamily+ also changes the current Japanese font family,
+ the current alphabetic font family, \emph{or both}.
+ For the detail, see Subsection~\ref{ssec-nfsspat}.
%
%<*ja>
- ããã§ï¼\verb+\fontencoding{}+ ã¯ï¼å¼æ°ã«ããåæå´ã欧æ
+ ããã§ï¼\verb+\fontencoding{+\verb+}+ ã¯ï¼å¼æ°ã«ããåæå´ã欧æ
å´ãã®ã©ã¡ããã®ã¨ã³ã³ã¼ãã£ã³ã°ãå¤æ´ããï¼ä¾ãã°ï¼
\verb+\fontencoding{JY3}+ ã¯åæãã©ã³ãã®ã¨ã³ã³ã¼ãã£ã³ã°ã
\texttt{JY3}ã«å¤æ´ãï¼\verb+\fontencoding{T1}+ ã¯æ¬§æãã©ã³ãå´ã
\texttt{T1}ã¸ã¨å¤æ´ããï¼\verb+\fontfamily+ ãå¼æ°ã«ããåæå´ï¼æ¬§æ
å´ï¼\emph{ãããã¯ä¸¡æ¹}ã®ãã©ã³ããã¡ããªãå¤æ´ããï¼è©³ç´°ã¯
- \ref{ssub-nfsspat}ç¯ãåç
§ãããã¨ï¼
+ \ref{ssec-nfsspat}ç¯ãåç
§ãããã¨ï¼
%
%<*en>
@@ -1004,18 +1039,18 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
\item åæãã©ã³ãã®ã·ã§ã¤ããå®ç¾©ããã«ã¯ï¼é常㮠\verb+\DeclareFontShape+ ã使ãã°è¯ãï¼
%
\begin{verbatim}
-\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis}{}
+\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis;-kern}{}
% Kozuka Mincho Pr6N Bold
\end{verbatim}
%<*ja>
ä»®åæ¸ä½ã使ãå ´åãªã©ï¼è¤æ°ã®åæãã©ã³ããçµã¿åããã¦ä½¿ãããå ´åã¯
\ref{ssec-altfont}ç¯ã® \verb+\ltjdeclarealtfont+ ã¨ï¼ãã®\LaTeX çã®\
-\verb+\DeclareAlternateKanjiFont+ï¼\ref{ssub-nfsspat}ç¯ï¼ãåç
§ããï¼
+\verb+\DeclareAlternateKanjiFont+ï¼\ref{ssec-nfsspat}ç¯ï¼ãåç
§ããï¼
%
\end{itemize}
%<*en>
-\paragraph{Remark: Japanese Characters in Math Mode}
+\paragraph{Remark: Japanese characters in math mode}
Since \pTeX\ supports Japanese characters in math mode, there are
sources like the following:
%
@@ -1078,38 +1113,47 @@ this chapter. For the method, please see Subsection~\ref{ssec-math}.
\label{ssec-fontspec}
%<*en>
To coexist with the \Pkg{fontspec} package, it is needed to load
-\Pkg{luatexja-fontspec} package in the preamble. This additional
-package automatically loads \Pkg{luatexja} and \Pkg{fontspec}
+\Pkg{luatexja-fontspec} package in the preamble, as follows:
+\begin{quote}
+\ttfamily \textbackslash usepackage[]\{luatexja-fontspec\}
+\end{quote}
+This \Pkg{luatexja-fontspec} package
+automatically loads \Pkg{luatexja} and \Pkg{fontspec}
package, if needed.
%
%<*ja>
-\Pkg{fontspec}ããã±ã¼ã¸ã¨åæ§ã®æ©è½ãåæãã©ã³ãã«å¯¾ãã¦ãç¨ããããã«ã¯ï¼
-\Pkg{luatexja-fontspec}ããã±ã¼ã¸ãããªã¢ã³ãã«ã§èªã¿è¾¼ãå¿
è¦ãããï¼ãã®ããã±ã¼ã¸
+\Pkg{fontspec}ããã±ã¼ã¸ã¨åæ§ã®æ©è½ãåæãã©ã³ãã«å¯¾ãã¦ãç¨ããå ´åï¼
+\Pkg{luatexja-fontspec}ããã±ã¼ã¸ãèªã¿è¾¼ãï¼
+\begin{quote}
+\ttfamily \textbackslash usepackage[]\{luatexja-fontspec\}
+\end{quote}
+ãã®ããã±ã¼ã¸
ã¯å¿
è¦ãªãã°èªåã§\Pkg{luatexja}ããã±ã¼ã¸ã¨\Pkg{fontspec}ããã±ã¼ã¸ãèªã¿è¾¼ãï¼
%
%<*en>
-In \Pkg{luatexja-fontspec} package, the following 7~commands are defined as
+In \Pkg{luatexja-fontspec} package, the following seven~commands are defined as
counterparts of original commands in the \Pkg{fontspec} package:
%
%<*ja>
\Pkg{luatexja-fontspec}ããã±ã¼ã¸ã§ã¯ï¼ä»¥ä¸ã®7ã¤ã®ã³ãã³ãã\Pkg{fontspec}
ããã±ã¼ã¸ã®å
ã®ã³ãã³ãã«å¯¾å¿ãããã®ã¨ãã¦å®ç¾©ãã¦ããï¼
%
-
%<*en>
\begin{center}\small
\begin{tabular}{ccccc}
\toprule
Japanese fonts
-&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
+&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\setmonojfont+$^*$\\
alphabetic fonts
-&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\newfontfamily+\\
+&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\setmonofont+\\
\midrule
Japanese fonts
-&\verb+\newjfontface+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
+&\verb+\newjfontfamily+&\verb+\newjfontface+
+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
alphabetic fonts
-&\verb+\newfontface+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
+&\verb+\newfontfamily+&\verb+\newfontface+
+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
\bottomrule
\end{tabular}
\end{center}
@@ -1136,6 +1180,45 @@ alphabetic fonts
\end{tabular}
\end{center}
%
+%<*en>
+The package option of \Pkg{luatexja-fontspec} are the followings:
+\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+ \item[match] If this option is specified, usual family-changing commands such as
+\verb+\rmfamily+,~\verb+\textrm+, \verb+\sffamily+,~\dots\ also change Japanese font family.
+
+Note that \emph{\texttt{\textup{\textbackslash setmonojfont}} is defined
+if and only if this \texttt{\textup{match}} option is specified}.
+
+ \item[pass=]
+Specify options which will be passed to the \Pkg{fontspec} package.
+\end{list}
+The reason that \verb+\setmonojfont+ is not defined by default is that
+it is popular for Japanese fonts that nearly all Japanese glyphs have same
+widths. Also note that kerning information in a font is not used
+(that is, \texttt{kern} feature is set off) by default in these seven (or~eight) commands.
+This is because of the compatibility with previous versions of \LuaTeX-ja
+(see \ref{para-kern}).
+%
+%<*ja>
+\Pkg{luatexja-fontspec} ããã±ã¼ã¸ã®ãªãã·ã§ã³ã¯ä»¥ä¸ã®éãã§ããï¼
+\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+ \item[match] ãã®ãªãã·ã§ã³ãæå®ãããã¨ï¼ã\pLaTeXe æ°ããã¥ã¡ã³ãã¯ã©ã¹ãã®ããã«\
+\verb+\rmfamily+, \verb+\textrm{...}+, \verb+\sffamily+ çã
+欧æãã©ã³ãã ãã§ãªãåæãã©ã³ããå¤æ´ããããã«ãªãï¼
+
+\emph{ãªãï¼{\tt \textbackslash setmonojfont} ã¯ãã® \texttt{match} ãªãã·ã§ã³ã
+æå®ãããæã®ã¿å®ç¾©ãããï¼}ãã®å½ä»¤ã¯æ¨æºã®ãã¿ã¤ãã©ã¤ã¿ä½ã«å¯¾å¿ããåæãã©ã³ãããæå®ããï¼
+
+ \item[pass=]
+\Pkg{fontspec} ããã±ã¼ã¸ã«æ¸¡ããªãã·ã§ã³ ãæå®ããï¼
+\end{list}
+æ¨æºã§ \verb+\setmonojfont+ ã³ãã³ããå®ç¾©ãããªãã®ã¯ï¼
+åæãã©ã³ãã§ã¯ã»ã¼å
¨ã¦ã®åææåã®ã°ãªããçå¹
ã§ããã®ãä¼çµ±çã§ãã£ããã¨ã«ããï¼
+ã¾ãï¼ãããã®åæç¨ã®ã³ãã³ãã§ã¯ãã©ã³ãå
ã®ãã¢ã«ã¼ãã³ã°æ
å ±ã¯æ¨æºã§ã¯ä½¿ç¨ãããªãï¼
+è¨ãæããã° \texttt{kern} featureã¯æ¨æºã§ã¯ç¡å¹åã¨ãªã£ã¦ããï¼
+ããã¯ä»¥åã®ãã¼ã¸ã§ã³ã®\LuaTeX-jaã¨ã®äºææ§ã®ããã§ããï¼\ref{para-kern}ç¯ãåç
§ï¼ï¼
+%
+
\begin{LTXexample}[width=0.4\textwidth]
\fontspec[Numbers=OldStyle]{LMSans10-Regular}
\jfontspec[CJKShape=NLC]{KozMinPr6N-Regular}
@@ -1145,20 +1228,6 @@ JIS~X~0213:2004âè¾»
JIS~X~0208:1990âè¾»
\end{LTXexample}
-%<*en>
-Note that there is no command named \verb+\setmonojfont+, since it is
-popular for Japanese fonts that nearly all Japanese glyphs have same
-widths. Also note that the kerning feature is set off by default in
-these 7~commands, since this feature and \textbf{JAglue} will clash (see
-\ref{para-kern}).
-%
-%<*ja>
-åæãã©ã³ãã«ã¤ãã¦ã¯å
¨ã¦ã®åææåã®ã°ãªããã»ã¼çå¹
ã§ããã®ãæ®éã§ããããï¼
-\verb+\setmonojfont+ ã³ãã³ãã¯åå¨ããªããã¨ã«æ³¨æï¼ã¾ãï¼ãããã®åæç¨ã®7ã¤ã®ã³ã
-ã³ãã§ã¯Kerning featureã¯ããã©ã«ãã§ã¯offã¨ãªã£ã¦ããï¼ããã¯ãã®
-featureã\textbf{JAglue}ã¨è¡çªããããã§ããï¼\ref{para-kern}ç¯ãåç
§ï¼ï¼
-%
-
%\subsection{Presets}
%\subsection{ããªã»ããè¨å®}
\label{ssec-preset}
@@ -1166,7 +1235,7 @@ featureã\textbf{JAglue}ã¨è¡çªããããã§ããï¼\ref{para-kern}ç¯ã
%<*en>
To use standard Japanese font settings easily, one can load \Pkg{luatexja-preset}
package with several options. This package provides functions in a part of
-\Pkg{otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato,
+\Pkg{japanese-otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato,
and loads \Pkg{luatexja-fontspec}, hence \Pkg{fontspec} internally.
If you need to pass some options to \Pkg{fontspec}, load \Pkg{fontspec} manually
@@ -1180,7 +1249,7 @@ before \Pkg{luatexja-preset}:
\Pkg{fontspec}ãèªã¿è¾¼ãã§ããï¼
ãã\Pkg{fontspec}ããã±ã¼ã¸ã«ä½ããã®ãªãã·ã§ã³ã渡ãå¿
è¦ããã
-\footnote{ä¾ãã°ï¼æ°å¼ãã©ã³ãã¾ã§ç½®æããã¦ãã¾ãï¼\texttt{\char92mathit}ã«ãã£ã¦ã®ãªã·ã£æåã®
+\footnote{ä¾ãã°ï¼æ°å¼ãã©ã³ãã¾ã§ç½®æããã¦ãã¾ãï¼\texttt{\textbackslash mathit}ã«ãã£ã¦ã®ãªã·ã£æåã®
æä½å¤§æåãåºãªããªãï¼ãªã©ï¼}å ´åã¯ï¼
次ã®ããã«\Pkg{luatexja-preset}ã®åã«\Pkg{fontspec}ãæåã§èªã¿ããã°è¯ãï¼
%
@@ -1209,7 +1278,7 @@ This means that \verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+ and
%<*en>
Use \textit{mincho} with two weights (medium~and~bold),
\textit{gothic} with three weights (medium, bold~and~heavy), and \textit{rounded gothic}%
-\footnote{Provided by \texttt{\char92mgfamily} and \texttt{\char92textmg\{...\}},
+\footnote{Provided by \texttt{\textbackslash mgfamily} and \texttt{\textbackslash textmg\{...\}},
because \textit{rounded gothic} is called \textit{maru gothic} (丸ã´ã·ãã¯) in Japanese.}.
The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+,
or \verb+\textgteb{...}+.
@@ -1226,7 +1295,7 @@ bold (\verb+\bfseries+).
%
\item[expert]
%<*en>
-Use horizontal kana alternates, and define a control sequence \verb+\rubyfamily+ to use kana
+Use horizontal kana alternates, and define a command \verb+\rubyfamily+ to use kana
characters designed for ruby.
%
%横çµå°ç¨ä»®åãç¨ããï¼ã¾ãï¼\verb+\rubyfamily+ ã§ã«ãç¨ä»®åã使ç¨å¯è½ã¨ãªãï¼
@@ -1260,7 +1329,7 @@ We didn't taken account of when both \texttt{90jis} and \texttt{jis2004} are sp
åæã«æå®ãããå ´åã®åä½ã«ã¤ãã¦ã¯å
¨ãèæ
®ãã¦ããªãï¼
%
-%\paragraph{Presets for multi weight settings}
+%\paragraph{Presets for multi weight}
%\paragraph{å¤ã¦ã§ã¤ãç¨ããªã»ããã®ä¸è¦§}
%<*en>
Besides \texttt{morisawa-pro}~and~\texttt{morisawa-pr6n} presets,
@@ -1387,7 +1456,7 @@ Std/StdNãã©ã³ãã§ããï¼ãã®ä»ã¯Adobe-Japan1-5対å¿ã§ããï¼
\midrule
%\textit{rounded gothic}
%\gt 丸ã´ã·ãã¯
-&&A-OTF-Jun101Pro-Light.otf&A-OTF-Jun101Pr6N-Light.otf\\
+&&A-OTF-Jun101Pro-Light.otf&A-OTF-ShinMGoPr6N-Light.otf\\
\bottomrule
\end{tabular}
\end{center}
@@ -1515,7 +1584,7 @@ We can use HG~fonts bundled with Microsoft~Office for realizing multiple weights
\end{tabular}\par\medskip}
%<*en>
-Note that HG~Mincho~E, HG~Gothic~E, HG Soei Kaku Gothic UB and HG Maru Gothic PRO
+Note that HG~Mincho~E, HG~Gothic~E, HG Soei Kaku Gothic UB, and HG Maru Gothic PRO
are internally specified by:
\begin{description}
\item[default] by font name (\texttt{HGMinchoE}, etc.).
@@ -1537,15 +1606,15 @@ are internally specified by:
%<*en>
-\subsection{\texttt{\char`\\CID}, \texttt{\char`\\UTF} and macros in \Pkg{otf} package}
-Under \pLaTeX, \Pkg{otf} package (developed by Shuzaburo Saito) is
+\subsection{\texttt{\textbackslash CID}, \texttt{\textbackslash UTF}, and macros in \Pkg{japanese-otf} package}
+Under \pLaTeX, \Pkg{japanese-otf} package (developed by Shuzaburo Saito) is
used for typesetting characters which is in Adobe-Japan1-6 CID but not
in JIS~X~0208. Since this package is widely used, \LuaTeX-ja
-supports some of functions in \Pkg{otf} package.
+supports some of functions in \Pkg{japanese-otf} package.
If you want to use these functions, load \Pkg{luatexja-otf} package.
%
%<*ja>
-\subsection{\texttt{\char`\\CID}, \texttt{\char`\\UTF}ã¨\Pkg{otf}ããã±ã¼ã¸ã®ãã¯ã}
+\subsection{\texttt{\textbackslash CID}, \texttt{\textbackslash UTF}ã¨\Pkg{otf}ããã±ã¼ã¸ã®ãã¯ã}
\pLaTeX ã§ã¯ï¼JIS~X~0208ã«ãªãAdobe-Japan1-6ã®æåãåºåããããã«ï¼
é½è¤ä¿®ä¸éæ°ã«ãã\Pkg{otf}ããã±ã¼ã¸ãç¨ãããã¦ããï¼ãã®ããã±ã¼ã¸ã¯
åºãç¨ãããã¦ããããï¼\LuaTeX-jaã«ããã¦ã\Pkg{otf}ããã±ã¼ã¸ã®æ©è½ã®
@@ -1577,7 +1646,7 @@ If you want to use these functions, load \Pkg{luatexja-otf} package.
ããã3ãªãã·ã§ã³ã«ã¤ãã¦ã¯ï¼
\Pkg{luatexja-preset} ããã±ã¼ã¸ã«ããªã»ããã使ãæã«ä¸ç·ã«æå®ãããï¼
-ãããã¯å¯¾å¿ããå
容ã\ref{ssub-chgfnt}ç¯ (NFSS2) ã
+ãããã¯å¯¾å¿ããå
容ã\ref{ssec-chgfnt}ç¯ï¼\ref{ssec-nfsspat}ç¯ (NFSS2) ã
\ref{ssec-fontspec}ç¯ (\Pkg{fontspec}) ã®æ¹æ³ã§æåã§æå®ããå¿
è¦ãããï¼
%
@@ -1599,18 +1668,20 @@ parameters, you have to use commands \verb+\ltjsetparameter+ and
ç¨ããï¼
%
-%\subsection{Editing the range of \textbf{JAchar}s}
+%\subsection{Editing the Range of \textbf{JAchar}s}
%\subsection{\textbf{JAchar}ã®ç¯å²ã®è¨å®}
\label{ssec-setrange}
%<*en>
-\LuaTeX-ja divides the Unicode codespace into \emph{character ranges},
-numbered 1 to 216. The grouping can be (globally) customized by \verb+\ltjdefcharrange+.
+\LuaTeX-ja divides the Unicode codespace \texttt{U+0080}--\texttt{U+10FFFF}
+into \emph{character ranges},
+numbered 1 to 217. The grouping can be (globally) customized by \verb+\ltjdefcharrange+.
The next line adds whole characters in Supplementary Ideographic Plane
and the character ``æ¼¢'' to the character range~100.
%
%<*ja>
-\LuaTeX-jaã¯ï¼Unicodeå
¨ä½ã®ç©ºéã1çªãã216çªã¾ã§ã®\emph{æåç¯å²}ã«åå²ãã¦ããï¼
+\LuaTeX-jaã¯ï¼Unicodeã® \texttt{U+0080}--\texttt{U+10FFFF} ã®ç©ºéã
+1çªãã217çªã¾ã§ã®\emph{æåç¯å²}ã«åå²ãã¦ããï¼
åºåã㯠\verb+\ltjdefcharrange+ ãç¨ãããã¨ã§ï¼ã°ãã¼ãã«ã«ï¼å¤æ´ãããã¨ãã§ãï¼
ä¾ãã°ï¼æ¬¡ã¯è¿½å æ¼¢åé¢(SIP)ã«ããå
¨ã¦ã®æåã¨ãæ¼¢ããã100çªã®æåç¯å²ãã«è¿½å ããï¼
%
@@ -1635,8 +1706,8 @@ This can be edited by setting the \textsf{jacharrange} parameter.
For example, this is just the default setting of \LuaTeX-ja, and
it sets
\begin{itemize}
- \item a character which belongs character ranges 1, 4~and~5 is \textbf{ALchar},
- \item a character which belongs character ranges 2,~3, 6, 7~and~8 is \textbf{JAchar}.
+ \item a character which belongs character ranges 1,~4, and~5 is \textbf{ALchar},
+ \item a character which belongs character ranges 2,~3, 6, 7, and~8 is \textbf{JAchar}.
\end{itemize}
%
%<*ja>
@@ -1653,8 +1724,9 @@ it sets
\end{verbatim}
%<*en>
The argument to \textsf{jacharrange} parameter is a list of non-zero integer.
-Negative integer $-n$ in the list means that ``each character in the range~$n$ is a \textbf{ALchar}'', and positive integer $+n$ means
-that ``\dots\ is a \textbf{JAchar}''.
+Negative integer $-n$ in the list means that ``each character in the range~$n$ is an
+\textbf{ALchar}'',
+and positive integer $+n$ meansthat ``\dots\ is a \textbf{JAchar}''.
%
%<*ja>
\textsf{jacharrange}ãã©ã¡ã¼ã¿ã®å¼æ°ã¯éé¶ã®æ´æ°ã®ãªã¹ãã§ããï¼
@@ -1663,7 +1735,7 @@ that ``\dots\ is a \textbf{JAchar}''.
%
%<*en>
-\paragraph{Default Setting}
+\paragraph{Default setting}
\LuaTeX-ja predefines eight character ranges for convenience. They are
determined from the following data:
%
@@ -1682,15 +1754,18 @@ determined from the following data:
\end{itemize}
%<*en>
-Now we describe these eight ranges. The alphabet ``J'' or ``A'' after the
+Now we describe these eight ranges. The superscript ``J'' or ``A'' after the
number shows whether each character in the range is treated as
\textbf{JAchar}s or not by default. These settings are similar to the
\texttt{prefercjk} settings defined in \texttt{PXbase} bundle.
+Any characters above \texttt{U+0080} which does not belong to
+these eight ranges belongs to the character range~217.
%
%<*ja>
-以ä¸ã§ã¯ããã8ã¤ã®æåç¯å²ã«ã¤ãã¦è¨è¿°ããï¼çªå·ã®ãã¨ã®ã¢ã«ãã¡ããããJããAã
-ã¯ï¼ãã®æåç¯å²å
ã®æåã°\textbf{JAchar}ã\textbf{ALchar}ãã表ãã¦ããï¼ãããã®è¨å®ã¯
+以ä¸ã§ã¯ããã8ã¤ã®æåç¯å²ã«ã¤ãã¦è¨è¿°ããï¼æ·»åã®ã¢ã«ãã¡ããããJããAã
+ã¯ï¼ãã®æåç¯å²å
ã®æåã\textbf{JAchar}ã\textbf{ALchar}ãã表ãã¦ããï¼ãããã®è¨å®ã¯
\texttt{PXbase}ãã³ãã«ã§å®ç¾©ããã¦ãã\texttt{prefercjk}ã¨é¡ä¼¼ã®ãã®ã§ããï¼
+ãªãï¼\texttt{U+0080} 以éã§ããã8ã¤ã®æåç¯å²ã«å±ããªãæåã¯ï¼217çªã®æåç¯å²ã«å±ãããã¨ã«ãªã£ã¦ããï¼
%
\begin{description}
%<*en>
@@ -1833,7 +1908,8 @@ This range consists of the following Unicode ranges, \emph{except characters in
"FE10--"FE1F&Vertical Forms&
"FE30--"FE4F&CJK Compatibility Forms\\
"FE50--"FE6F&Small Form Variants&
-"{20}000--"{2F}FFF&(Supplementary Ideographic Plane)
+"{20}000--"{2F}FFF&(Supplementary Ideographic Plane)\\
+"{E0}100--"{E0}1EF&Variation Selectors Supplement
\end{tabular}
\end{table}
%<*en>
@@ -1903,8 +1979,8 @@ The block list is indicated in Table~\ref{table-rng7}.
%<*en>
The value (a skip) of \Param{\hyperlink{fld:kanjiskip}{kanjiskip}} or
\Param{\hyperlink{fld:xks}{xkanjiskip}} can be changed as the following.
-Note that only their values \emph{at the end of a paragraph or a horizontal box are
-adopted in the whole paragraph or the whole horizontal box.
+Note that only their values \emph{at the end of a paragraph or a hbox are
+adopted in the whole paragraph or the whole hbox.
}
%
%<*ja>
@@ -1915,8 +1991,11 @@ adopted in the whole paragraph or the whole horizontal box.
\ltjsetparameter{kanjiskip={0pt plus 0.4pt minus 0.4pt},
xkanjiskip={0.25\zw plus 1pt minus 1pt}}
\end{lstlisting}
-
%<*en>
+Here \verb+\zw+ is a internal dimension
+which stores fullwidth of the current Japanese font.
+This \verb+\zw+ can be used as the unit \texttt{zw} in \pTeX.
+
It may occur that JFM contains the data of ``ideal width of
\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}''
and/or ``ideal width of \Param{\hyperlink{fld:xks}{xkanjiskip}}''.
@@ -1924,6 +2003,9 @@ To use these data from JFM, set the value of \Param{\hyperlink{fld:kanjiskip}{ka
\Param{\hyperlink{fld:xks}{xkanjiskip}} to \verb+\maxdimen+.
%
%<*ja>
+ããã§ï¼\verb+\zw+ ã¯ç¾å¨ã®åæãã©ã³ãã®å
¨è§å¹
ã表ãé·ãã§ããï¼
+\pTeX ã«ãããé·ãåä½ \texttt{zw} ã¨åãããã«ä½¿ç¨ã§ããï¼
+
JFMã¯ãæã¾ãã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®å¤ãã
ãæã¾ãã\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®å¤ããæã£ã¦ãããã¨ãããï¼
ãããã®ãã¼ã¿ã使ãããã«ã¯ï¼\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã%
@@ -1937,7 +2019,7 @@ JFMã¯ãæã¾ãã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®å¤ãã
It is not desirable that \Param{\hyperlink{fld:xks}{xkanjiskip}} is inserted into every
boundary between \textbf{JAchar}s and \textbf{ALchar}s. For example,
\Param{\hyperlink{fld:xks}{xkanjiskip}} should not be inserted after opening parenthesis
-(\textit{e.g.}, compare ``(ã'' and ``(\hskip\ltjgetparameter{xkanjiskip}ã').
+(\textit{e.g.}, compare ``(ã'' and ``(\hskip\ltjgetparameter{xkanjiskip}ã'').
\LuaTeX-ja can control whether \Param{\hyperlink{fld:xks}{xkanjiskip}} can be inserted
before/after a character, by changing \Param{jaxspmode} for \textbf{JAchar}s and
\Param{alxspmode} parameters \textbf{ALchar}s respectively.
@@ -1957,10 +2039,9 @@ pãq ã!ã
\end{LTXexample}
%<*en>
-The second argument \texttt{preonly} means ``the insertion of
-\Param{\hyperlink{fld:xks}{xkanjiskip}} is allowed before this character, but not after''.
-the other possible values are \texttt{postonly}, \texttt{allow} and \texttt{
-inhibit}.
+The second argument \texttt{preonly} means that the insertion of
+\Param{\hyperlink{fld:xks}{xkanjiskip}} is allowed before this character, but not after.
+the other possible values are \texttt{postonly}, \texttt{allow}, and \texttt{inhibit}.
%
%<*ja>
2ã¤ç®ã®å¼æ°ã® \texttt{preonly}ã¯ã\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥ã¯ãã®æåã®
@@ -1970,7 +2051,7 @@ inhibit}.
%<*en>
\Param{jaxspmode} and \Param{alxspmode} use a same table to store the parameters
-on the current version. Therefore, line 1 in the code above can be rewritten
+on the current version. Therefore, line~1 in the code above can be rewritten
as follows:
%
%<*ja>
@@ -1999,7 +2080,7 @@ parameters to \texttt{true}/\texttt{false}, respectively.
\texttt{true}/\texttt{false}ã«è¨å®ããã°ããï¼
%
-%\subsection{Shifting Baseline}
+%\subsection{Shifting the baseline}
%\subsection{ãã¼ã¹ã©ã¤ã³ã®ç§»å}
%<*en>
To make a match between a Japanese font and an alphabetic font, sometimes
@@ -2037,12 +2118,12 @@ Here the horizontal line in above is the baseline of a line.
%<*en>
There is an interesting side-effect: characters in different size can be
-vertically aligned center in a line, by setting two parameters appropriately.
+``vertically aligned center'' in a line, by setting two parameters appropriately.
The following is an example (beware the value is not well tuned):
%
%<*ja>
ãã®æ©è½ã«ã¯é¢ç½ã使ãæ¹ãããï¼2ã¤ã®ãã©ã¡ã¼ã¿ãé©åã«è¨å®ãããã¨ã§ï¼ãµã¤ãºã®
-ç°ãªãæåãä¸å¿ç·ã«æãããã¨ãã§ããï¼
+ç°ãªãæåããä¸å¿ç·ãã«æãããã¨ãã§ããï¼
以ä¸ã¯ä¸ã¤ã®ä¾ã§ããï¼å¤ã¯ãã¾ã調æ´ããã¦ããªããã¨ã«æ³¨æï¼ï¼
%
\begin{LTXexample}
@@ -2054,6 +2135,33 @@ xyzæ¼¢å
}abcããª
\end{LTXexample}
+%<*en>
+Note that setting a positive value to \Param{yalbaselineshift} does not
+increase the depth of \textbf{ALchar}, as shown below.
+This is because \Param{yalbaselineshift} is implemented by setting \verb+xoffset+
+field of a glyph node, and this does not increase the depth of the glyph.
+This problem does not apply for \Param{yjabaselineshift}, since
+\Param{yjabaselineshift} uses a different implementation method.
+%
+%<*ja>
+ãªãï¼\Param{yalbaselineshift}ãã©ã¡ã¼ã¿ã«æ£ã®å¤ãæå®ãã¦ãï¼
+ä¸ã®ä¾ã®ããã«\textbf{ALchar}ã®æ·±ãã¯å¢å ããªããã¨ã«æ³¨æï¼
+\Param{yjabaselineshift}ãã©ã¡ã¼ã¿ã¯å¥ã®æ¹æ³ã使ã£ã¦å®è£
ãã¦ããã®ã§ï¼
+ãã®ãããªåé¡ã¯èµ·ãããªãï¼
+%
+\begin{LTXexample}[width=.3\textwidth]
+\leavevmode\fboxsep=0pt
+ \ltjsetparameter{yjabaselineshift=0pt,
+ yalbaselineshift=0pt}
+\vrule width 105pt height 0.4pt depth 0pt \hskip-95pt
+\fbox{\ltjsetparameter{yalbaselineshift=10pt}ãããxyz}
+\fbox{\ltjsetparameter{yalbaselineshift=-10pt}ãããxyz}\\
+\vrule width 105pt height 0.4pt depth 0pt \hskip-95pt
+\fbox{\ltjsetparameter{yjabaselineshift=10pt}ãããxyz}
+\fbox{\ltjsetparameter{yjabaselineshift=-10pt}ãããxyz}
+\end{LTXexample}
+
+
%<*ja>
\paragraph{æ°å¼ã«ãããæåï¼\pTeX ã¨ã®éã}
@@ -2108,25 +2216,42 @@ $\Phi\vdash F(x)\ \hbox{for all}\ x\in A$
\label{part-ref}
%<*ja>
-\section{\LuaTeX-jaã«ããã \texttt{\char92catcode}}
-\subsection{äºåç¥èï¼\pTeX ã¨\upTeX ã«ããã \texttt{\char92kcatcode}}
+\section{\LuaTeX-jaã«ããã \texttt{\textbackslash catcode}}
+\subsection{äºåç¥èï¼\pTeX ã¨\upTeX ã«ããã \texttt{\textbackslash kcatcode}}
\pTeXï¼\upTeX ã«ããã¦ã¯ï¼åææåãå¶å¾¡ç¶´å
ã§å©ç¨ã§ãããã©ãã
㯠\verb+\kcatcode+ ã®å¤ã«ãã£ã¦æ±ºå®ãããã®ã§ãã£ãï¼
-\verb+\kcatcode+ ã®å¤ã«ãã£ã¦ã©ã®ããã«å¤ãããã¯è¡¨\ref{table-kcat}ãåç
§ããããï¼
+詳細ã¯è¡¨\ref{table-kcat}ãåç
§ããããï¼
+%
+%<*en>
+\section{\texttt{\textbackslash catcode} in \LuaTeX-ja}
+\subsection{Preliminaries: \texttt{\textbackslash kcatcode} in \pTeX\ and \upTeX}
+In \pTeX~and~\upTeX, the value of \verb+\kcatcode+ determines
+whether a Japanese character can be used in a control word.
+For the detail, see Table~\ref{table-kcat}.
+%
\begin{table}[t]
\small
-\caption{\texttt{\char92kcatcode} in \upTeX}
+\caption{\texttt{\textbackslash kcatcode} in \upTeX}
\label{table-kcat}
+%\medskip
\noindent\hfill
\begin{tabular}{ccccc}
\toprule
\bfseries \verb+\kcatcode+&
+%<*en>
+\bfseries meaning&
+\bfseries control word&
+\bfseries widow penalty\hbox{}$^*$&
+\bfseries linebreak\\
+%
+%<*ja>
\bfseries æå³&
\bfseries å¶å¾¡ç¶´ä¸ã«ä½¿ç¨&
\bfseries æåã¦ã£ãã¦å¦ç\hbox{}$^*$&
\bfseries ç´å¾ã§ã®æ¹è¡\\
+%
\midrule
15&non-cjk&\multicolumn{3}{c}{(treated as usual \LaTeX)}\\
16&kanji&Y&Y&ignored\\
@@ -2138,19 +2263,52 @@ $\Phi\vdash F(x)\ \hbox{for all}\ x\in A$
\medskip
+%<*ja>
æåã¦ã£ãã¦å¦ç\hbox{}$^*$: ãæ¼¢åãä¸æåã ã次ã®è¡ã«è¡ãã®ãé²ãã\
-\texttt{\char`\\jcharwidowpenalty} ãï¼
+\texttt{\textbackslash jcharwidowpenalty} ãï¼
ãã®æåã®ç´åã«æ¿å
¥ãããããå¦ãï¼ã示ãï¼
+%
\end{table}
+%<*en>
+\verb+\kcatcode+ can be set by a row of JIS~X~0208 in \pTeX,
+and generally by a Unicode block\footnote{%
+ \upTeX\ divides \texttt{U+FF00}--\texttt{U+FFEF} (Halfwidth and Fullwidth Forms)
+ into three subblocks, and \texttt{\textbackslash kcatcode} can be set by a subblock.
+}
+in \upTeX. So characters which can be used in a control word
+slightly differ between \pTeX~and~\upTeX.
+%
+%<*ja>
\pTeX ã§ã¯ \verb+\kcatcode+ ã¯JIS~X~0208ã®åºåä½ï¼
\upTeX ã§ã¯æ¦ãUnicodeãããã¯åä½\footnote{%
\texttt{U+FF00}--\texttt{U+FFEF} (Halfwidth and Fullwidth Forms)ã¯
ãå
¨è§è±æ°åããåè§ã«ããããã®ä»ãã¨3ã¤ã«åå²ããã¦ããï¼
- ããããå¥ã
ã« \texttt{\char92kcatcode} ãæå®ã§ããããã«ãªã£ã¦ããï¼
+ ããããå¥ã
ã« \texttt{\textbackslash kcatcode} ãæå®ã§ããããã«ãªã£ã¦ããï¼
}ã§è¨å®å¯è½ã«ãªã£ã¦ããï¼ãã®ããï¼\pTeX ã¨\upTeX ã®åæç¶æ
ã§ã¯
å¶å¾¡ç¶´å
ã§ä½¿ç¨å¯è½ãªæåãå¾®å¦ã«ç°ãªã£ã¦ããï¼
+%
+%<*en>
+\subsection{Case of \LuaTeX-ja}
+The role of \verb+\kcatcode+ in \pTeX~and~\upTeX\ caan be
+divided into the following four kinds,
+and \LuaTeX-ja can control these four kinds separately:
+\begin{itemize}
+ \item
+\emph{Distinction between \textbf{JAchar} or \textbf{ALchar}}
+is controlled by using the character range, see Subsection~\ref{ssec-setrange}.
+ \item
+\emph{Whether the character can be used in a control word}
+is controlled by setting \verb+\catcode+ to 11~(enabled) or 12~(disabled), as usual.
+ \item
+\emph{Whether \Param{jcharwidowpenalty} can be inserted before the character}
+is controlled by the lowermost bit of the \Param{kcatcode} parameter.
+ \item
+\emph{Ignoring linebreak after a \textbf{JAchar}} is always ignored.
+\end{itemize}
+%
+%<*ja>
\subsection{\LuaTeX-jaã®å ´å}
\LuaTeX-jaã§ã¯ï¼å¾æ¥ã®\pTeXã»\upTeX ã«ããã \verb+\kcatcode+ ã®å½¹å²ã
åå²ãã¦ããï¼
@@ -2161,11 +2319,37 @@ $\Phi\vdash F(x)\ \hbox{for all}\ x\in A$
\LuaTeX èªèº«ã® \verb+\catcode+ ã§ãã
\item[\Param{jcharwidowpenalty}ãæ¿å
¥å¯ã]
\Param{kcatcode}ãã©ã¡ã¼ã¿ã®æä¸ä½ããã
- \item[æ¹è¡ãã¹ãã¼ã¹ã¨èªèããã]
+ \item[ç´å¾ã®æ¹è¡ã®ç¡è¦]
æ¥æ¬èªããæ³å®ãã¦ããªãã®ã§\textbf{JAchar}ã«ã¤ãã¦ã¯ä¸å¾æå¹
\end{description}
+%
+%<*en>
+Default setting of \verb+\catcode+ of \LuaTeX\ can be found
+in \texttt{luatex-unicode-letters.tex},
+which is based on \texttt{unicode-letters.tex} (for \XeTeX).
+However, the default setting of \verb+\catcode+ differs
+between \XeTeX\ and \LuaTeX, by the following reasons:
+\begin{itemize}
+ \item \texttt{luatex-unicode-letters.tex} is based on old \texttt{unicode-letters.tex}.
+ \item The latter half of \texttt{unicode-letters.tex} sets
+\verb+\catcode+ of Kanji and kana characters to 11,
+via setting \verb+\XeTeXcharclass+.
+
+However, this latter half is simply omitted in
+\texttt{luatex-unicode-letters.tex}, hence
+\verb+\catcode+ of Kanji and kana characters remains 12 in \LuaTeX.
+\end{itemize}
+In other words, Kanji nor kana characters cannot be used in
+a control word, in the default setting of \LuaTeX.
+This would be inconvenient for \pTeX~users to shifting to \LuaTeX-ja,
+since several control words containing Kanji, such as \verb+\西æ¦+,
+are used in \pTeX.
+Hence, \LuaTeX-ja have a counterpart of \texttt{unicode-letters.tex}
+for \LuaTeX, \emph{to match the \texttt{\textbackslash catcode} setting with that of \XeTeX.}
+%
+%<*ja>
ãã¤ãã£ãã«Unicodeå
¨é¨ã®æåãæ±ãã\XeTeX ã\LuaTeX ã§ã¯ï¼
æåãå¶å¾¡ç¶´å
ã§ä½¿ç¨ã§ãããã¯é常ã®æ¬§ææåã¨åãã \verb+\catcode+
ã§æå®ãããã¨ã¨ãªãï¼\XeTeX ã«ããã \verb+\catcode+ ã®åæè¨å®ã¯\
@@ -2191,64 +2375,86 @@ $\Phi\vdash F(x)\ \hbox{for all}\ x\in A$
\LuaTeX-jaã¸ã®ç§»è¡ã§æéãçããï¼ãã®ããï¼\LuaTeX-jaã§ã¯
\texttt{unicode-letters.tex} ã®å¾åé¨ã«ãããå
容ãèªåã§ããããï¼
çµæã¨ãã¦\textbf{\XeTeX ã«ãããåæè¨å®ã¨åãã«ãªãããã«ãã¦ããï¼}
+%
\begin{table}
\centering\small
-\caption{å¶å¾¡ç¶´ä¸ã«ä½¿ç¨åºæ¥ãJIS~X~0208éæ¼¢åã®éã}
+%\caption{Difference of the set of non-kanji JIS~X~0208 characters which can be used in a control word}
+%\caption{å¶å¾¡ç¶´ä¸ã«ä½¿ç¨åºæ¥ãJIS~X~0208éæ¼¢åã®éã}
+%\medskip
\label{table-kcat-diff}
\def\D#1#2#3#4{%
{\fboxsep0pt\fcolorbox{cyan}{white}%
{\large\char"#1#2#3#4}}\ (\texttt{U+#1#2#3#4})} %"
\leavevmode\hbox to 0pt{\hss\begin{tabular}{cccccc}
\toprule
-&\bf åº&\bf ç¹&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
+%&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
+%&\bf åº&\bf ç¹&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
\midrule
-\D 3000&1&1&Ã&Ã&â¯\\
-\D 30FB&1&6&Ã&â¯&Ã\\
-\D 309B&1&11&Ã&â¯&Ã\\
-\D 309C&1&12&Ã&â¯&Ã\\
-\D FF40&1&14&Ã&Ã&â¯\\
-\D FF3E&1&16&Ã&Ã&â¯\\
-\D FFE3&1&17&Ã&Ã&â¯\\
-\D FF3F&1&18&Ã&Ã&â¯\\
-\D 30FD&1&19&Ã&â¯&â¯\\
-\D 30FE&1&20&Ã&â¯&â¯\\
-\D 309D&1&21&Ã&â¯&â¯\\
-\D 309E&1&22&Ã&â¯&â¯\\
-\D 3003&1&23&Ã&Ã&â¯\\
-\D 4EDD&1&24&Ã&â¯&â¯\\
-\D 3005&1&25&Ã&Ã&â¯\\
-\D 3006&1&26&Ã&Ã&â¯\\
-\D 3007&1&27&Ã&Ã&â¯\\
-\D 30FC&1&28&Ã&â¯&â¯\\
+\D 3000&1&1&N&N&Y\\
+\D 30FB&1&6&N&Y&N\\
+\D 309B&1&11&N&Y&N\\
+\D 309C&1&12&N&Y&N\\
+\D FF40&1&14&N&N&Y\\
+\D FF3E&1&16&N&N&Y\\
+\D FFE3&1&17&N&N&Y\\
+\D FF3F&1&18&N&N&Y\\
+\D 30FD&1&19&N&Y&Y\\
+\D 30FE&1&20&N&Y&Y\\
+\D 309D&1&21&N&Y&Y\\
+\D 309E&1&22&N&Y&Y\\
+\D 3003&1&23&N&N&Y\\
+\D 4EDD&1&24&N&Y&Y\\
+\D 3005&1&25&N&N&Y\\
+\D 3006&1&26&N&N&Y\\
+\D 3007&1&27&N&N&Y\\
+\D 30FC&1&28&N&Y&Y\\
\bottomrule
\end{tabular}\qquad
\begin{tabular}{cccccc}
\toprule
-&\bf åº&\bf ç¹&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
+%&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
+%&\bf åº&\bf ç¹&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
\midrule
-\D FF0F&1&31&Ã&Ã&â¯\\
-\D FF3C&1&32&Ã&Ã&â¯\\
-\D FF5C&1&35&Ã&Ã&â¯\\
-\D FF0B&1&60&Ã&Ã&â¯\\
-\D FF1D&1&65&Ã&Ã&â¯\\
-\D FF1C&1&67&Ã&Ã&â¯\\
-\D FF1E&1&68&Ã&Ã&â¯\\
-\D FF03&1&84&Ã&Ã&â¯\\
-\D FF06&1&85&Ã&Ã&â¯\\
-\D FF0A&1&86&Ã&Ã&â¯\\
-\D FF20&1&87&Ã&Ã&â¯\\
-\D 3012&2&9&Ã&Ã&â¯\\
-\D 3013&2&14&Ã&Ã&â¯\\
-\D FFE2&2&44&Ã&Ã&â¯\\
-\D 212B&2&82&Ã&Ã&â¯\\
-\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}ã®ãªã·ã£æåï¼6åºï¼}&â¯&Ã&â¯\\
-\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}ããªã«æåï¼7åºï¼}&Ã&Ã&â¯\\
+\D FF0F&1&31&N&N&Y\\
+\D FF3C&1&32&N&N&Y\\
+\D FF5C&1&35&N&N&Y\\
+\D FF0B&1&60&N&N&Y\\
+\D FF1D&1&65&N&N&Y\\
+\D FF1C&1&67&N&N&Y\\
+\D FF1E&1&68&N&N&Y\\
+\D FF03&1&84&N&N&Y\\
+\D FF06&1&85&N&N&Y\\
+\D FF0A&1&86&N&N&Y\\
+\D FF20&1&87&N&N&Y\\
+\D 3012&2&9&N&N&Y\\
+\D 3013&2&14&N&N&Y\\
+\D FFE2&2&44&N&N&Y\\
+\D 212B&2&82&N&N&Y\\
+%\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}Greek letters (row 6)}&Y&N&Y\\
+%\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}Cyrillic letters (row 7)}&N&N&Y\\
+%\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}ã®ãªã·ã£æåï¼6åºï¼}&Y&N&Y\\
+%\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}ããªã«æåï¼7åºï¼}&N&N&Y\\
$\vphantom{\D 3000}$\\
\bottomrule
\end{tabular}\hss}\par
\end{table}
+%<*en>
+\subsection{Non-kanji Characters in a Control Word}
+Because the engine differ, so non-kanji JIS~X~0208 characters
+which can be used in a control word differ in \pTeX, in \upTeX,~and~in \LuaTeX-ja.
+Table~\ref{table-kcat-diff} shows the difference.
+Except for four characters ``ã»'',~``ã'', ``ã'',~``ã '',
+\LuaTeX-ja admits more characters in a control word than \upTeX.
+\emph{Note that the ideographic space~\texttt{U+3000} can be used
+in a control word in \LuaTeX-ja.}
+
+Difference becomes larger, if we consider
+non-kanji JIS~X~0213 characters.
+For the detail, see \url{https://github.com/h-kitagawa/kct}.
+%
+%<*ja>
\subsection{å¶å¾¡ç¶´ä¸ã«ä½¿ç¨åºæ¥ãJISéæ¼¢åã®éã}
ã¨ã³ã¸ã³ãç°ãªãã®ã§ï¼\pTeX, \upTeX, \LuaTeX-ja
@@ -2267,8 +2473,8 @@ JIS~X~0213ã®ç¯å²ã«åºããã¨ï¼å·®ç°ã¯ããã«å¤§ãããªãï¼
%\section{Font Metric and Japanese Font}
%\section{ãã©ã³ãã¡ããªãã¯ã¨åæãã©ã³ã}
-%\subsection{\texttt{\char92jfont}}
-%\subsection{\texttt{\char92jfont} å½ä»¤}
+%\subsection{\texttt{\textbackslash jfont}}
+%\subsection{\texttt{\textbackslash jfont} å½ä»¤}
\label{ssec-jfont}
%<*en>
@@ -2295,15 +2501,16 @@ TrueType/OpenTypeãã©ã³ãã«featureãæå®ãããã®ãåæãã©ã³
%<*en>
Note that the defined control sequence
(\verb+\tradgt+ in the example above) using \verb+\jfont+ is not a
-\textit{font\_def} token, hence the input like \verb+\fontname\tradgt+
+\textit{font\_def} token, but a macro.
+Hence the input like \verb+\fontname\tradgt+
causes a error. We denote control sequences which are defined in
\verb+\jfont+ by .
%
%<*ja>
-ãªãï¼\verb+\jfont+ ã§å®ç¾©ãããã³ã³ããã¼ã«ã·ã¼ã±ã³ã¹ï¼ä¸ã®ä¾ã 㨠\verb+\tradgt+ï¼
-ã¯\textit{font\_def}ãã¼ã¯ã³ã§ã¯ãªãã®ã§ï¼\verb+\fontname\tradgt+ ã®ãããª
-å
¥åã¯ã¨ã©ã¼ã¨ãªããã¨ã«æ³¨æããï¼ä»¥ä¸ã§ã¯ \verb+\jfont+ ã§å®ç¾©ããã
-ã³ã³ããã¼ã«ã·ã¼ã±ã³ã¹ãã§è¡¨ãï¼
+ãªãï¼\verb+\jfont+ ã§å®ç¾©ãããå¶å¾¡ç¶´ï¼ä¸ã®ä¾ã 㨠\verb+\tradgt+ï¼
+ã¯\textit{font\_def}ãã¼ã¯ã³ã§ã¯ãªããã¯ãã§ããï¼å¾ã£ã¦ï¼\verb+\fontname\tradgt+ ã®ãããª
+å
¥åã¯ã¨ã©ã¼ã¨ãªãï¼ä»¥ä¸ã§ã¯ \verb+\jfont+ ã§å®ç¾©ããã
+å¶å¾¡ç¶´ãã§è¡¨ãï¼
%
\paragraph{JFM}
@@ -2316,11 +2523,49 @@ which JFM will be used for this font by the following keys:
%
%<*ja>
ãã¯ããã«ãã®ç¯ã§è¿°ã¹ãããã«ï¼JFMã¯æåã¨åæçµçã§èªåçã«æ¿å
¥ããã
-ã°ã«ã¼ï¼ã«ã¼ã³ã®å¯¸æ³æ
å ±ãæã£ã¦ããï¼JFMã®æ§é ã¯æ¬¡ã®å°ç¯ã§è¿°ã¹ãï¼
+ã°ã«ã¼ï¼ã«ã¼ã³ã®å¯¸æ³æ
å ±ãæã£ã¦ããï¼JFMã®æ§é ã¯æ¬¡ã®ç¯ã§è¿°ã¹ãï¼
\verb+\jfont+ å½ä»¤ã®å¼ã³åºãã®éã«ã¯ï¼ã©ã®JFMãç¨ããã®ãã以ä¸ã®ãã¼ã§
æå®ããå¿
è¦ãããï¼
%
+
+\begin{table}[t]
+%\caption{Differences between JFMs shipped with \LuaTeX-ja}
+%\caption{\LuaTeX-ja ã«å梱ããã¦ãã JFM ã®éã}
+%\medskip
+\label{tab-difjfm}
+\ltjsetparameter{jacharrange={+3}}
+\centering\small
+\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
+\setbox0=\vtop{\hsize=7\zw\noindent âââââââ
+ããæ¥ã¢ã¢ã¡ãããã使ãã§è¿·åã«ãªã£ã¦æ³£ãã¾ããï¼}\copy0
+\vrule height 0pt depth \dp0}}
+\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
+\setbox0=\vtop{\hsize=7\zw\noindent ã¡ãã£ã¨ï¼ä½}\copy0}}
+\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g
+\setbox0=\hbox{æ¼¢}%
+\vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0
+\kern-\wd0\vrule width\wd0height .2pt depth .2pt
+\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}%
+\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}%
+\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}}
+\begin{tabular}{rccc}
+\toprule
+&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\
+\midrule
+%Example~1\cite{min10}
+%ä¾1\cite{min10}
+&\r{ujis}&\r{jis}&\r{min}\\
+%Example~2
+%ä¾2
+&\s{ujis}&\s{jis}&\s{min}\\
+Bounding Box&\t{ujis}&\t{jis}&\t{min}\\
+\bottomrule
+\end{tabular}
+\ltjsetparameter{jacharrange={-3}}
+\end{table}
+
+
\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
\item[jfm=]
%<*en>
@@ -2345,8 +2590,8 @@ JFMã®ååãæå®ããï¼ãã以åã«æå®ãããJFMãèªã¿è¾¼ã¾
å
ã«ãã¦ããï¼\Pkg{luatexja-otf}ããã±ã¼ã¸ã使ãã¨ãã¯ãã®JFMãæå®ããã¹ãã§ããï¼
%
%<*en>
-\item[\tt jfm-jis.lua] A counterpart for \verb+jis.tfm+, `JIS font
- metric' which is widely used in \pTeX. A major difference of
+\item[\tt jfm-jis.lua] A counterpart for \verb+jis.tfm+, ``JIS font
+ metric'' which is widely used in \pTeX. A major difference between
\texttt{jfm-ujis.lua} and this \texttt{jfm-jis.lua} is that
most characters under \texttt{jfm-ujis.lua} are square-shaped,
while that under \texttt{jfm-jis.lua} are horizontal
@@ -2354,122 +2599,116 @@ JFMã®ååãæå®ããï¼ãã以åã«æå®ãããJFMãèªã¿è¾¼ã¾
%
%<*ja>
\item[\tt jfm-jis.lua] \pTeX ã§åºãç¨ãããã¦ãããJISãã©ã³ãã¡ããªãã¯ã
- \verb+jis.tfm+ ã«ç¸å½ããJFMã§ããï¼\texttt{jfm-ujis.lua}ã¨ãã®
- \texttt{jfm-jis.lua}ã®ä¸»ãªéãã¯ï¼\texttt{jfm-ujis.lua}ã§ã¯ã»ã¨ãã©ã®æåã
- æ£æ¹å½¢ç¶ã§ããã®ã«å¯¾ãï¼\texttt{jfm-jis.lua}ã§ã¯æ¨ªé·ã®é·æ¹å½¢ç¶ã§ããï¼
+ \verb+jis.tfm+ ã«ç¸å½ããJFMã§ããï¼\texttt{jfm-ujis.lua} ã¨ãã®
+ \texttt{jfm-jis.lua} ã®ä¸»ãªéãã¯ï¼\texttt{jfm-ujis.lua} ã§ã¯ã»ã¨ãã©ã®æåã
+ æ£æ¹å½¢ç¶ã§ããã®ã«å¯¾ãï¼\texttt{jfm-jis.lua} ã§ã¯æ¨ªé·ã®é·æ¹å½¢ç¶ã§ãããã¨ã¨ï¼
+ \texttt{jfm-ujis.lua} ã§ã¯ãï¼ããï¼ãã®ç´å¾ã«åè§ç©ºç½ãæ¿å
¥ããããã¨ã§ããï¼
%
%<*en>
\item[\tt jfm-min.lua] A counterpart for \verb+min10.tfm+, which is one
- of the default Japanese font metric shipped with \pTeX. There
- are notable difference between this JFM and other 2~JFMs, as
- shown in Table~\ref{tab-difjfm}.
+ of the default Japanese font metric shipped with \pTeX.
%
-%<*ja>
+%<*ja>
\item[\tt jfm-min.lua] \pTeX ã«å梱ããã¦ããããã©ã«ãã®åæç¨TFM
- ã§ãã \verb+min10.tfm+ ã«ç¸å½ããJFMã§ããï¼ãã®JFMã¨ä»ã®2ã¤ã®JFMã®éã«ã¯
- 表\ref{tab-difjfm}ã«ç¤ºããããªç¹çãã¹ãéããããï¼
+ ã§ãã \verb+min10.tfm+ ã«ç¸å½ããï¼
%
\end{description}
-
%<*en>
-\item[jfmvar=] Sometimes there is a need that \ldots.
+The difference among these three~JFMs is shown in Table~\ref{tab-difjfm}.
%
%<*ja>
-\item[jfmvar=] æ¨æºã§ã¯ï¼JFMã¨ãµã¤ãºãåãã§ï¼
- å®ãã©ã³ãã ããç°ãªã2ã¤ã®åæãã©ã³ãã¯ãåºå¥ãããªããï¼ä¾ãã°
-ä¸ã®ä¾ã«ããã¦ï¼æåã®ãï¼ãã¨ãããã®å®ãã©ã³ãã¯ç°ãªããï¼
-JFMããµã¤ãºãåããªã®ã§ï¼æ®éã«ãï¼ããã¨å
¥åããæã¨åãããã«åè§ç©ºãã¨ãªãï¼
-
-ãããï¼æã«ã¯â¦â¦
-
+ããã3ã¤ã®JFMã®éãã¯è¡¨\ref{tab-difjfm}ã«ç¤ºããï¼
%
+
+\begin{figure}
\begin{LTXexample}[width=0.3\textwidth]
\ltjsetparameter{differentjfm=both}
\jfont\F=file:KozMinPr6N-Regular.otf:jfm=ujis
\jfont\G=file:KozGoPr6N-Medium.otf:jfm=ujis
\jfont\H=file:KozGoPr6N-Medium.otf:jfm=ujis;jfmvar=hoge
-
\F ï¼{\G ãã}ï¼ % halfwidth space
ï¼{\H ãã}ï¼ % fullwidth space
+ã»ãï¼{\G ãã»ãã}ï¼ã»ãï¼\par
+ã»ãï¼{\H ãã»ãã}ï¼ã»ãï¼% pTeX-like
+
\ltjsetparameter{differentjfm=paverage}
\end{LTXexample}
-\end{list}
-
-\begin{table}[t]
-%\caption{Differences between JFMs shipped with \LuaTeX-ja}
-%\caption{\LuaTeX-ja ã«å梱ããã¦ãã JFM ã®éã}
-\label{tab-difjfm}
-\ltjsetparameter{jacharrange={+3}}
-\centering\small
-\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
-\setbox0=\vtop{\hsize=7\zw\noindent âââââââ
-ããæ¥ã¢ã¢ã¡ãããã使ãã§è¿·åã«ãªã£ã¦æ³£ãã¾ããï¼}\copy0
-\vrule height 0pt depth \dp0}}
-\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
-\setbox0=\vtop{\hsize=7\zw\noindent ã¡ãã£ã¨ï¼ä½}\copy0}}
-\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g
-\setbox0=\hbox{æ¼¢}%
-\vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0
-\kern-\wd0\vrule width\wd0height .2pt depth .2pt
-\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}%
-\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}%
-\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}}
-\begin{tabular}{rccc}
-\toprule
-&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\
-\midrule
-%Example~1\cite{min10}
-%ä¾1\cite{min10}
-&\r{ujis}&\r{jis}&\r{min}\\
-%Example~2
-%ä¾2
-&\s{ujis}&\s{jis}&\s{min}\\
-Bounding Box&\t{ujis}&\t{jis}&\t{min}\\
-\bottomrule
-\end{tabular}
-\ltjsetparameter{jacharrange={-3}}
-\end{table}
+\caption{Example of \texttt{jfmvar} key}
+\label{fig:jfmvar}
+\end{figure}
-%\paragraph{Note: kern feature}
-%\paragraph{注æï¼kern feature}
-\label{para-kern}
-%<*en>
-Some fonts have information for inter-glyph spacing. However, this
-information is not well-compatible with \LuaTeX-ja. More concretely,
-this kerning space from this information are inserted \emph{before} the
-insertion process of \textbf{JAglue}, and this causes incorrect spacing
-between two characters when both a glue/kern from the data in the font
-and it from JFM are present.
-%
-%<*ja>
-ããã¤ãã®ãã©ã³ãã¯ã°ãªãéã®ã¹ãã¼ã¹ã«ã¤ãã¦ã®æ
å ±ãæã£ã¦ããï¼ãããï¼
-ãã®æ
å ±ã¯\LuaTeX-ja ã¨ã¯ãã¾ãç¸æ§ããããªãï¼å
·ä½çã«ã¯ï¼ãã®æ
å ±ã«åºã¥ãã¦æ¿å
¥
-ãããã«ã¼ãã³ã°ã¹ãã¼ã¹ã¯\textbf{JAglue}ã®æ¿å
¥éç¨ã®\textbf{åã«}æ¿å
¥ããï¼
-JFMã«åºã¥ãã°ã«ã¼ï¼ã«ã¼ã³ãæ¿å
¥ãããå ´åã«ã¯2æåéã®æå³ããªãã¹ãã¼ã¹ã®åå ã¨
-ãªãï¼
-%
-\begin{itemize}
%<*en>
-\item You should specify \texttt{-kern} in
- \verb+jfont+ when you want to use other font features,
- such as \texttt{script=...}\,.
+\item[jfmvar=] Sometimes there is a need that \ldots.
%
%<*ja>
-\item \texttt{script=...}ã¨ãã£ãfeatureã使ãããå ´åã«ã¯ï¼\verb+\jfont+
- ã«\texttt{-kern}ãæå®ããã¹ãã§ããï¼
+\item[jfmvar=] æ¨æºã§ã¯ï¼JFMã¨ãµã¤ãºãåãã§ï¼
+ å®ãã©ã³ãã ããç°ãªã2ã¤ã®åæãã©ã³ãã¯ãåºå¥ãããªããï¼ä¾ãã°
+å³\ref{fig:jfmvar}ã«ããã¦ï¼æåã®ãï¼ãã¨ãããã®å®ãã©ã³ãã¯ç°ãªããï¼
+JFMããµã¤ãºãåããªã®ã§ï¼æ®éã«ãï¼ããã¨å
¥åããæã¨åãããã«åè§ç©ºãã¨ãªãï¼
+
+ãããï¼JFMã¨ãµã¤ãºãåãã§ãã£ã¦ãï¼\texttt{jfmvar} ãã¼ã®ç°ãªã
+2ã¤ã®åæãã©ã³ãï¼ä¾ãã°å³\ref{fig:jfmvar}ã§è¨ã \verb+\F+ 㨠\verb+\H+ï¼
+ã¯ãåºå¥ããããï¼ç°ãªãåæãã©ã³ãã«ç°ãªã \texttt{jfmvar} ãã¼ãå²ãå½ã¦ï¼
+ãã¤\Param{differentjfm}ãã©ã¡ã¼ã¿ã \texttt{both} ã«è¨å®ããã°ï¼
+\pTeX ã¨ä¼¼ãç¶æ³ã§çµçããããã¨ã«ãªãï¼
%
+\end{list}
+
+\begin{figure}
+\begin{LTXexample}[pos=t]
+\newcommand\test{\vrule ãã¤ãããã¯ãã¤ã¯ã\vrule\\}
+\jfont\KMFW = KozMinPr6N-Regular:jfm=prop;-kern at 17pt
+\jfont\KMFK = KozMinPr6N-Regular:jfm=prop at 17pt % kern is activated
+\jfont\KMPW = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;-kern at 17pt
+\jfont\KMPK = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;+kern at 17pt
+\begin{multicols}{2}
+\ltjsetparameter{kanjiskip=0pt}
+{\KMFW\test \KMFK\test \KMPW\test \KMPK\test}
+
+\ltjsetparameter{kanjiskip=3pt}
+{\KMFW\test \KMFK\test \KMPW\test \KMPK\test}
+\end{multicols}
+\end{LTXexample}
+\caption{Kerning information and \Param{kanjiskip}}
+\label{fig:kern-jfm}
+\end{figure}
+
+%\paragraph{Using kerning information in a font}
+%\paragraph{ãã¢ã«ã¼ãã³ã°æ
å ±ã®ä½¿ç¨}
+\label{para-kern}
%<*en>
-\item If you want to use Japanese fonts in proportional width, and use
- information from this font, use \texttt{jfm-prop.lua} for its JFM, and\,\ldots.
+Some fonts have information for inter-glyph spacing.
+This version of \LuaTeX-ja treats kerning spaces like an italic correction;
+any glue and/or kern from the JFM and a kerning space can coexist.
+See Figure~\ref{fig:kern-jfm} for detail.
+
+Note that in \verb+\setmainjfont+ etc.\ which are provided by \Pkg{luatexja-fontspec}
+package, kerning option is set \emph{off} (\texttt{Kerning=Off}) by default,
+because of the compatibility with previous versions of \LuaTeX-ja.
%
%<*ja>
-\item ãããããã¼ã·ã§ãã«å¹
ã®åæãã©ã³ãããã®ãã©ã³ãã®æ
å ±ã«åºã¥ãã¦ä½¿ããã
- ãªãã°ï¼\texttt{jfm-prop.lua}ãJFMã¨ãã¦æå®ãï¼â¦â¦
-%
-TODO: kanjiskip?
+ããã¤ãã®ãã©ã³ãã¯ã°ãªãéã®ã¹ãã¼ã¹ã«ã¤ãã¦ã®æ
å ±ãæã£ã¦ããï¼
+ãã®ã«ã¼ãã³ã°æ
å ±ã¯ä»¥åã®\LuaTeX-ja ã¨ã¯ãã¾ãç¸æ§ãè¯ããªãã£ããï¼
+æ¬ãã¼ã¸ã§ã³ã§ã¯ã«ã¼ãã³ã°ã«ãã空ç½ã¯ã¤ã¿ãªãã¯è£æ£ã¨åæ§ã«æ±ããã¨ã«ãªã£ã¦ããï¼
+ã¤ã¾ãï¼ã«ã¼ãã³ã°ç±æ¥ã®ç©ºç½ã¨JFMç±æ¥ã®ã°ã«ã¼ã»ã«ã¼ã³ã¯åæã«å
¥ãããï¼
+å³\ref{fig:kern-jfm}ãåç
§ï¼
+\begin{itemize}
+ \item \emph{\texttt{\textbackslash jfont} ãï¼
+NFSS2ç¨ã®å½ä»¤ï¼\ref{ssec-chgfnt}ç¯ï¼\ref{ssec-nfsspat}ç¯ï¼ã«ãããæå®ã§ã¯
+ã«ã¼ãã³ã°æ
å ±ã¯æ¨æºã§ä½¿ç¨ãã}ãã¨ã«ãªã£ã¦ããããã§ããï¼
+è¨ãæããã°ï¼ã«ã¼ãã³ã°æ
å ±ã使ç¨ããªãè¨å®ã«ããã«ã¯ï¼é¢åã§ã
+\begin{verbatim}
+\jfont\hoge=KozMinPr6N-Regular:jfm=ujis;-kern at 3.5mm
+\DeclareFontShape{JY3}{fuga}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern}{}
+\end{verbatim}
+ã®ããã«ï¼\texttt{-kern} ã¨ããæå®ãèªåã§è¿½æ¶ããªããã°ãããªãï¼
+ \item
+ä¸æ¹ï¼\emph{\Pkg{luatexja-fontspec} ã®æä¾ãã \texttt{\textbackslash setmainjfont}\
+ãªã©ã®å½ä»¤ã®æ¨æºè¨å®ã§ã¯ã«ã¼ãã³ã°æ
å ±ã¯ä½¿ç¨ããªã}ï¼\texttt{Kerning=Off}ï¼
+ãã¨ã«ãªã£ã¦ããï¼ããã¯ä»¥åã®ãã¼ã¸ã§ã³ã®\LuaTeX-jaã¨ã®äºææ§ã®ããã§ããï¼
\end{itemize}
-
+%
%<*ja>
\paragraph{\texttt{extend}ã¨\texttt{slant}}
@@ -2497,14 +2736,13 @@ For example, the following example uses the standard JFM \texttt{jfm-ujis.lua},
letter-spacing and the width of italic correction are not correct:
%
\begin{LTXexample}[width=0.3\textwidth]
-\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis
+\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis;-kern
\E ããããã
-\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis
+\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis;-kern
\S ããã\/ABC
\end{LTXexample}
-
%\subsection{Prefix \texttt{psft}}
%\subsection{\texttt{psft}ããªãã£ãã¯ã¹}
\label{ssec-psft}
@@ -2512,14 +2750,14 @@ letter-spacing and the width of italic correction are not correct:
Besides ``\texttt{file:}''\ and ``\texttt{name:}''\ prefixes which
are introduced in the \Pkg{luaotfload} package,
\LuaTeX-ja adds ``\texttt{psft:}''\ prefix in \verb+\jfont+ (and~\verb+\font+),
-to specify a `name-only' Japanese font which
+to specify a ``name-only'' Japanese font which
will not be embedded to PDF. Typical use of this prefix is to specify
standard, non-embedded Japanese fonts, namely, ``Ryumin-Light'' and
``GothicBBB-Medium''.
\emph{OpenType font features, such as ``{\tt +jp90}'',
-have no meaning in `name-only' fonts using this `{\tt psft:}'\ prefix.
-This is because we can't expect what fonts are actually used by the PDF reader.}
+have no meaning in name-only fonts using ``{\tt psft:}''\ prefix,
+because we can't expect what fonts are actually used by the PDF reader.}
Note that \texttt{extend}~and~\texttt{slant} settings (see~above) are supported
with \texttt{psft} prefix, because they are only simple linear transformations.
%
@@ -2532,12 +2770,12 @@ with \texttt{psft} prefix, because they are only simple linear transformations.
åæãã©ã³ããæå®ãããã¨ãã§ããï¼ãæ¨æºçãªãéåãè¾¼ã¿åæãã©ã³ãï¼
ã¤ã¾ããRyumin-LightããGothicBBB-Mediumãã®æå®ã§ãã®ããªãã£ãã¯ã¹ã使ãããï¼
-\emph{\texttt{psft}ããªãã£ãã¯ã¹ã®ä¸ã§ã¯
+\emph{\texttt{psft} ããªãã£ãã¯ã¹ã®ä¸ã§ã¯
\texttt{+jp90} ãªã©ã®OpenType font featureã®å¹åã¯ãªãï¼
éåè¾¼ãã©ã³ããPDFã«ä½¿ç¨ããã¨ï¼å®éã«ã©ã®ãããªãã©ã³ãã
-表示ã«ç¨ãããããäºæ¸¬ã§ããªãããã§ããï¼}
-\texttt{extend}ã¨\texttt{slant}æå®ã¯åãªãå¤å½¢ã®ãã
-\texttt{psft}ããªãã£ãã¯ã¹ã§ã使ç¨å¯è½ã§ããï¼
+表示ã«ç¨ãããããäºæ¸¬ã§ããªãããã§ããï¼}\
+\texttt{extend} 㨠\texttt{slant} æå®ã¯åãªãå¤å½¢ã®ãã
+\texttt{psft} ããªãã£ãã¯ã¹ã§ã使ç¨å¯è½ã§ããï¼
%
%\paragraph{\texttt{cid} key}
@@ -2606,7 +2844,7 @@ Please contact the LuaTeX-ja project team.
?
\end{lstlisting}
-%\subsection{Structure of JFM file}
+%\subsection{Structure of a JFM File}
%\subsection{JFMãã¡ã¤ã«ã®æ§é }
\label{ssec-jfm-str}
%A JFM file is a Lua script which has only one function call:
@@ -2640,22 +2878,22 @@ floating-point numbers in design-size unit.
%(required)
%ï¼å¿
é ï¼
-%The amount of the length of the `full-width'.
+%The amount of the length of the ``full-width''.
%ãå
¨è§å¹
ãã®é·ãï¼
\item[zh=]
%(required)
%ï¼å¿
é ï¼
-%The amount of the `full-height' (height + depth).
-%ãå
¨è§é«ãã(height + depth)ã®é·ãï¼
+%The amount of the ``full-height'' (height + depth).
+%ãå
¨è§é«ãã(height + depth)ã®é·ãï¼é常ã¯å
¨è§å¹
ã¨åãé·ãã«ãªãã ããï¼
\item[kanjiskip=\{, , \}]
%(optional)
%ï¼ä»»æï¼
%<*en>
-This field specifies the `ideal' amount of \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}. As noted
+This field specifies the ``ideal'' amount of \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}. As noted
in Subsection~\ref{subs-kskip}, if the parameter
\Param{\hyperlink{fld:kanjiskip}{kanjiskip}} is \verb+\maxdimen+, the value specified
in this field is actually used (if this field is not specified in
@@ -2663,10 +2901,9 @@ This field specifies the `ideal' amount of \Param{\hyperlink{fld:kanjiskip}{kanj
fields are in design-size unit too.
%
%<*ja>
-ãçæ³çãªã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®éãæå®ããï¼\ref{subs-kskip}ç¯ã§è¿°ã¹ãããã«ï¼
+çæ³çãª\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®éãæå®ããï¼\ref{subs-kskip}ç¯ã§è¿°ã¹ãããã«ï¼
ãã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã \verb+\maxdimen+ ã®å¤ãªãã°ï¼ãã®ãã£ã¼ã«ãã§æå®ããã
-å¤ãå®éã«ã¯ç¨ããããï¼ãããã®ãã£ã¼ã«ããJFMã§æå®ããã¦ããªããã°ï¼
-0\,ptã§ãããã®ã¨ãã¦æ±ãããï¼ï¼ã¨ã®ãã£ã¼ã«ããdesign-size
+å¤ãå®éã«ã¯ç¨ããããï¼æå®ãªãã¯0\,ptã¨ãã¦æ±ãããï¼ï¼ã¨ã®ãã£ã¼ã«ããdesign-size
ãåä½ã§ãããã¨ã«æ³¨æããï¼
%
@@ -2675,11 +2912,11 @@ This field specifies the `ideal' amount of \Param{\hyperlink{fld:kanjiskip}{kanj
%ï¼ä»»æï¼
%<*en>
-Like the \texttt{kanjiskip} field, this field specifies the `ideal'
+Like the \texttt{kanjiskip} field, this field specifies the ``ideal''
amount of \Param{\hyperlink{fld:xks}{xkanjiskip}}.
%
%<*ja>
-\texttt{kanjiskip}ãã£ã¼ã«ãã¨åæ§ã«ï¼\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®ãçæ³çãªãéã
+\texttt{kanjiskip}ãã£ã¼ã«ãã¨åæ§ã«ï¼\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®çæ³çãªéã
æå®ããï¼
%
\end{list}
@@ -2739,35 +2976,39 @@ This field is a list of characters which are in this character
%<*en>
Specifythe width of characters in character class~$i$, the height, the depth and
-the amount of italic correction. All characters in character class~$i$ are regarded that its width, height and depth are
+the amount of italic correction. All characters in character class~$i$ are regarded that its width, height, and depth are
as values of these fields.
-But there is one exception: if \texttt{'prop'} is specified in \texttt{width} field, width of a character becomes that of its `real' glyph
+
+But there is one exception: \texttt{width} field can be \texttt{'prop'}.
+This means that width of a character becomes that of its ``real'' glyph.
%
%<*ja>
æåã¯ã©ã¹$i$ã«å±ããæåã®å¹
ï¼é«ãï¼æ·±ãï¼ã¤ã¿ãªãã¯è£æ£ã®éãæå®ããï¼
æåã¯ã©ã¹$i$ã«å±ããå
¨ã¦ã®æåã¯ï¼ãã®å¹
ï¼é«ãï¼æ·±ãããã®ãã£ã¼ã«ãã§æå®ãã
å¤ã§ãããã®ã¨ãã¦æ±ãããï¼
-ãããï¼ä¾å¤ãä¸ã¤ããï¼ãã \texttt{'prop'} ã \texttt{width} ãã£ã¼ã«ãã«
-æå®ãããå ´åï¼æåã®å¹
ã¯ãã®ãå®éã®ãã°ãªãã®å¹
ã¨ãªãï¼
+
+ä¾å¤ã¨ãã¦ï¼\emph{\texttt{width} ãã£ã¼ã«ãã«ã¯æ°å¤ä»¥å¤ã« \texttt{'prop'} ãæå®å¯è½ã§ãã}ï¼
+ãã®å ´åï¼æåã®å¹
ã¯ãã®ãå®éã®ãã°ãªãã®å¹
ã¨ãªãï¼OpenTypeã® \texttt{prop} featureã¨ä½µç¨
+ ããã°ï¼ããã«ãã£ã¦ãããã¼ã·ã§ãã«çµãè¡ããã¨ãã§ããï¼
%
\item[left=, down=, align=]\
%<*en>
-These fields are for adjusting the position of the `real' glyph. Legal
+These fields are for adjusting the position of the ``real'' glyph. Legal
values of \texttt{align} field are \texttt{'left'},
- \texttt{'middle'} and \texttt{'right'}. If one of these
+ \texttt{'middle'}, and \texttt{'right'}. If one of these
3~fields are omitted, \texttt{left} and \texttt{down} are
treated as~0, and \texttt{align} field is treated as
\texttt{'left'}.
The effects of these 3~fields are indicated in Figure~\ref{fig-pos}.
%
%<*ja>
-ãããã®ãã£ã¼ã«ãã¯ãå®éã®ãã°ãªãã®ä½ç½®ã調æ´ããããã«ããï¼
-\texttt{align}ãã£ã¼ã«ãã«æå®ã§ããå¤ã¯\texttt{'left'}, \texttt{'middle'},
-\texttt{'right'}ã®ããããã§ããï¼ããããã3ã¤ã®ãã£ã¼ã«ãã®ãã¡ã®1ã¤ãçããã
-å ´åï¼\texttt{left}ã¨\texttt{down}ã¯0ï¼\texttt{align}ãã£ã¼ã«ãã¯
-\texttt{'left'}ã§ãããã®ã¨ãã¦æ±ãããï¼
+ãããã®ãã£ã¼ã«ãã¯å®éã®ã°ãªãã®ä½ç½®ã調æ´ããããã«ããï¼
+\texttt{align} ãã£ã¼ã«ãã«æå®ã§ããå¤ã¯ \texttt{'left'}, \texttt{'middle'},
+\texttt{'right'} ã®ããããã§ããï¼ããããã3ã¤ã®ãã£ã¼ã«ãã®ãã¡ã®1ã¤ãçããã
+å ´åï¼\texttt{left} 㨠\texttt{down} ã¯0ï¼\texttt{align} ãã£ã¼ã«ãã¯
+\ \texttt{'left'} ã§ãããã®ã¨ãã¦æ±ãããï¼
ããã3ã¤ã®ãã£ã¼ã«ãã®æå³ã«ã¤ãã¦ã¯å³\ref{fig-pos}ã§èª¬æããï¼
%
@@ -2851,7 +3092,7 @@ field is \texttt{'middle'}.
\item
%<*en>
The black rectangle is a frame of the node.
-Its width, height and depth are specified by JFM.
+Its width, height, and depth are specified by JFM.
%
%<*ja>
é»è²ã®é·æ¹å½¢ã¯ãã¼ãã®æ ã§ããï¼
@@ -2860,10 +3101,10 @@ Its width, height and depth are specified by JFM.
\item
%<*en>
Since the \texttt{align} field is \texttt{'middle'},
-the `real' glyph is centered horizontally (the green rectangle).
+the ``real'' glyph is centered horizontally (the green rectangle).
%
%<*ja>
-\texttt{align}ãã£ã¼ã«ãã¯\texttt{middle}ãªã®ã§ï¼ãå®éã®ãã°ãªãã¯
+\texttt{align}ãã£ã¼ã«ãã¯\texttt{middle}ãªã®ã§ï¼å®éã®ã°ãªãã¯
æ°´å¹³æ¹åã®ä¸å¿ã«é
ç½®ãããï¼ç·è²ã®é·æ¹å½¢ï¼ï¼
%
\item
@@ -2881,8 +3122,8 @@ Furthermore, the glyph is shifted according to values of fields
\medskip
\caption{%
-%The position of the `real' glyph.
-%ãå®éã®ãã°ãªãã®ä½ç½®ï¼
+%The position of the real glyph
+%ãå®éã®ãã°ãªãã®ä½ç½®
}
\label{fig-pos}
\end{figure}
@@ -2896,7 +3137,8 @@ Furthermore, the glyph is shifted according to values of fields
㯠\Pkg{luatexja-adjust} ã«ããåªå
é ä½ä»ã
è¡é·èª¿æ´ï¼\ref{ssec-adj}ç¯ï¼ãæå¹ãªã¨ãã®ã¿æå³ãæã¤ï¼
ãã®ãã£ã¼ã«ãã¯çç¥å¯è½ã§ããï¼è¡èª¿æ´å¦çã«ããããã®glueã®åªå
- 度ã$-2$ãã$+2$ã®éã®æ´æ°ã§æå®ããï¼ã®çç¥æã®å¤
+ 度ã$-2$ãã$+2$ã®éã®æ´æ°ã§æå®ããï¼å¤§ããå¤ã»ã©ã伸ã³ãããï¼ç¸®ã¿ãããã
+ ãã¨ãæå³ããï¼çç¥æã®å¤
ã¯0ã§ããï¼ç¯å²å¤ã®å¤ãæå®ãããã¨ãã®åä½ã¯æªå®ç¾©ã§ããï¼
ãçç¥å¯è½ãã£ã¼ã«ãã§ããï¼$-1$ãã$+1$ã®å®æ°å¤ãã¨ãï¼çç¥æã®å¤ã¯0ã§ããï¼
@@ -2920,14 +3162,25 @@ Furthermore, the glyph is shifted according to values of fields
\end{itemize}
%
%<*en>
+\
+
Specifies the width of kern or glue which will be inserted
between characters in character class~$i$ and those in character class~$j$.
is an integer in $[-2,2]$ (treated as 0 if omitted), and this is
used only in line adjustment with priority by \Pkg{luatexja-adjust}
-(see Subsection~\ref{ssec-adj}).
-
- is \dots
+(see Subsection~\ref{ssec-adj}). Higher value means the glue is easy to shretch,
+and is also easy to shrink.
+
+ is also an optional value between $-1$ and 1. For example,
+Thw width of a glue between an ideographic full stop ``ã''
+and a fullwidth middle dot ``ã»'' is three-fourth of fullwidth,
+namely halfwidth from the ideographic full stop, and
+quarter-width from the fullwidth middle dot. In this case,
+we specify to
+\[
+ -1\cdot \frac{0.5}{0.5+0.25} + 1 \cdot \frac{0.25}{0.5+0.25} = -\frac13.
+\]
%
@@ -2946,6 +3199,12 @@ used only in line adjustment with priority by \Pkg{luatexja-adjust}
\paragraph{æåã¯ã©ã¹ã®æ±ºå®}
æåãããã®æåã®å±ããæåã¯ã©ã¹ãç®åºããéç¨ã¯å°ã
è¤éã§ããï¼
次ã®å
容ãä¸é¨ã«å«ãã \texttt{jfm-test.lua} ãç¨ãã¦èª¬æããï¼
+%
+%<*en>
+\paragraph{Character to character classes}
+We explain how the character class of a character is determined,
+using \texttt{jfm-test.lua} which contains the following:
+%
\begin{lstlisting}
[0] = {
chars = { 'æ¼¢', 'ã*' },
@@ -2958,40 +3217,78 @@ used only in line adjustment with priority by \Pkg{luatexja-adjust}
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
},
\end{lstlisting}
-å¥ç¹ãããã®å¹
ã¯äºåã§ããã®ã§
+%å¥ç¹ãããã®å¹
ã¯äºåã§ããã®ã§
+%Now consider the following input/output:
\begin{LTXexample}[width=0.3\textwidth]
\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert
\setbox0\hbox{\a ã\inhibitglue æ¼¢}
\the\wd0
\end{LTXexample}
+%<*en>
+Now we look why the above source outputs 20\,pt, not 15\,pt.
+\begin{enumerate}
+\item The ideographic full stop ``ã'' is converted to its vertical form ``\char"FE12''~(\texttt{U+FE12}), %"
+by \verb+vert+ feature.
+\item The character class of ``\char"FE12'' is zero, hence its width is fullwidth.%"
+\item The character class of ``æ¼¢'', hence its width is fullwidth.
+\item \verb+\inhibitglue+ makes that no glue will be inserted between ``ã'' and ``æ¼¢''.
+\item Hence the width of \verb+\hbox+ equals to 20\,pt.
+\end{enumerate}
+This example shows that the character class of a character is determined \emph{after
+applying font features by \Pkg{luaotfload}}.
+%
+%<*ja>
ã§ã¯ï¼å
¨è§äºå(15.0\,pt)ã¨ãªãã®ãèªç¶â¦â¦ã¨æããããããªããï¼ä¸ã®å®è¡çµæã§ã¯20\,ptã¨ãªã£ã¦ããï¼
ããã¯ä»¥ä¸ã®äºæ
ã«ãããã®ã§ããï¼
\begin{enumerate}
-\item \verb+vert+ featureã«ãã£ã¦å¥ç¹ã縦æ¸ãç¨ã®ã°ãªãã¨ç½®ãæããï¼\Pkg{luaotfload} ã«ããå¦çï¼ï¼
-\item ããããã®ã°ãªãã¯ãæåã³ã¼ãã\texttt{U+F0000}以éã¨ã¿ãªããã¦ãã
-ï¼å®éã«ãããã«ãªããã¯ï¼ãã©ã³ãã«ãã£ã¦ç°ãªãï¼ï¼
-\item ãã£ã¦ï¼æåã¯ã©ã¹0ã¨ã¿ãªãããããï¼çµæã¨ãã¦ãããã®å¹
ã¯å
¨è§ã ã¨èªèããã¦ãã¾ãï¼
+\item \verb+vert+ featureã«ãã£ã¦å¥ç¹(\texttt{U+3002})ã縦æ¸ãç¨ã®ã°ãªãã¨ç½®ãæããï¼\Pkg{luaotfload} ã«ããå¦çï¼ï¼
+\item ãã®ç¸¦æ¸ãç¨å¥ç¹ã®ã°ãªã㯠\texttt{U+FE12} ã§ããããï¼ãã®æåã¯ã©ã¹ã¯0ã¨ãªãï¼
+\item 以ä¸ã«ããæåã¯ã©ã¹0ã¨ã¿ãªãããããï¼çµæã¨ãã¦ãããã®å¹
ã¯å
¨è§ã ã¨èªèããã¦ãã¾ãï¼
\end{enumerate}
+ãã®ä¾ã¯ï¼\emph{æåã¯ã©ã¹ã®æ±ºå®ã¯font featureã®é©ç¨ã«ããã°ãªãç½®æã®å¾ã«è¡ããã}ãã¨ã
+示ãã¦ããï¼
+%
-ä¸æ¹ï¼ã\texttt{'ã*'}ãã®ããã«ã¢ã¹ã¿ãªã¹ã¯ã¤ãã®æå®ãããã¨ï¼
-ç¶æ³ã¯ç°ãªã£ã¦ããï¼
+%<*en>
+However, a starred specificaion like ``\texttt{'ã*'}'' changes the rule.
+Consider the following input:
+%
+%<*ja>
+ä½ãï¼ã\texttt{'ã*'}ãã®ããã«ã¢ã¹ã¿ãªã¹ã¯ã¤ãã®æå®ãããã¨ï¼
+ç¶æ³ã¯ç°ãªãï¼
+%
\begin{LTXexample}[width=0.3\textwidth]
\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert
\a æ¼¢ã\inhibitglue æ¼¢
\end{LTXexample}
-ããã§ï¼èªç¹ãããã®æåã¯ã©ã¹ã¯ï¼ä»¥ä¸ã®ããã«ãã¦æ±ºã¾ãï¼
+%<*en>
+Here, the character class of the ideographic comma ``ã''~(\texttt{U+3001}) is determined
+as following:
+\begin{enumerate}
+\item As the case of ``ã'', the ideographic comma ``ã'' is converted to its vertical
+ form ``\char"FE11''~(\texttt{U+FE11}).%"
+\item The character class of ``\char"FE11'' is zero.
+\item However, \LuaTeX-ja remembers that this ``\char"FE11'' is obtained from ``ã'' by
+ font features. The character class of ``ã'' is \emph{non-zero value}, namely, 2000.
+\item Hence the ideographic comma ``ã'' in above belongs the character class~2000.
+\end{enumerate}
+%
+%<*ja>
+ããã§ï¼èªç¹ããã(\texttt{U+3001})ã®æåã¯ã©ã¹ã¯ï¼ä»¥ä¸ã®ããã«ãã¦æ±ºã¾ãï¼
\begin{enumerate}
\item ã¨ããããå¥ç¹ã®æã¨åãããã«ï¼\Pkg{luaotfload} ã«ãã£ã¦ç¸¦æ¸ãç¨èªç¹ã®ã°ãªãã«ç½®ãæããï¼
-\item ç½®æå¾ã®ã°ãªãã®ãæåã³ã¼ããã¯\texttt{U+F0000}以éã§ããï¼
-ãã®ã¾ã¾ã§ã¯æåã¯ã©ã¹ã¯0ã¨å¤å®ãããï¼
-\item ã¨ãããï¼JFMã«ã¯ã\texttt{'ã*'}ãæå®ãããã®ã§ï¼ç½®æåã®æ¨ªæ¸ãç¨èªç¹ã®ã°ãªãããã(\texttt{U+3001})ã«ãã£ã¦æåã¯ã©ã¹ãå¤å®ããï¼
+\item ç½®æå¾ã®ã°ãªã㯠\texttt{U+FE11} ã§ããï¼ãã®ã¾ã¾ã§ã¯æåã¯ã©ã¹ã¯0ã¨å¤å®ãããï¼
+\item ã¨ãããï¼JFMã«ã¯ã\texttt{'ã*'}ãæå®ãããã®ã§ï¼ç½®æåã®æ¨ªæ¸ãç¨èªç¹ã®ã°ãªãã«ãã£ã¦æåã¯ã©ã¹ãå¤å®ããï¼
\item çµæã¨ãã¦ï¼ä¸ã®åºåä¾ä¸ã®èªç¹ã®æåã¯ã©ã¹ã¯2000ã¨ãªãï¼
\end{enumerate}
+%
-ãªãï¼ç½®æå¾ã®ã°ãªãã§å¤å®ããæåã¯ã©ã¹ã®å¤ã0ã§ãªããã°ï¼ãã¡ãããã®ã¾ã¾ä½ç¨ããï¼
+%<*ja>
+ãªãï¼ã\texttt{'\hbox{}ã*'}ãã®ããã«ã¢ã¹ã¿ãªã¹ã¯ã¤ãã®æå®ããã£ã¦ãï¼
+ç½®æå¾ã®ã°ãªãã§å¤å®ããæåã¯ã©ã¹ã®å¤ã0ã§ãªããã°ï¼ãã¡ãããã®ã¾ã¾ä½ç¨ããï¼
\begin{LTXexample}[width=0.3\textwidth]
\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+hwid
-\a æ¼¢ï¾ã²
+\a æ¼¢ãã²
\end{LTXexample}
ä¸ã®ä¾ã§ã¯ï¼
\texttt{hwid} featureã«ããï¼ããããåè§ã®ãï¾ãã«ç½®ãæãããï¼
@@ -3020,8 +3317,8 @@ The following is the list of imaginary characters:
%%JFMããµã¤ãºãç°ãªã2ã¤ã®\textbf{JAchar}ã®éã®å¢çã¨ãã¦ç¨ããããï¼
\item['boxbdd']
-%The beginning/ending of a horizontal box, and the beginning of a noindented paragraph.
-%æ°´å¹³ããã¯ã¹ã®å
é ã¨æ«å°¾ï¼åã³ã¤ã³ãã³ãããã¦ããªãï¼\verb+\noindent+ ã§éå§ãããï¼æ®µè½ã®å
é ã表ãï¼
+%The beginning/ending of a hbox, and the beginning of a noindented (i.e., began by \verb+\noindent+) paragraph.
+%hboxã®å
é ã¨æ«å°¾ï¼åã³ã¤ã³ãã³ãããã¦ããªãï¼\verb+\noindent+ ã§éå§ãããï¼æ®µè½ã®å
é ã表ãï¼
\item['parbdd']
%The beginning of an (indented) paragraph.
@@ -3042,7 +3339,7 @@ The following is the list of imaginary characters:
% ToDo: English version.
%<*en>
-\ldots
+See Japanese version of this manual.
%
%<*ja>
@@ -3065,7 +3362,7 @@ The following is the list of imaginary characters:
æåã¯ã©ã¹ã«é¢ãã¦ã¯ã°ã«ã¼ï¼ã«ã¼ã³ã®è¨å®ã¯ããªãï¼
ããã¯ï¼\pTeX ã§ã¯ï¼
- æ°´å¹³ããã¯ã¹ã®å
é ã»æ«å°¾ã¨ã¤ã³ãã³ãããã¦ããªãï¼\verb+\noindent+ ã§éå§ã
+ hboxã®å
é ã»æ«å°¾ã¨ã¤ã³ãã³ãããã¦ããªãï¼\verb+\noindent+ ã§éå§ã
ããï¼æ®µè½ã®å
é ã«ã¯JFMã°ã«ã¼ã¯å
¥ããªãã¨ããä»æ§ãå®ç¾ãããããã§ããï¼
\item \pTeX ã®çµçãåç¾ããããã¨ããã®ãç®çã§ããã°ä»¥ä¸ã®æ³¨æãå®ãã°ååã§ããï¼
@@ -3079,7 +3376,7 @@ The following is the list of imaginary characters:
\texttt{'parbdd'}ãå
¥ããã°å
¨è§ä¸ããã¨ãªãï¼
\begin{LTXexample}[width=0.4\textwidth]
-\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g
+\jfont\g=KozMinPr6N-Regular:jfm=test \g
\parindent1\zw\noindent{}âââââ
\par ãâââäºåä¸ãã
\par ãâââå
¨è§ä¸ãã
@@ -3090,8 +3387,8 @@ The following is the list of imaginary characters:
ä½ãï¼\verb+\everypar+ ãå©ç¨ãã¦ããå ´åã«ã¯ãã®ä»çµã¿ã¯æ£ããåããªãï¼
ãã®ãããªä¾ã¨ãã¦ã¯ç®æ¡æ¸ãä¸ã® \verb+\item+ ã§å§ã¾ã段è½ãããï¼\Pkg{ltjsclasses}ã§ã¯
人工çã«ã\texttt{'parbdd'}ã®æå³ãæã¤ãwhatsitãã¼ããä½ããã¨ã«ãã£ã¦å¯¾å¦ãã¦ãã%
-\footnote{\texttt{no\_runtime/ltjsclasses.dtx} ãåç
§ããããï¼
-JFMå´ã§ä¸é¨ã®å¯¾å¦ãã§ãããã¨ã«ããï¼\Pkg{jsclasses}ã®ããã«ifæã®å¤å®ã¯ãã¦ããªãï¼}
+\footnote{\texttt{ltjsclasses.dtx} ãåç
§ããããï¼
+JFMå´ã§ä¸é¨ã®å¯¾å¦ãã§ãããã¨ã«ããï¼\Pkg{jsclasses}ã®ããã«ifæã®å¤å®ã¯ãã¦ããªãï¼}ï¼
%
@@ -3129,9 +3426,10 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
%
\begin{table}[!tb]
-%\caption{Control sequences for Japanese math fonts}
+%\caption{Commands for Japanese math fonts}
%\caption{åææ°å¼ãã©ã³ãã«å¯¾ããå½ä»¤}
\label{tab-math}
+%\medskip
\centering
\def\{{\char`\{}\def\}{\char`\}}\small
\begin{tabular}{ll}
@@ -3151,7 +3449,7 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
%\subsection{ã³ã¼ã«ããã¯}
%<*en>
-Like \LuaTeX\ itself, \LuaTeX-ja also has callbacks. These callbacks can
+\LuaTeX-ja also has several callbacks. These callbacks can
be accessed via \verb+luatexbase.add_to_callback+ function and so on, as other callbacks.
%
%<*ja>
@@ -3198,12 +3496,12 @@ An example of this callback is the \texttt{ltjarticle} class, with
\texttt{jfm-min.lua}ä¸ã®\texttt{'parbdd'}ãå¼·å¶çã«ã¯ã©ã¹0ã«å²ãå½ã¦ã¦ããï¼
%
-%\item[\texttt{luatexja.define\_font} callback]
-%\item[\texttt{luatexja.define\_font}ã³ã¼ã«ããã¯]
+%\item[\texttt{luatexja.define\_jfont} callback]
+%\item[\texttt{luatexja.define\_jfont}ã³ã¼ã«ããã¯]
%<*en>
-This callback and the next callback form a pair, and you can assign letters which don't have
- fixed code points in Unicode to non-zero character classes.
-This \texttt{luatexja.define\_font} callback is called just when new Japanese font is loaded.
+This callback and the next callback form a pair, and you can assign characters
+ which do not have fixed code points in Unicode to non-zero character classes.\\
+This \texttt{luatexja.define\_jfont} callback is called just when new Japanese font is loaded.
%
%<*ja>
ãã®ã³ã¼ã«ããã¯ã¨æ¬¡ã®ã³ã¼ã«ããã¯ã¯çµããªãã¦ããï¼Unicodeä¸ã«åºå®ãããæåã³ã¼ã
@@ -3216,54 +3514,101 @@ function ( jfont_info, font_number)
return new_jfont_info
end
\end{lstlisting}
-
%<*en>
-You may assume that \verb+jfont_info+ has the following fields:
-%
-%<*ja>
-\verb+jfont_info+ ã¯ä»¥ä¸ã®2ãã£ã¼ã«ããæã¤ï¼
-%
+\verb+jfont_info+ has the following fields,
+\emph{which may not overwritten by a user}:
\begin{description}
-\item[\tt size\_cache]
-%<*ja>
-使ç¨ããã¦ããJFMã®æ
å ±ãæ ¼ç´ããã¦ãããã¼ãã«ã§ï¼
-\emph{ãã®ãã¼ãã«ãæ¸ãæãã¦ã¯ãªããªã}ï¼
-ä¸èº«ã¯ã»ã¼JFMãã¡ã¤ã«ã«æ¸ããã¦ããå¯ä¸ã®ãã¼ãã«ã§ãããï¼æ¬¡ã®ããã«è¥å¹²å¤ãã£ã¦ããï¼
+\item[\texttt{size}]
+The font size specified at \verb+\jfont+ in scaled points ($1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$).
+\item[\texttt{zw}, \texttt{zh}, \texttt{kanjiskip}, \texttt{xkanjiskip}]
+These are scaled value of those specified by the JFM, by the font size.
+\item[\texttt{jfm}]
+The internal number of the JFM.
+\item[\texttt{var}]
+The value of \texttt{jfmvar}~key, which is specified at \verb+\jfont+.
+The default value is the empty string.
+\item[\texttt{chars}]
+The mapping table from character codes to its character classes.\\
+The specification \texttt{[i].chars=\{, ...\}} in the JFM will be stored in this
+ field as \texttt{chars=\{[]=\,$i$, ...\}}.
+\item[\texttt{char\_type}]
+For $i\in\omega$, \texttt{char\_type[$i$]} is information of characters whose class is
+ $i$, and has the following fields:
\begin{itemize}
-\item åæåã¯ã©ã¹$i$ã«å±ããæåéã®ãã¼ãã«\
-\texttt{[$i$].chars=\{, ...\}} ã¯ï¼ãããã¬ãã«ã«ã¾ã¨ãããï¼
-\texttt{chars=\{[]=\,$i$, ...\}} ã¨ããå½¢ã«ãªã£ã¦ããï¼
-\item \texttt{zw},~\texttt{zh}, \texttt{kanjiskip},~\texttt{xkanjiskip} ã®åãã£ã¼ã«ãã®å¤ã¯ï¼
-å®éã«ä½¿ããããã©ã³ããµã¤ãºã«åãããsp ($1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$)åä½ã®é·ãã«å¤ãã£ã¦ããï¼
-\item åæåã¯ã©ã¹$i$ã®æ
å ±ãæ ¼ç´ãããã¼ãã«ãï¼\texttt{char\_type} ãã£ã¼ã«ãã®ä¸ã«ã¾ã¨ãããã¦ããï¼
-ä¾ãã°ï¼æåã¯ã©ã¹1ã«å±ããæåã®é«ã㯠\texttt{char\_type[1].height} ã§åç
§ã§ããï¼
-\item \texttt{dir} ãã£ã¼ã«ãã¯ãã®ãã¼ãã«ã«ã¯ãªãï¼
+ \item \texttt{width},~\texttt{height}, \texttt{depth},
+ \texttt{italic}, \texttt{down},~\texttt{left}\ are just
+ scaled value of those specified by the JFM, by the font size.
+ \item \texttt{align} is a number which is determined from \texttt{align}~field in the JFM:
+\[
+ \begin{cases}
+ 0&\text{\texttt{'left'} and the default value}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'}
+ \end{cases}
+\]
+\item For $j\in \omega$, \texttt{[$j$]} stores a kern or a glue which will be inserted
+between character class~$i$ and class~$j$.
+
+If a kern will be inserted, the value of this field is \texttt{[$j$]=\{false, , \}},
+where is a node\footnote{%
+ This version of \LuaTeX-ja uses ``direct access
+ model'' for accessing nodes, if possible. }.
+If a glue will be inserted, we have \texttt{[$j$]=\{false, , , \}},
+where is also a node, and $\text{}=\textit{from\_jfm}+\text{}$.
\end{itemize}
-%
-%<*en>
-A table which contains the information of a JFM, and \emph{this table must not be changed}.
-The contents of this table are similar to that which is written is the JFM file, but
-the following differ:
+\end{description}
+%
+%<*ja>
+\verb+jfont_info+ ã¯æä½é以ä¸ã®ãã£ã¼ã«ããæã¤ãï¼ããããæ¸ãæãã¦ã¯ãªããªãï¼
+\begin{description}
+\item[\texttt{size}]
+å®éã«ä½¿ããããã©ã³ããµã¤ãºï¼spåä½ï¼ï¼$1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$ï¼
+\item[\texttt{zw}, \texttt{zh}, \texttt{kanjiskip}, \texttt{xkanjiskip}]
+JFMãã¡ã¤ã«ã§æå®ããã¦ããããããã®å¤ããã©ã³ããµã¤ãºã«åããã¦ã¹ã±ã¼ãªã³ã°ãããã®ã
+spåä½ã§æ ¼ç´ãã¦ããï¼
+\item[\texttt{jfm}]
+å©ç¨ããã¦ããJFMãèå¥ããããã®çªå·ï¼
+\item[\texttt{var}]
+\verb+\jfont+ã§æå®ããã \texttt{jfmvar} ãã¼ã®å¤ï¼æªæå®ã®ã¨ãã¯ç©ºæååï¼ï¼
+\item[\texttt{chars}]
+æåã³ã¼ãããæåã¯ã©ã¹ã¸ã®å¯¾å¿ãè¨è¿°ããããã¼ãã«ï¼\\
+JFMå
ã® \texttt{[i].chars=\{, ...\}} ã¨ããæå®ã¯\
+\texttt{chars=\{[]=\,$i$, ...\}} ã¨ããå½¢å¼ã«å¤æããã¦ããï¼
+\item[\texttt{char\_type}]
+$i\in\omega$ã«å¯¾ãã¦ï¼\texttt{char\_type[$i$]} ã¯æåã¯ã©ã¹$i$ã®æåã®å¯¸æ³ãæ ¼ç´ãã¦ããï¼
+以ä¸ã®ãã£ã¼ã«ããæã¤ï¼
\begin{itemize}
-\item There is a \texttt{chars} table, \dots
-\item The value in \texttt{zw},~\texttt{zh}, \texttt{kanjiskip},~\texttt{xkanjiskip} fields are
-now scaled by real font size, and in scaled-pont unit.
-\item ...
-\item There is no \texttt{dir} field in this table.
+ \item \texttt{width},~\texttt{height}, \texttt{depth},
+ \texttt{italic}, \texttt{down},~\texttt{left}\ ã¯
+JFMã§æå®ããã¦ããããããã®å¤ãã¹ã±ã¼ãªã³ã°ãããã®ã§ããï¼
+ \item \texttt{align} ã¯JFMã§æå®ããã¦ããå¤ã«ãã£ã¦ï¼
+\[
+ \begin{cases}
+ 0&\text{\texttt{'left'}ãçç¥æ}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'}
+ \end{cases}
+\]
+ã®ããããã®å¤ãã¨ãï¼
+\item $j\in \omega$ã«å¯¾ãã¦ï¼\texttt{[$j$]} ã¯æåã¯ã©ã¹$i$ã®æåã¨$j$ã®æåã®éã«æ¿å
¥ãããkern
+ ãglueãæ ¼ç´ãã¦ããï¼
+éã«å
¥ããã®ãkernã§ããã°ï¼ãã®ãã£ã¼ã«ãã®å¤ã¯\
+\texttt{[$j$]=\{false, , \}} ã§ããï¼
+ã¯kernã表ããã¼ããã®ãã®ã§ãã\footnote{%
+æ¬ãã¼ã¸ã§ã³ã§ã¯å©ç¨å¯è½ãªãã°ãã¼ãã®ã¢ã¯ã»ã¹ææ³ã«direct access
+ modelãç¨ãã¦ããï¼ãã®ããï¼ä¾ãã°\LuaTeX\ beta-0.78.2ã§ã¯ï¼åãªãèªç¶æ°ã®ããã«ã
+ ãè¦ããªããã¨ã«æ³¨æï¼
+}ï¼
+glueã§ããã°ï¼\texttt{[$j$]=\{false, , , \}} ã§ããï¼
+ã¯glueã®é·ãã表ããã¼ããã®ãã®ã§ããï¼
+ $\text{}=\textit{from\_jfm}+\text{}$ã§ããï¼
\end{itemize}
-%
-
-\item[\tt var]
-%The value specified in \texttt{jfmvar=...} at a call of \verb+\jfont+.
-%\verb+\jfont+ ã®å¼ã³åºãã®éã«\texttt{jfmvar=...}ã§æå®ãããå¤ï¼
\end{description}
+%
%<*en>
-The returned table \verb+new_jfont_info+ also should include these two fields.
+The returned table \verb+new_jfont_info+ also should include these fields, but
+you are free to add more fields (to use them in the \texttt{luatexja.find\_char\_class} callback).
The \verb+font_number+ is a font number.
%
%<*ja>
-æ»ãå¤ã® \verb+new_jfont_info+ ãã¼ãã«ãããã2ã¤ã®ãã£ã¼ã«ããå«ã¾ãªããã°ãªããªããï¼
+æ»ãå¤ã® \verb+new_jfont_info+ ãã¼ãã«ãä¸ã«è¿°ã¹ããã£ã¼ã«ãããã®ã¾ã¾å«ã¾ãªããã°ãªããªããï¼
ãã以å¤ã«ã¦ã¼ã¶ãåæã«ãã£ã¼ã«ããä»ãå ãããã¨ã¯èªç±ã§ããï¼
\verb+font_number+ ã¯ãã©ã³ãçªå·ã§ããï¼
%
@@ -3338,12 +3683,12 @@ end
%<*en>
The argument \verb+shift_info+ and the returned \verb+new_shift_info+ have
\texttt{down} and \texttt{left} fields, which are the amount of shifting
- down/left the character in a scaled-point.
+ down/left the character in a scaled point.
%
%<*ja>
å¼æ° \verb+shift_info+ ã¨æ»ãå¤ã® \verb+new_shift_info+ ã¯
\texttt{down}ã¨\texttt{left}ã®ãã£ã¼ã«ããæã¡ï¼ãããã®å¤ã¯
-æåã®ä¸ï¼å·¦ã¸ã®ã·ããéï¼ã¹ã±ã¼ã«ãã»ãã¤ã³ãåä½ï¼ã§ããï¼
+æåã®ä¸ï¼å·¦ã¸ã®ã·ããéï¼spåä½ï¼ã§ããï¼
%
%<*en>
@@ -3380,11 +3725,12 @@ Then, the position of glyphs is shifted up by
%\section{Parameters}
%\section{ãã©ã¡ã¼ã¿}
-\subsection{\texttt{\char`\\ltjsetparameter}}
+\subsection{\texttt{\textbackslash ltjsetparameter}}
+\label{ssec-param}
%<*en>
As described before, \verb+\ltjsetparameter+ and \verb+\ltjgetparameter+ are
-control sequences for accessing most parameters of \LuaTeX-ja. One of the main
+commands for accessing most parameters of \LuaTeX-ja. One of the main
reason that \LuaTeX-ja didn't adopted the syntax similar to that of \pTeX\
(\textit{e.g.},~\verb+\prebreakpenalty`ï¼=10000+)
is the position of \verb+hpack_filter+ callback in the source
@@ -3395,11 +3741,11 @@ of \LuaTeX, see Section~\ref{sec-para}.
\LuaTeX-jaã®ã»ã¨ãã©ã®ãã©ã¡ã¼ã¿ã«ã¢ã¯ã»ã¹ããããã®å½ä»¤ã§ããï¼
\LuaTeX-jaã\pTeX ã®ãããªææ³ï¼ä¾ãã°ï¼\verb+\prebreakpenalty`ï¼=10000+ï¼ã
æ¡ç¨ããªãçç±ã®ä¸ã¤ã¯ï¼\LuaTeX ã®ã½ã¼ã¹ã«ããã \verb+hpack_filter+
-ã³ã¼ã«ããã¯ã®ä½ç½®ã«ããï¼\ref{sec-para}ç¯ãåç
§ï¼
+ã³ã¼ã«ããã¯ã®ä½ç½®ã«ããï¼\ref{sec-para}ç« ãåç
§ï¼
%
%<*en>
-\verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+ are control sequences
+\verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+ are commands
for assigning parameters. These take one argument which is a
\texttt{=} list.
The list of allowed keys are described in the next subsection.
@@ -3423,41 +3769,9 @@ like other assignment.
%
%<*en>
-\verb+\ltjgetparameter+ is for acquiring parameters. It
-always takes a parameter name as first argument, and also takes the
-additional argument---a character code, for example---in some cases.
-%
-%<*ja>
-\verb+\ltjgetparameter+ ã¯ãã©ã¡ã¼ã¿ã®å¤ãåå¾ããããã®å½ä»¤ã§ããï¼
-常ã«ãã©ã¡ã¼ã¿ã®ååã第ä¸å¼æ°ã«ã¨ãï¼
-ããã¦ï¼ããã¤ãã®å ´åã«ã¯å ãã¦ããã«å¼æ°ï¼ä¾ãã°æåã³ã¼ãï¼ãã¨ãï¼
-%
-\begin{LTXexample}
-\ltjgetparameter{differentjfm},
-\ltjgetparameter{autospacing},
-\ltjgetparameter{prebreakpenalty}{`ï¼}.
-\end{LTXexample}
-%<*en>
-\emph{The return value of\/ {\normalfont\tt\char92ltjgetparameter} is
-always a string}. This is outputted by \texttt{tex.write()}, so any
-character other than space~``\texttt{\char32}''~(\texttt{U+0020}) has the category code
-12~(other), while the space has 10~(space).
-%
-%<*ja>
-\emph{{\normalfont\tt\char92ltjgetparameter}ã®æ»ãå¤ã¯å¸¸ã«æååã§ããï¼}
-ããã¯\texttt{tex.write()}ã«ãã£ã¦åºåãã¦ããããã§ï¼ç©ºç½ã\texttt{\char32}ã
-(\texttt{U+0020})ãé¤ããæåã®ã«ãã´ãªã¼ã³ã¼ãã¯å
¨ã¦12~(other)ã¨ãªãï¼
-ä¸æ¹ï¼ç©ºç½ã®ã«ãã´ãªã¼ã³ã¼ãã¯10~(space)ã§ããï¼
-%
-
-%\subsection{List of Parameters}
-%\subsection{ãã©ã¡ã¼ã¿ä¸è¦§}
-\label{ssec-param}
-
-%<*en>
-The following is the list of parameters which can be specified by the
-\verb+\ltjsetparameter+ command. [\verb+\cs+] indicates the counterpart
-in \pTeX, and symbols beside each parameter has the following meaning:
+The following is the list of parameters which can be specified by the
+\verb+\ltjsetparameter+ command. [\verb+\cs+] indicates the counterpart
+in \pTeX, and symbols beside each parameter has the following meaning:
%
%<*ja>
以ä¸ã¯ \verb+\ltjsetparameter+ ã«æå®ãããã¨ãã§ãããã©ã¡ã¼ã¿ã®ä¸è¦§ã§ããï¼
@@ -3466,11 +3780,11 @@ in \pTeX, and symbols beside each parameter has the following meaning:
%
\begin{itemize}
%<*en>
-\item ``\ast'' : values at the end of a paragraph or a horizontal box are
-adopted in the whole paragraph or the whole horizontal box.
+\item ``\ast'' : values at the end of a paragraph or a hbox are
+adopted in the whole paragraph or the whole hbox.
%
%<*ja>
-\item ``\ast''ï¼æ®µè½ãæ°´å¹³ããã¯ã¹ã®çµç«¯ã§ã®å¤ããã®æ®µè½ï¼æ°´å¹³ããã¯ã¹å
¨ä½ã§ç¨ããããï¼
+\item ``\ast''ï¼æ®µè½ãhboxã®çµç«¯ã§ã®å¤ããã®æ®µè½ï¼hboxå
¨ä½ã§ç¨ããããï¼
%
%<*en>
\item ``\dagger'': assignments are always global.
@@ -3548,7 +3862,11 @@ Set a penalty which is inserted automatically after the character ,
to prevent a line ends with this character.
\pTeX\ has following restrictions on \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+,
but they don't exist in \LuaTeX-ja:
-\dots
+\begin{itemize}
+ \item Both \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+ cannot be set
+for the same character.
+ \item We can set \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+ up to 256~characters.
+\end{itemize}
%
\item[\Param{jatextfont}\,=\{,\}$^\ast$]
@@ -3650,29 +3968,235 @@ JFMï¼ãããã¯ãµã¤ãºï¼ãç°ãªã2ã¤ã®\textbf{JAchar}ã®éã«ã°ã«
å
¥ããããæå®ããï¼
許ãããå¤ã¯ä»¥ä¸ã®éãï¼
%
-\begin{description}
-\item[\texttt{average}]
-\item[\texttt{both}]
-\item[\texttt{large}]
-\item[\texttt{small}]
-\item[\texttt{pleft}]
-\item[\texttt{pright}]
-\item[\texttt{paverage}]
-\end{description}
+\begin{quote}
+\texttt{average},
+\texttt{both},
+\texttt{large},
+\texttt{small},
+\texttt{pleft},
+\texttt{pright},
+\texttt{paverage}
+\end{quote}
+%<*en>
+The default value is \texttt{paverage}. \dots
+%
+%<*ja>
+ããã©ã«ãå¤ã¯ \texttt{paverage} ã§ããï¼
+åã
ã®å¤ã«ããå·®ç°ã®è©³ç´°ã¯\ref{ssec-cluster-wa}ç¯ã®ããå³ç©ºç½ãã®ç®åºããåç
§ãã¦ã»ããï¼
+%
\item[\Param{jacharrange}\,=]
\item[\Param{kansujichar}\,=\{, \}$^\ast$] [\verb+\kansujichar+]
\end{list}
+\subsection{\texttt{\textbackslash ltjgetparameter}}
+\label{ssec-getpar}
+%<*en>
+\verb+\ltjgetparameter+ is a conteol sequence for acquiring parameters. It
+always takes a parameter name as first argument.
+%
+%<*ja>
+\verb+\ltjgetparameter+ ã¯ãã©ã¡ã¼ã¿ã®å¤ãåå¾ããããã®å½ä»¤ã§ããï¼
+常ã«ãã©ã¡ã¼ã¿ã®ååã第ä¸å¼æ°ã«ã¨ãï¼
+%
+\begin{LTXexample}
+\ltjgetparameter{differentjfm},
+\ltjgetparameter{autospacing},
+\ltjgetparameter{kanjiskip},
+\ltjgetparameter{prebreakpenalty}{`ï¼}.
+\end{LTXexample}
+
+%<*en>
+\emph{The return value of\/ {\normalfont\tt\textbackslash ltjgetparameter} is
+always a string}. This is outputted by \texttt{tex.write()}, so any
+character other than space~``\texttt{\char32}''~(\texttt{U+0020}) has the category code
+12~(other), while the space has 10~(space).
+%
+%<*ja>
+\emph{{\normalfont\tt\textbackslash ltjgetparameter}ã®æ»ãå¤ã¯å¸¸ã«æååã§ããï¼}
+ããã¯\texttt{tex.write()}ã«ãã£ã¦åºåãã¦ããããã§ï¼ç©ºç½ã\texttt{\char32}ã
+(\texttt{U+0020})ãé¤ããæåã®ã«ãã´ãªã¼ã³ã¼ãã¯å
¨ã¦12~(other)ã¨ãªãï¼
+ä¸æ¹ï¼ç©ºç½ã®ã«ãã´ãªã¼ã³ã¼ãã¯10~(space)ã§ããï¼
+%
+
+\begin{itemize}
+\item
+%<*en>
+If first argument is one of the
+following, no additional argument is needed.
+%
+%<*ja>
+第1å¼æ°ã次ã®ããããã®å ´åã«ã¯ï¼è¿½å ã®å¼æ°ã¯å¿
è¦ãªãï¼
+%
+\begin{quote}
+\sffamily
+jcharwidowpenalty, yjabaselineshift, yalbaselineshift, autospacing, autoxspacing,\\
+kanjiskip, xkanjiskip, differentjfm
+\end{quote}
+%<*en>
+Note that \verb+\ltjgetparameter{autospacing}+~and~\verb+\ltjgetparameter{autoxspacing}+
+returns 1 or 0, not
+\texttt{true}~nor~\texttt{false}.
+%
+%<*ja>
+\verb+\ltjgetparameter{autospacing}+ 㨠\verb+\ltjgetparameter{autoxspacing}+ ã¯ï¼
+\texttt{true}ã\texttt{false}ãè¿ãã®\emph{ã§ã¯ãªã}ï¼
+1ã¨0ã®ãããããè¿ããã¨ã«æ³¨æï¼
+%
+
+\item
+%<*en>
+If first argument is one of the
+following, an additional argument---a character code, for example---is needed.
+%
+%<*ja>
+第1å¼æ°ã次ã®ããããã®å ´åã«ã¯ï¼ããã«æåã³ã¼ãã第äºå¼æ°ã¨ãã¦ã¨ãï¼
+%
+\begin{quote}
+\sffamily
+kcatcode, prebreakpenalty, postbreakpenalty, jaxspmode, alxspmode
+\end{quote}
+%<*en>
+\verb+\ltjgetparameter{jaxspmode}{...}+~and~\verb+\ltjgetparameter{alxspmode}{...}+
+returns 0,~1, 2,~or~3, instead of \texttt{preonly} etc.
+%
+%<*ja>
+\verb+\ltjgetparameter{jaxspmode}{...}+ ã \verb+\ltjgetparameter{alxspmode}{...}+\
+ã¯ï¼\texttt{preonly} ãªã©ã¨ãã£ãæååã§ã¯ãªãï¼0ãã3ã¾ã§ã®å¤ãè¿ãï¼
+%
+
+\item
+%<*en>
+\verb+\ltjgetparameter{jacharrange}{+\verb+}+ returns \texttt{0}
+if ``characters which belong to the character range~ are \textbf{JAchar}'',
+\texttt{1} if ``\dots are \textbf{ALchar}''.
+Although there is no character range~$-1$, specifying $-1$ to does not cause an
+ error (returns 1).
+%
+%<*ja>
+\verb+\ltjgetparameter{jacharrange}{+\verb+}+ ã¯ï¼ã\textbf{JAchar}éã®
+ç¯å²ãªãã°0ãï¼ããã§ãªããã°1ãè¿ãï¼ã$-1$çªã®æåç¯å²ãã¯åå¨ããªããï¼ã«$-1$ã
+æå®ãã¦ãã¨ã©ã¼ã¯çºçããªãï¼1ãè¿ãï¼ï¼
+%
+
+\item
+%<*en>
+For an integer~ between 0~and~9,
+ \verb+\ltjgetparameter{kansujichar}{+\verb+}+ returns the character code
+of the result of \verb+\kansuji+.
+%
+%<*ja>
+0--9ã®æ°ã«å¯¾ãã¦ï¼
+\verb+\ltjgetparameter{kansujichar}{+\verb+}+ ã¯ï¼\verb+\kansuji+ã§åºåãã
+ ãæåã®æåã³ã¼ããè¿ãï¼
+%
+
+
+\item
+%<*en>
+The following parameter names \emph{cannot be specified} in \verb+\ltjgetparameter+.
+%
+%<*ja>
+次ã®ãã©ã¡ã¼ã¿åã \verb+\ltjgetparameter+ ã«æå®ãããã¨ã¯ã§ããªãï¼
+%
+\begin{quote}
+\sffamily
+jatextfont, jascriptfont, jascriptscriptfont, jacharrange
+\end{quote}
+
+\item
+%<*en>
+\verb+\ltjgetparameter{chartorange}{+\verb+}+ returns
+the range number which belongs to
+(although there is no parameter named ``chartorange'').
+
+If is between 0 and 127, this does not belong to
+any character range. In this case,
+ \verb+\ltjgetparameter{chartorange}{+\verb+}+
+returns $-1$.
+
+Hence, one can know whether is \textbf{JAchar} or not
+by the following:
+%
+%<*ja>
+\verb+\ltjgetparameter{chartorange}{+\verb+}+ ã«ãã£ã¦
+ã®å±ããæåç¯å²ã®çªå·ãç¥ããã¨ãã§ããï¼
+
+ã«0--127ã®å¤ãæå®ããå ´åï¼ãã®ã¨ãï¼ãå±ãã
+æåç¯å²ã¯åå¨ããªãï¼ã¯$-1$ãè¿ãï¼
+
+ãã®ããï¼ã\textbf{JAchar}ã\textbf{ALchar}ãã¯
+次ã§ç¥ããã¨ãã§ããï¼
+%
+\begin{quote}
+\ttfamily \verb+\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{+%
+ \verb+}}+\\\null\hfill\verb+% 0 if JAchar, 1 if ALchar+
+\end{quote}
+
+\end{itemize}
+
+\subsection{\texttt{\textbackslash ltjsetkanjiskip}, \texttt{\textbackslash ltjsetxkanjiskip}}
+%<*ja>
+\verb+\ltjsetparameter+ 㨠\verb+\ltjglobalsetparameter+ ã¯ï¼å¼æ°ã常ã«key-valueãªã¹ãã§ã
+ãããï¼ä¸åã®å®è¡ã«æéããããã¨ããé£ç¹ãããï¼ç¹ã«ã¯ã©ã¹ \Pkg{ltjsclasses} ã«ããã¦ã¯ï¼
+ãã©ã³ããµã¤ãºã®è¨å®(\verb+\@setfontsize+)ãã¨ã«æ¯å
+\Param{kanjiskip}ã¨\Param{xkanjiskip}ãè¨å®ãããããï¼
+ããã«ããé度ä½ä¸ãé¡èãªãã®ã¨ãªã£ã¦ããï¼
+
+ããã解決ããããï¼ããå
é¨ã«è¿ãå½ä»¤ã¨ãã¦\
+\verb+\ltjsetkanjiskip{+\verb+}+ ã¨\\
+\verb+\ltjsetxkanjiskip{+\verb+}+\ ã
+ç¨æããï¼ãããã®å®è¡ã®åã«ã¯ï¼\TeX ã® \verb+\globaldefs+ ã®å¤ãåæ ãããããã«\
+\verb+\ltj@setpar@global+\ ã®å®è¡ãå¿
è¦ã¨ãï¼
+\begin{lstlisting}
+\ltj@setpar@global
+\ltjsetkanjiskip{0pt plus .1\zw minus .01\zw}
+\ltjsetxkanjiskip{0.25em plus 0.15em minus 0.06em}
+\end{lstlisting}
+ã¨
+\begin{lstlisting}
+\ltjsetparemeter{%
+ kanjiskip=0pt plus .1\zw minus .01\zw,
+ xkanjiskip=0.25em plus 0.15em minus 0.06em}
+\end{lstlisting}
+ã¯åãæå³ãæã¤ï¼
+%
+%<*en>
+\verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+ are slow,
+since their argument is a key-value list.
+This can be a problem in \Pkg{ltjsclasses}, because
+\Param{kanjiskip} and \Param{xkanjiskip} are set in every font resizing commands
+(\verb+\@setfontsize+). To overcome this problem,
+this version of \LuaTeX-ja provides two more internal commands, namely
+\verb+\ltjsetkanjiskip{+\verb+}+ and \verb+\ltjsetxkanjiskip{+\verb+}+.
+
+Note that \verb+\ltj@setpar@global+ command is needed before these two commands
+to reflect \TeX's internal parameter \verb+\globaldefs+.
+\begin{lstlisting}
+\ltj@setpar@global
+\ltjsetkanjiskip{0pt plus .1\zw minus .01\zw}
+\ltjsetxkanjiskip{0.25em plus 0.15em minus 0.06em}
+\end{lstlisting}
+and
+\begin{lstlisting}
+\ltjsetparemeter{%
+ kanjiskip=0pt plus .1\zw minus .01\zw,
+ xkanjiskip=0.25em plus 0.15em minus 0.06em}
+\end{lstlisting}
+have the same meaning.
+%
+
-%\section{Other Control Sequences which are available in both plain \TeX\ and \LaTeXe}
+
+%\section{Other Commands for plain \TeX\ and \LaTeXe}
%\section{plainã§ã\LaTeX ã§ãå©ç¨å¯è½ãªãã®ä»ã®å½ä»¤}
-%\subsection{Control Sequences for Compatibility}
+%\subsection{Commands for Compatibility with \pTeX}
%\subsection{\pTeX äºæç¨å½ä»¤}
%<*en>
-The following control sequences are implemented for compatibility with \pTeX.
-Note that these don't support JIS~X~0213, but only JIS~X~0208.
+The following commands are implemented for compatibility with \pTeX.
+Note that the former five commands don't support JIS~X~0213, but only JIS~X~0208.
+The last \verb+\kansuji+ converts an integer into its Chinese numerals.
%
%<*ja>
以ä¸ã®å½ä»¤ã¯\pTeX ã¨ã®äºææ§ã®ããã«å®è£
ããã¦ããï¼ãã®ããï¼JIS~X~0213ã«ã¯å¯¾å¿ããï¼
@@ -3682,7 +4206,7 @@ Note that these don't support JIS~X~0213, but only JIS~X~0208.
\verb+\kuten+, \verb+\jis+, \verb+\euc+, \verb+\sjis+, \verb+\jis+, \verb+\kansuji+
\end{center}
%<*en>
-These 6 control sequence takes an internal integer, and returns a \emph{string}.
+These six commands takes an internal integer, and returns a \emph{string}.
%
%<*ja>
ããã6å½ä»¤ã¯å
é¨æ´æ°ãå¼æ°ã¨ãããï¼å®è¡çµæã¯\textbf{æåå}ã§ãããã¨ã«æ³¨æï¼
@@ -3695,22 +4219,31 @@ These 6 control sequence takes an internal integer, and returns a \emph{string}.
\kansuji1701
\end{LTXexample}
+%<*en>
+To change characters of Chinese numerals for each digit, set \Param{kansujichar} parameter:
+\begin{LTXexample}
+\ltjsetparameter{kansujichar={1,`壹}}
+\ltjsetparameter{kansujichar={7,`æ¼}}
+\ltjsetparameter{kansujichar={0,`é¶}}
+\kansuji1701
+\end{LTXexample}
+%
-%\subsection{\texttt{\char`\\inhibitglue}}
-%\subsection{\texttt{\char`\\inhibitglue}}
+%\subsection{\texttt{\textbackslash inhibitglue}}
+%\subsection{\texttt{\textbackslash inhibitglue}}
%<*en>
\verb+\inhibitglue+ suppresses the insertion of \textbf{JAglue}.
The following is an example, using a special JFM that there will be a glue between
-the beginning of a box and `ã', and also between `ã' and `ã¦'.
+the beginning of a box and ``ã'', and also between ``ã''~and~``ã¦''.
%
%<*ja>
\verb+\inhibitglue+ ã¯\textbf{JAglue}ã®æ¿å
¥ãæå¶ããï¼
-以ä¸ã¯ï¼ããã¯ã¹ã®å§ãã¨`ã'ã®éï¼`ã'ã¨`ã¦'ã®éã«ã°ã«ã¼ãå
¥ãç¹å¥ãªJFMãç¨ããä¾ã§
+以ä¸ã¯ï¼ããã¯ã¹ã®å§ãã¨ãããã®éï¼ããããã¦ãã®éã«ã°ã«ã¼ãå
¥ãç¹å¥ãªJFMãç¨ããä¾ã§
ããï¼
%
-\begin{LTXexample}
+\begin{LTXexample}[width=0.4\textwidth]
\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g
\fbox{\hbox{ãã¦ã\inhibitglue ã¦}}
\inhibitglue\par\noindent ã1
@@ -3766,9 +4299,38 @@ With the help of this example, we remark the specification of \verb+\inhibitglue
\end{itemize}
-\subsection{\texttt{\char`\\ltjdeclarealtfont}}
+\subsection{\texttt{\textbackslash ltjdeclarealtfont}}
\label{ssec-altfont}
-%\dots
+%<*en>
+Using \verb+\ltjdeclarealtfont+, one can ``compose'' more than one Japanese fonts.
+This \verb+\ltjdeclarealtfont+ uses in the following form:
+\begin{quote}
+\ttfamily \textbackslash ltjdeclarealtfont{}
+\end{quote}
+where ~and~ are defined by \verb+\jfont+.
+Its meaning is
+\begin{quote}
+If the current Japanese font is , characters which belong to
+is typeset by another Japanese font , instead of .
+\end{quote}
+
+ is a comma-separated list of character codes, but also accepts negative integers:
+$-n$~($nâ¥1$) means that all characters of character classes~$n$, with respect to JFM used
+by . Note that characters which do not exist in are
+ignored.
+
+For example, if \verb+\hoge+ uses \texttt{jfm-ujis.lua}, the standard JFM of \LuaTeX-ja,
+then
+\begin{verbatim}
+\ltjdeclarealtfont\hoge\piyo{"3000-"30FF, {-1}-{-1}}
+\end{verbatim}
+does
+\begin{quote}
+If the current Japanese font is \verb+\hoge+, \texttt{U+3000}--\texttt{U+30FF}
+and characters in class~1 (ideographic opening brackets)
+are typeset by \verb+\piyo+.
+\end{quote}
+%
%<*ja>
\verb+\jfont+ ã®æ¸å¼ãè¦ãã°ãããããã«ï¼åºæ¬çã«ã¯\LuaTeX-jaã«ããã1ã¤ã®åæãã©ã³ãã«
使ç¨åºæ¥ããå®éã®ãã©ã³ããã¯1ã¤ã§ããï¼
@@ -3776,7 +4338,7 @@ With the help of this example, we remark the specification of \verb+\inhibitglue
\verb+\ltjdeclarealtfont+ ã¯ä»¥ä¸ã®æ¸å¼ã§ä½¿ç¨ããï¼
\begin{quote}
-\ttfamily \char`\\ltjdeclarealtfont{}
+\ttfamily \textbackslash ltjdeclarealtfont{}
\end{quote}
ããã¯ãç¾å¨ã®åæãã©ã³ãããã§ããã¨ãï¼
ã«å±ããæåã¯ãç¨ãã¦çµçãããï¼ã¨ããæå³ã§ããï¼
@@ -3797,7 +4359,7 @@ With the help of this example, we remark the specification of \verb+\inhibitglue
\ltjdeclarealtfont\hoge\piyo{"3000-"30FF, {-1}-{-1}}
\end{verbatim}
ã¯ã\verb+\hoge+ ãå©ç¨ãã¦ããã¨ãï¼
-\texttt{U+3000}-\texttt{U+30FF}ã¨
+\texttt{U+3000}--\texttt{U+30FF}ã¨
æåã¯ã©ã¹1ï¼éãæ¬å¼§é¡ï¼ä¸ã®æåã ã㯠\verb+\piyo+ ãç¨ããã
ãã¨ãè¨å®ããï¼\verb+{-1}-{-1}+ ã¨ããå¤ãã£ãæå®ã®ä»æ¹ããã¦ããã®ã¯ï¼
æ®éã« \texttt{-1} ã¨æå®ããã®ã§ã¯æ£ãã$-1$ã¨èªã¿åãããªãã¨ãã
@@ -3806,54 +4368,84 @@ With the help of this example, we remark the specification of \verb+\inhibitglue
-%\section{Control Sequences for \LaTeXe}
+%\section{Commands for \LaTeXe}
%\section{\LaTeXe ç¨ã®å½ä»¤}
%\subsection{Patch for NFSS2}
%\subsection{NFSS2ã¸ã®ããã}
-\label{ssub-nfsspat}
+\label{ssec-nfsspat}
\begin{figure}[!tb]
-\begin{lstlisting}[numberstyle=\tiny, numbers=left, numbersep=1em]
+\begin{LTXexample}[pos=b]
\DeclareKanjiFamily{JY3}{edm}{}
-\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*IPAexMincho:jfm=ujis}{}
-\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*IPAexMincho:jfm=ujis;color=007F00}{}
-\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*IPAexMincho:jfm=ujis;color=0000FF}{}
-\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}}
-\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF}
-{\kanjifamily{edm}\selectfont
-æ¥æ¬å½æ°ã¯ãæ£å½ã«é¸æãããå½ä¼ã«ããã代表è
ãéãã¦è¡åããâ¦â¦}
-\end{lstlisting}
-\begin{quote}
-\DeclareKanjiFamily{JY3}{edm}{}
-\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis}{}
+\DeclareFontShape{JY3}{edm}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;}{}
\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*KozMinPr6N-Regular:jfm=ujis;color=007F00}{}
\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*KozMinPr6N-Regular:jfm=ujis;color=0000FF}{}
\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}}
\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF}
-
{\kanjifamily{edm}\selectfont
æ¥æ¬å½æ°ã¯ãæ£å½ã«é¸æãããå½ä¼ã«ããã代表è
ãéãã¦è¡åããâ¦â¦}
-\end{quote}
-%\caption{\texttt{\char92DeclareAlternateKanjiFont} ã®ä½¿ç¨ä¾}
-%\caption{An example of \texttt{\char92DeclareAlternateKanjiFont}}
+\end{LTXexample}
+%\caption{\texttt{\textbackslash DeclareAlternateKanjiFont} ã®ä½¿ç¨ä¾}
+%\caption{An example of \texttt{\textbackslash DeclareAlternateKanjiFont}}
\label{fig:altkanji}
\end{figure}
%<*en>
-As described in Subsection~\ref{ssec-ltx}, Japanese patch for NFSS2 in \LuaTeX-ja
+Japanese patch for NFSS2 in \LuaTeX-ja
is based on \texttt{plfonts.dtx} which plays the same role in \pLaTeXe.
-For an convenience, we will describe
-control sequences which are not described in Subsection~\ref{ssub-chgfnt}.
+We will describe
+commands which are not described in Subsection~\ref{ssec-chgfnt}.
%
%<*ja>
-\ref{ssec-ltx}ç¯ã§è¿°ã¹ãããã«ï¼\LuaTeX-jaã®NFSS2ã¸ã®æ¥æ¬èªãããã¯
-\pLaTeXe ã§åæ§ã®å½¹å²ãæãã \texttt{plfonts.dtx} ãã»ã¼ãã®ã¾ã¾å©ç¨ãã¦ããï¼
-便å®ã®ããï¼ããã§ã¯\ref{ssub-chgfnt}ç¯ã§è¿°ã¹ã¦ããªãã£ãå½ä»¤ã«ã¤ãã¦
+\LuaTeX-jaã®NFSS2ã¸ã®æ¥æ¬èªãããã¯
+\pLaTeXe ã§åæ§ã®å½¹å²ãæãã \texttt{plfonts.dtx} ããã¼ã¹ã«ï¼
+åæã¨ã³ã³ã¼ãã£ã³ã°ã®ç®¡ççãLuaã§æ¸ããªããããã®ã§ããï¼
+ããã§ã¯\ref{ssec-chgfnt}ç¯ã§è¿°ã¹ã¦ããªãã£ãå½ä»¤ã«ã¤ãã¦
è¨è¿°ãã¦ããï¼
%
\begin{cslist}%
+\par\smallskip\par\hskip-\leftskip{\bfseries%
+%追å ã®é·ãå¤æ°é
+%additonal dimensions
+}\par\nobreak
+
+%<*en>
+Like \pLaTeXe, \LuaTeX-ja defines the following dimensions
+for information of current Japanese font:
+%
+%<*ja>
+\pLaTeXe ã¨åæ§ã«ï¼\LuaTeX-jaã¯ãç¾å¨ã®åæãã©ã³ãã®æ
å ±ããæ ¼ç´ããé·ãå¤æ°
+%
+{\let\item=\origitem
+\begin{quote}
+ \verb+\cht+~(height), \verb+\cdp+~(depth), \verb+\cHT+~(sum of former two),\\
+ \verb+\cwd+~(width), \verb+\cvs+~(lineskip), \verb+\chs+~(equals to \verb+\cwd+)
+\end{quote}}
+%and its \verb+\normalsize+ version:
+%ã¨ï¼ãã® \verb+\normalsize+ çã§ãã
+{\let\item=\origitem
+\begin{quote}
+ \verb+\Cht+~(height), \verb+\Cdp+~(depth),
+ \verb+\Cwd+~(width), \\\verb+\Cvs+~(equals to \verb+\baselineskip+),
+ \verb+\Chs+~(equals to \verb+\cwd+)%
+%.
+\end{quote}}
+%<*ja>
+ãå®ç¾©ãã¦ããï¼ãªãï¼\verb+\cwd+ 㨠\verb+\zw+ï¼ã¾ã
+\verb+\cHT+ 㨠\verb+\zh+ ã¯ä¸è´ããªãå¯è½æ§ãããï¼ãªããªãï¼
+\verb+\cwd+,~\verb+\cHT+ ã¯ãããã®å¯¸æ³ãã決å®ãããã®ã«å¯¾ãï¼
+\verb+\zw+ 㨠\verb+\zh+ ã¯JFMã«æå®ãããå¤ã«éããªãããã§ããï¼
+%
+%<*en>
+Note that \verb+\cwd+~and~\verb+\cHT+ may differ from \verb+\zw+~and~\verb+\zh+
+respectively.
+On the one hand the former dimensions are determined from the character ``ã'',
+but on the other hand \verb+\zw+~and~\verb+\zh+ are specified by JFM.
+%
+
+
\item[DeclareYokoKanjiEncoding\{\}\{\}\{\}]
%<*en>
@@ -3878,10 +4470,10 @@ In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families
\item[DeclareErrorKanjiFont\{\}\{\}\{\}\{\}\{\}]
%<*en>
-The above 3~commands are just the counterparts for \verb+DeclareFontEncodingDefaults+ and~others.
+The above 3~commands are just the counterparts for \verb+\DeclareFontEncodingDefaults+ and~others.
%
%<*ja>
-ä¸è¨3ã¤ã®ã³ãã³ãã¯ã¡ããã© \verb+DeclareFontEncodingDefaults+ ãªã©ã«å¯¾å¿ãããã®ã§ããï¼
+ä¸è¨3ã¤ã®ã³ãã³ãã¯ã¡ããã© \verb+\DeclareFontEncodingDefaults+ ãªã©ã«å¯¾å¿ãããã®ã§ããï¼
%
\item[reDeclareMathAlphabet\{\}\{\}\{\}]
@@ -3903,16 +4495,18 @@ The above 3~commands are just the counterparts for \verb+DeclareFontEncodingDefa
\end{center}
ã¨å®ç¾©ãè¡ãã®ã§ï¼ä½¿ç¨ã«ã¯æ³¨æãå¿
è¦ã§ããï¼
\vspace{-\medskipamount}
+%\advance\linewidth-2em
+%\advance\linewidth-2\zw
\begin{itemize}
\item ,~ã¯æ¢ã«å®ç¾©ããã¦ããªããã°ãªããªãï¼
\verb+\reDeclareMathAlphabet+\\ã®å¾ã«
両å½ä»¤ã®å
容ãåå®ç¾©ãã¦ãï¼ã®å
容ã«ããã¯åæ ãããªãï¼
-\item ,~ã«\verb+\@mathrm+ãªã©ã¨\texttt{@}ãã¤ããå½ä»¤ãæå®ããæã®åä½ã¯ä¿è¨¼ã§ããªãï¼
+\item ,~ã«\verb+\@mathrm+ãªã©ã¨ \texttt{@} ãã¤ããå½ä»¤ãæå®ããæã®åä½ã¯ä¿è¨¼ã§ããªãï¼
\end{itemize}}
%
-\item[DeclareRelationFont\{\}\{\}\{\}\{\}\\
- \hfill\{\}\{\}\{\}\{\}]
+\item[DeclareRelationFont\{\}\{\}\{\}\{\}\\*
+ \null\hfill\{\}\{\}\{\}\{\}]
%<*en>
This command sets the ``accompanied'' alphabetic font family (given by the latter 4~arguments)
with respect to a Japanese font family given by the former 4~arguments.
@@ -3940,14 +4534,39 @@ Change current alphabetic font encoding/family/\dots\ to the `accompanied' alpha
Like \verb+\fontfamily+, \verb+\selectfont+ is required to take an effect.
%
%<*ja>
-ç¾å¨ã®æ¬§æãã©ã³ãã¨ã³ã³ã¼ãã£ã³ã°ï¼ãã¡ããªï¼â¦â¦ ãï¼
+ç¾å¨ã®æ¬§æãã©ã³ãã®ã¨ã³ã³ã¼ãã£ã³ã°ï¼ãã¡ããªï¼â¦â¦ ãï¼
\verb+\DeclareRelationFont+ ã \verb+\SetRelationFont+ ã§æå®ããã
ç¾å¨ã®åæãã©ã³ããã¡ããªã«å¯¾å¿ãããå¾å±æ¬§æããã©ã³ããã¡ããªã«å¤æ´ããï¼
\verb+\fontfamily+ ã®ããã«ï¼æå¹ã«ããããã«ã¯ \verb+\selectfont+ ãå¿
è¦ã§ããï¼
%
\item[adjustbaseline]
-\ldots
+%<*en>
+In \pLaTeXe, \verb+\adjustbaseline+ sets \verb+\tbaselineshift+
+to match the vertical center of ``M'' and that of ``ã'' in vertical typesetting:
+\[
+\text{\ttfamily \textbackslash tbaselineshift} \leftarrow
+\frac{(h_{\text{M}}+d_{\text{M}}) - (h_{\text{ã}}+d_{\text{ã}})}2
+ + d_{\text{ã}} - d_{\text{M}},
+\]
+where $h_{a}$~and~$d_{a}$ denote the height of ``$a$'' and the depth, respectively.
+
+Current \LuaTeX-ja does not support vertical typesetting, so
+this \verb+\adjustbaseline+ has almost no effect.
+%
+%<*ja>
+\pLaTeXe ã§ã¯ï¼\verb+\adjustbaseline+ ã¯ç¸¦æ¸æã«ãMãã¨ãããã®ä¸å¿ç·ãä¸è´ãããããã«ï¼
+\verb+\tbaselineshift+ ãè¨å®ããå½¹å²ãæã£ã¦ããï¼
+\[
+\text{\ttfamily \textbackslash tbaselineshift} \leftarrow
+\frac{(h_{\text{M}}+d_{\text{M}}) - (h_{\text{ã}}+d_{\text{ã}})}2
+ + d_{\text{ã}} - d_{\text{M}},
+\]
+ããã§ï¼$h_{a}$,~$d_{a}$ã¯ããããã$a$ãã®é«ãã»æ·±ãã表ãï¼
+
+ç¾å¨ã®\LuaTeX-jaã¯ç¸¦æ¸ãããµãã¼ããã¦ããªãã®ã§ï¼ãã® \verb+\adjustbaseline+ ã¯
+ã»ã¨ãã©ä½ããã¦ããªãï¼
+%
\item[fontfamily\{\}]
%<*en>
@@ -3960,6 +4579,8 @@ to . Which family will be changed is determined as follows:
ã©ã®ãã¡ããªãå¤æ´ããããã¯ä»¥ä¸ã®ããã«ãã¦æ±ºå®ãããï¼
%
{\let\item\origitem
+%\advance\linewidth-2em
+%\advance\linewidth-2\zw
\vspace{-\medskipamount}
\begin{itemize}
%<*en>
@@ -4016,13 +4637,15 @@ In this case, the default family for font substitution is used for
}
\item[DeclareAlternateKanjiFont\{\}\{\}\{\}\{\}\\
- \hfill\{\}\{\}\{\}\{\}\{\}]
+ \null\hfill\{\}\{\}\{\}\{\}\{\}]
%<*ja>
-\ref{ssec-altfont}ç¯ã®
+\ref{ssec-altfont}ç¯ã®\
\verb+\ltjdeclarealtfont+ ã¨åæ§ã«ï¼ååã®4å¼æ°ã®åæãã©ã³ãï¼åºåºãã©ã³ãï¼ã®ãã¡ä¸ã®æåã
第5--第8å¼æ°ã®åæãã©ã³ãã使ã£ã¦çµãããã«æ示ããï¼ä½¿ç¨ä¾ãå³\ref{fig:altkanji}ã«è¼ããï¼
{\let\item\origitem
+%\advance\linewidth-2em
+%\advance\linewidth-2\zw
\vspace{-\medskipamount}
\begin{itemize}
\item
@@ -4032,18 +4655,34 @@ In this case, the default family for font substitution is used for
å®éã«å¹åãçºæ®ããã®ã¯ï¼æ¸ä½å¤æ´ããµã¤ãºå¤æ´ãè¡ã£ãæï¼
ãããã¯ï¼ããããå«ããï¼\verb+\selectfont+ ãå®è¡ãããæã§ããï¼
\item
-段è½ãæ°´å¹³ããã¯ã¹ã®æå¾ã§ã®è¨å®å¤ã段è½ï¼æ°´å¹³ããã¯ã¹å
¨ä½ã«ããã£ã¦éç¨ããç¹ãï¼
+段è½ãhboxã®æå¾ã§ã®è¨å®å¤ã段è½ï¼hboxå
¨ä½ã«ããã£ã¦éç¨ããç¹ãï¼
ã«è² æ°$-n$ãæå®ããå ´åï¼ããããåºåºãã©ã³ãã®æåã¯ã©ã¹$n$ã«å±ããæåå
¨ä½ã
ã¨è§£éãããã®ã¯ \verb+\ltjdeclarealtfont+ ã¨åãã§ããï¼
\end{itemize}%
-%\vspace{-\medskipamount}
}
%
%<*en>
-As \verb+\ltjdeclarealtfont+, characters in of the Japanese font (we say the \emph{base font})
+As \verb+\ltjdeclarealtfont+~(Subsection~\ref{ssec-altfont}),
+characters in of the Japanese font (we say the \emph{base font})
which specified by first 4 arguments are typeset
-by the Japanese font which specified by fifth to eighth arguments.
+by the Japanese font which specified by fifth to eighth arguments
+(we say the \emph{alternate font}).
An example is shown in Figure~\ref{fig:altkanji}.
+
+{\let\item\origitem
+%\advance\linewidth-2em
+%\advance\linewidth-2\zw
+\vspace{-\medskipamount}
+\begin{itemize}
+ \item
+In \verb+\ltjdeclarealtfont+, the base font and the alternate font must be already defined.
+But this \verb+\DeclareAlternateKanjiFont+ is not so.
+In other words, \verb+\DeclareAlternateKanjiFont+ is effective only after
+current Japanese font is changed, or only after \verb+\selectfont+ is executed.
+ \item \dots
+\end{itemize}%
+\vspace{-\medskipamount}
+}
%
\end{cslist}
@@ -4063,23 +4702,35 @@ Avant Garde (OT1/pag/m/n) ã«å¤ãã£ã¦ãããã¨ããããï¼
\userelfont\selectfont ãããabc
\end{LTXexample}
-%\section{Extensions}
-%\section{æ¡å¼µ}
+%<*en>
+\section{Addons}
+\LuaTeX-ja has several addon packages.
+These addons are written as \LaTeX\ packages, but
+\Pkg{luatexja-otf} and~\Pkg{luatexja-adjust} can be loaded in plain \LuaTeX\
+by \verb+\input+.
+%
+%<*ja>
+\section{æ¡å¼µ}
+\LuaTeX-jaã«ã¯ï¼åä½ã«ã¯å¿
é ã§ã¯ãªããï¼èªç±ã«èªã¿è¾¼ããæ¡å¼µãä»å±ãã¦ããï¼
+ãããã¯\LaTeX ã®ããã±ã¼ã¸ã¨ãã¦å¶ä½ãã¦ãããï¼
+\Pkg{luatexja-otf}ã¨\Pkg{luatexja-adjust}ã«ã¤ãã¦ã¯plain \LuaTeX ã§ã\
+\verb+\input+ ã§èªã¿è¾¼ã¿å¯è½ã§ããï¼
+%
\subsection{\texttt{luatexja-fontspec.sty}}
-
+\label{ssec-fontspec2}
%<*en>
As described in Subsection~\ref{ssec-fontspec}, this optional package
provides the counterparts for several commands defined in the
\Pkg{fontspec} packageï¼
-In addition to `font features' in the original \Pkg{fontspec},
-the following `font features' specifications are allowed for
+In addition to OpenType font features in the original \Pkg{fontspec},
+the following ``font features'' specifications are allowed for
the commands of Japanese version:
%
%<*ja>
\ref{ssec-fontspec}ç¯ã§è¿°ã¹ãããã«ï¼ãã®è¿½å ããã±ã¼ã¸ã¯\Pkg{fontspec}
ããã±ã¼ã¸ã§å®ç¾©ããã¦ããã³ãã³ãã«å¯¾å¿ããåæãã©ã³ãç¨ã®ã³ãã³ããæä¾ããï¼
-ãªãªã¸ãã«ã®\Pkg{fontspec}ã§ã®`font feature'ã«å ãã¦ï¼åæçã®ã³ãã³ãã«ã¯
-以ä¸ã®`font feature'ãæå®ãããã¨ãã§ããï¼
+\Pkg{fontspec}ããã±ã¼ã¸ã§æå®å¯è½ãªå種font featureã«å ãã¦ï¼åæçã®ã³ãã³ãã«ã¯
+以ä¸ã®``font feature''ãæå®ãããã¨ãã§ããï¼
%
@@ -4089,7 +4740,7 @@ the commands of Japanese version:
\item[JFM-var=] \
%<*en>
-These 3 font features correspond to \texttt{cid}, \texttt{jfm} and
+These 3 keys correspond to \texttt{cid}, \texttt{jfm} and
\texttt{jfmvar} keys for \verb+\jfont+ respectively.
\texttt{CID} is effective only when with \texttt{NoEmbed}
described below.
@@ -4106,13 +4757,67 @@ See Subsections~\ref{ssec-jfont} and \ref{ssec-psft} for details.
\item[NoEmbed]
%<*en>
-By specifying this font feature, one can use `name-only' Japanese font which
+By specifying this key, one can use ``name-only'' Japanese font which
will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
%
%<*ja>
ãããæå®ãããã¨ã§ï¼PDFã«åãè¾¼ã¾ããªããååã ããã®ãã©ã³ããæå®ãããã¨ã
ã§ããï¼\ref{ssec-psft}ç¯ãåç
§ï¼
%
+
+
+\begin{figure}[!tb]
+\begin{LTXexample}[pos=b]
+\jfontspec[
+ AltFont={
+ {Range="4E00-"67FF, Color=007F00},
+ {Range="6800-"9EFF, Color=0000FF},
+ {Range="3040-"306F, Font=KozGoPr6N-Regular},
+ }
+]{KozMinPr6N-Regular}
+æ¥æ¬å½æ°ã¯ãæ£å½ã«é¸æãããå½ä¼ã«ããã代表è
ãéãã¦è¡åãããããã¨ãããã®åå«ã®ããã«ã
+諸å½æ°ã¨ã®ååã«ããææã¨ãããå½å
¨åã«ããã¤ã¦èªç±ã®ããããæµæ²¢ã確ä¿ããâ¦â¦
+\end{LTXexample}
+%\caption{\texttt{AltFont} ã®ä½¿ç¨ä¾}
+%\caption{An example of \texttt{AltFont}}
+\label{fig:altkanji-fontspec}
+\end{figure}
+
+\item[AltFont]\
+
+%<*en>
+As \verb+\ltjdeclarealtfont+~(Subsection~\ref{ssec-altfont}) and
+\verb+\DeclareAlternateKanjiFont+~(Subsection~\ref{ssec-nfsspat}),
+with this key, one can typeset some Japanese characters
+by a different font and/or using different features.
+The \texttt{AltFont} feature takes a comma-separated list of comma-separated lists,
+as the following:
+%
+%<*ja>
+\ref{ssec-altfont}ç¯ã® \verb+\ltjdeclarealtfont+ ãï¼
+\ref{ssec-nfsspat}ç¯ã® \verb+\DeclareAlternateKanjiFont+ ã¨åæ§ã«ï¼
+ãã®ãã¼ãç¨ããã¨ä¸é¨ã®æåãç°ãªã£ããã©ã³ããfont featureã使ã£ã¦çµããã¨ãã§ããï¼
+\texttt{AltFont} ã«æå®ããå¤ã¯ï¼æ¬¡ã®ããã«äºéã®ã³ã³ãåºåããªã¹ãã§ããï¼
+%
+\begin{lstlisting}[escapechar=\#]
+AltFont = {
+ ...
+ { Range=#\LARG range>#, #\LARG features>#},
+ { Range=#\LARG range>#, Font=#\LARG font~name>#, #\LARG features># },
+ { Range=#\LARG range>#, Font=#\LARG font~name># },
+ ...
+}
+\end{lstlisting}
+%<*en>
+Each sublist should have the \texttt{Range} key
+(sublist which does not contain \texttt{Range} key is simply ignored).
+A demonstrartion is shown in Figure~\ref{fig:altkanji-fontspec}.
+%
+%<*ja>
+åé¨åãªã¹ãã«ã¯ \texttt{Range} ãã¼ãå¿
é ã§ããï¼å«ã¾ããªãé¨åãªã¹ãã¯
+åç´ã«ç¡è¦ãããï¼ï¼
+æå®ä¾ã¯å³\ref{fig:altkanji-fontspec}ã«ç¤ºããï¼
+%
\end{list}
%<*ja>
@@ -4121,20 +4826,22 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
%
-
\subsection{\texttt{luatexja-otf.sty}}
-
+\label{ssec-ltjotf}
%<*en>
This optional package supports typesetting characters in
-Adobe-Japan1. the package \Pkg{luatexja-otf} offers the following 2~low-level
+Adobe-Japan1 character collection
+(or other CID character collecton, if the font is supported).
+The package \Pkg{luatexja-otf} offers the following 2~low-level
commands:
%
%<*ja>
-ãã®è¿½å ããã±ã¼ã¸ã¯Adobe-Japan1ã®æåã®åºåããµãã¼ãããï¼
+ãã®è¿½å ããã±ã¼ã¸ã¯Adobe-Japan1ï¼ãã©ã³ãèªèº«ãæã£ã¦ããã°ï¼
+å¥ã®CIDæåã»ããã§ãå¯ï¼ã®æåã®åºåããµãã¼ãããï¼
\Pkg{luatexja-otf}ã¯ä»¥ä¸ã®2ã¤ã®ä½ã¬ãã«ã³ãã³ããæä¾ããï¼
%
\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
-\item[\char92CID\{\}]
+\item[\textbackslash CID\{\}]
%<*en>
Typeset a character whose CID number is .
%
@@ -4142,7 +4849,7 @@ Typeset a character whose CID number is .
CIDçªå·ãã®æåãåºåããï¼
%
-\item[\char92UTF\{\}]
+\item[\textbackslash UTF\{\}]
%<*en>
Typeset a character whose character code is (in hexadecimal).
This command is similar to \verb+\char"+,\ %"
@@ -4154,6 +4861,13 @@ but please remind remarks below.
%
\end{list}
+%<*ja>
+ãã®ããã±ã¼ã¸ã¯ï¼\texttt{ajmacros.sty}ï¼\Pkg{otf}ããã±ã¼ã¸ä»å±ã®ãã¯ãéï¼äºä¸æµ©ä¸æ°ä½ï¼ãã
+æ¼¢åã³ã¼ããUTF8ã«ãããï¼plain \LuaTeX ã§ãå©ç¨å¯è½ããã¨ãã
+ä¿®æ£ãå ãã \texttt{luatexja-ajmacros.sty} ãèªåçã«èªã¿è¾¼ãï¼
+ãã®ããï¼ãã¯ãéã«ãã \verb+\ajåè§+ ãªã©ã®ãã¯ãããã®ã¾ã¾ä½¿ç¨å¯è½ã§ããï¼
+%
+
%\paragraph{Remarks}
%\paragraph{注æ}
%<*en>
@@ -4182,8 +4896,7 @@ ordinary characters in the following points:
%
\end{itemize}
-
-%\paragraph{Additional Syntax of JFM}
+%\paragraph{Additional syntax of JFM}
%\paragraph{JFMã¸ã®è¨æ³ã®è¿½å }
%<*en>
@@ -4191,13 +4904,27 @@ The package \Pkg{luatexja-otf} extends the syntax of JFM; the entries of \texttt
chars} table in JFM now allows a string in the form
\verb+'AJ1-xxx'+, which stands for the character
whose CID number in Adobe-Japan1 is \verb+xxx+.
+
+This extened notation is used in the standard JFM \texttt{jfm-ujis.lua}
+to typeset halfwidth Hiragana glyphs (CID~516--598) in halfwidth.
%
%<*ja>
-\Pkg{luatexja-otf}ããã±ã¼ã¸ã¯JFMã®è¨æ³ãæ¡å¼µããï¼
+\Pkg{luatexja-otf}ããã±ã¼ã¸ãèªã¿è¾¼ãã¨ï¼
JFMã®\texttt{chars}ãã¼ãã«ã®ã¨ã³ããªã¨ã㦠\verb+'AJ1-xxx'+ ã®å½¢ã®æååã
使ããããã«ãªãï¼ããã¯Adobe-Japan1ã«ãããCIDçªå·ã \verb+xxx+ ã®æåã表ãï¼
+
+ãã®æ¡å¼µè¨æ³ã¯ï¼æ¨æºJFM~\texttt{jfm-ujis.lua}ã§ï¼åè§ã²ãããªã®ã°ãªãï¼CID~516--598ï¼ã
+æ£ããåè§å¹
ã§çµãããã«å©ç¨ããã¦ããï¼
%
+%<*en>
+\paragraph{IVS support}
+Recent fonts support Ideographic Variation Selector (IVS).
+It seems that \Pkg{luaotfload} and \Pkg{fontspec} packages do not support
+IVS, so we implemented IVS support in \Pkg{luatexja-otf}.
+\emph{IVS support is experimental; if you want to enable this, load
+\Pkg{luatexja-otf} and execute the following:}
+%
%<*ja>
\paragraph{IVSãµãã¼ã}
æè¿ã®OpenTypeãã©ã³ããTrueTypeãã©ã³ãã«ã¯ï¼
@@ -4208,51 +4935,61 @@ JFMã®\texttt{chars}ãã¼ãã«ã®ã¨ã³ããªã¨ã㦠\verb+'AJ1-xxx'+ ã®å½¢
IVSã«å¯¾å¿ãã¦ã¯ããªãããã§ããï¼ãããã®ããã±ã¼ã¸ã§å¯¾å¿ãã¦ãããã®ãçæ³çã ãï¼
ããã¾ã§ã®ã¤ãªãã¨ãã¦ï¼\Pkg{luatexja-otf}ããã±ã¼ã¸å
ã«IVS対å¿ãä»è¾¼ãã§ãããï¼
-\def\IVS#1{\char\numexpr "E0100+#1\relax}%"
-\def\IVSA#1#2#3#4#5{%
- \textcolor{blue}{\raisebox{3.5pt}{\tt%
- \fboxsep=1pt\fbox{\tiny \oalign{0#1#2\crcr#3#4#5\crcr}}}}\ignorespaces
-}
-{\catcode`\%=11
- \gdef\IVSB#1{\expandafter\IVSA\directlua{tex.sprint(string.format('%X', 0xE0100+#1))}}}
-
\medskip
\emph{IVS対å¿ã¯è©¦é¨çãªãã®ã§ããï¼
-æå¹ã«ããã«ã¯ï¼\Pkg{luatexja-otf}ããã±ã¼ã¸ãèªã¿è¾¼ãã ä¸ã§ä»¥ä¸ã®å½ä»¤ãå®è¡ããªããã°ãªã
-ãªã\footnote{ãã®å½ä»¤ã2å以ä¸å®è¡ãããã¨ã¯æ³å®ãã¦ããªãã®ã§æ³¨æï¼}ï¼}
+æå¹ã«ããã«ã¯ï¼\Pkg{luatexja-otf}ããã±ã¼ã¸ãèªã¿è¾¼ãã ä¸ã§ä»¥ä¸ã®å½ä»¤ãå®è¡ãã%
+\footnote{ãã®å½ä»¤ã2å以ä¸å®è¡ãã¦ãæå³ããªãï¼}ï¼}
+%
\begin{verbatim}
\directlua{luatexja.otf.enable_ivs()}
\end{verbatim}
-ããã¨ï¼ä¸ã®å½ä»¤ãå®è¡ããç®æ以éã§ã¯ï¼ä»¥ä¸ã®ããã«IVSã«ããåå½¢æå®ãæå¹ã¨ãªãï¼
-\begin{LTXexample}[explpreset={escapechar=\'}, preset={\let\IVSB=\IVS\catcode`\'=9 } ]
+% ããã¨ï¼ä¸ã®å½ä»¤ãå®è¡ããç®æ以éã§ã¯ï¼ä»¥ä¸ã®ããã«IVSã«ããåå½¢æå®ãæå¹ã¨ãªãï¼
+% After executing the command above, you can use IVS like the following:
+\begin{LTXexample}
\Large
-\jfontspec{ipamjm.ttf}% IPA mj ææ
-å¥è¯çè'\IVSB2'åå¸ã¨ï¼æ±äº¬é½è'\IVSB3'飾åºï¼\\
-ããã«ã¡ã¯ï¼æ¸¡%
-é'\IVSB{15}'é'\IVSB{16}'é'\IVSB{17}'é'\IVSB{18}'é'\IVSB{19}'%
-é'\IVSB{20}'é'\IVSB{21}'é'\IVSB{22}'é'\IVSB{23}'é'\IVSB{24}'%
-é'\IVSB{25}'é'\IVSB{26}'é'\IVSB{27}'é'\IVSB{28}'é'\IVSB{29}'%
+\jfontspec{KozMinPr6N-Regular}
+å¥è¯çèó åå¸ã¨ï¼æ±äº¬é½èó 飾åºï¼\\
+ããã«ã¡ã¯ï¼æ¸¡
+éó éó éó éó éó
+éó
éó éó éó éó
+éó éó éó éó éó
ããï¼
\end{LTXexample}
+%<*ja>
å·¦ä¸å´ã®å
¥åã«ããã¦ã¯ï¼æ¼¢åç¨ç°ä½åã»ã¬ã¯ã¿ãæ示ããããï¼
-ä¾ãã°\texttt{U+E0102}ã\IVSB2ã®ããã«è¡¨è¨ãã¦ããï¼
-
+ä¾ãã°Variation~Selector~18 (\texttt{U+E0101})ã\IVSB{18}ã®ããã«è¡¨è¨ãã¦ããï¼
+%
\medskip
+%<*en>
+Specifying glyph variants by IVS precedes glyph replacement by font features.
+For example, only ``è'' in ``è西'' is changed by font features
+\texttt{jp78}~or~\texttt{jp90}, which does not followed by any variation selector.
+%
+%<*ja>
ã¾ãï¼IVSã«ããåå½¢æå®ã¯ï¼font featureã«ããããã«åªå
ããããã¨ã¨ããï¼
ä¸ã®ä¾ã«ããã¦ï¼\texttt{jp78}, \texttt{jp90} æå®ã§åå½¢ãå¤åããæåã¯
ç°ä½åã»ã¬ã¯ã¿ãç¶ãã¦ããªããè西ãä¸ã®ãèãã®ã¿ã§ããï¼
-\begin{LTXexample}[explpreset={escapechar=\'}, preset={\let\IVSB=\IVS\catcode`\'=9 } ]
+%
+\begin{LTXexample}
\def\TEST#1{%
{\jfontspec[#1]{KozMinPr6N-Regular}%
- è'\IVSB0'åå¸ï¼è'\IVSB1'飾åºï¼è西}\\}
+ èó åå¸ï¼èó 飾åºï¼è西}\\}
æå®ãªãï¼\TEST{}
\texttt{jp78}ï¼\TEST{CJKShape=JIS1978}
\texttt{jp90}ï¼\TEST{CJKShape=JIS1990}
\end{LTXexample}
-
+%<*ja>
+ç¾ç¶ã§ã¯ï¼\TeX å´ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãªã \Pkg{luatexja-otf.sty} ã¯ä¸åå¤æ´ãã¦ããªã
+ã®ã§ï¼ZRããã«ãã\Pkg{PXipamjm}ããã±ã¼ã¸%
+\footnote{\url{https://github.com/zr-tex8r/PXipamjm}. 説æã¯å½¼ã®ããã°è¨äº
+ãpxipamjm ããã±ã¼ã¸ã®èª¬ææ¸ã®ãããªä½ã(\url{http://d.hatena.ne.jp/zrbabbler/20131221})ã
+ã«ããï¼}
+ã«ãããããªæ°ã®å©ããå½ä»¤ã¯ã¾ã ãªãï¼
+ç°ä½åã®ä¸è¦§è¡¨ç¤ºãè¡ãããå ´åã¯ï¼gitãªãã¸ããªå
ã® \texttt{test/test19-ivs.tex} ä¸ã«ãã
+Luaã»\TeX ã³ã¼ããåèã«ãªãã ããï¼
%
@@ -4299,7 +5036,7 @@ for making the difference obvious.
%<*en>
-...
+(see Japanese version of this manual)
%
%<*ja>
\pTeX ã§ã¯ï¼è¡é·èª¿æ´ã«ããã¦åªå
度ã®æ¦å¿µãåå¨ããªãã£ãããï¼å³
@@ -4309,25 +5046,137 @@ for making the difference obvious.
ã¦ã¯ï¼ãã®ãããªç¶æ³ã§ã¯å端ã¯éµæ¬å¼§å¨è¾ºã®ç©ºç½ã®ã¿ã§è² æ
ãï¼ãã®ä»ã®åæ
æåã¯ãã¿çµã§çµã¾ããï¼å³\ref{fig-adj}ä¸æ®µï¼ãã¨ã«ãªã£ã¦ããï¼ãã®è¿½å
ããã±ã¼ã¸ã¯\cite{jlreq}ã\cite{x4051}ã«ãããè¦å®ã®ãããªï¼åªå
é ä½ä»ã
-ã®è¡é·èª¿æ´ãæä¾ããï¼è©³ç´°ãªä»æ§ã«ã¤ãã¦ã¯\ref{sec-adjspec}ãåç
§ï¼
+ã®è¡é·èª¿æ´ãæä¾ããï¼è©³ç´°ãªä»æ§ã«ã¤ãã¦ã¯\ref{sec-adjspec}ç« ãåç
§ãã¦ã»ããï¼
+\begin{itemize}
+ \item åªå
度ä»ãè¡é·èª¿æ´ã¯ï¼æ®µè½ãè¡åå²ããå¾ã«åã
ã®è¡ã«ã¤ãã¦è¡ããããã®ã§ããï¼
+ãã®ããï¼è¡åå²ã®ä½ç½®ã¯å¤åãããã¨ã¯ãªãï¼
+
+ã¾ãï¼\verb+\hbox to ... {...}+ ã®ãããªãå¹
ãæå®ãããhboxãã§ã¯ç¡å¹ã§ããï¼
+ \item åªå
度ä»ãè¡é·èª¿æ´ãè¡ãã¨ï¼åæå¦çã°ã«ã¼ã®èªç¶é·ã¯å¤åããªããï¼ä¼¸ã³éã縮ã¿éã¯
+ä¸è¬ã«å¤åããï¼ãã®ããï¼æ¢ã«çµã¾ãã段è½ã \verb+\unhbox+ ãªã©ãå©ç¨ãã¦çµã¿ç´ãå¦çã
+è¡ãå ´åã«ã¯æ³¨æãå¿
è¦ã§ããï¼
+\end{itemize}
\Pkg{luatexja-adjust} ã¯ï¼ä»¥ä¸ã®å½ä»¤ãæä¾ããï¼ãããã¯ãã¹ã¦ã°ãã¼ãã«ã«å¹åãçºæ®ããï¼
\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
-\item[\char92ltjdisableadjust]
+\item[\textbackslash ltjdisableadjust]
åªå
é ä½ä»ãã®è¡é·èª¿æ´ãç¡å¹åããï¼
-\item[\char92ltjenableadjust]
+\item[\textbackslash ltjenableadjust]
åªå
é ä½ä»ãã®è¡é·èª¿æ´ãæå¹åããï¼
+\item[\textsf{adjust}\,=] \verb+\ltjsetparameter+ ã§æå®å¯è½ãªè¿½å ãã©ã¡ã¼ã¿ã§ããï¼
+ã\textit{true}ãªã \verb+\ltjenableadjust+ ãï¼
+ããã§ãªããã° \verb+\ltjdisableadjust+ ãå®è¡ããï¼
\end{list}
+%
+\subsection{\texttt{luatexja-ruby.sty}}
+%<*en>
+This addon package provides functionality of ``ruby'' (\emph{furigana}) annotations
+using callbacks of \LuaTeX-ja.
+There is no detailed manual of \Pkg{luatexja-ruby.sty} in English.
+(Japanese manual is another PDF file, \url{luatexja-ruby.pdf}.)
+%
+%<*ja>
+ãã®è¿½å ããã±ã¼ã¸ã¯ï¼\LuaTeX-jaã®æ©è½ãå©ç¨ããã«ãï¼æ¯ãä»®åï¼ã®çµçæ©è½ãæä¾ããï¼
+åå¾ã®æå種ã«å¿ããåå¾ã¸ã®èªåé²å
¥ãï¼
+è¡é å½¢ã»è¡ä¸å½¢ã»è¡æ«å½¢ã®èªåçãªä½¿ãåããç¹å¾´ã§ããï¼
+ã«ãçµçã«è¨å®å¯è½ãªé
ç®ã注æäºé
ãå¤ãããï¼æ¬è¿½å ããã±ã¼ã¸ã®è©³ç´°ãªèª¬æã¯
+使ç¨ä¾ã¨å
±ã« \url{luatexja-ruby.pdf}\ ã¨ããå¥ãã¡ã¤ã«ã«è¼ãã¦ããï¼
+ãã®ç¯ã§ã¯ç°¡åãªä½¿ç¨æ¹æ³ã®ã¿è¿°ã¹ãï¼
+%
+\begin{description}
+%<*en>
+ \item[Group-ruby]
+By default, ruby characters (the second argument of \verb+\ruby+)
+are attached to base characters (the first argument), as one object.
+This type of ruby is called \emph{group-ruby}.
+%
+%<*ja>
+ \item[ã°ã«ã¼ãã«ã] æ¨æºã§ã¯ã°ã«ã¼ãã«ãã®å½¢ã§çµã¾ããï¼ç¬¬1å¼æ°ã«è¦ªæåï¼
+第2å¼æ°ã«ã«ããè¨è¿°ããï¼
+%
+\begin{LTXexample}[width=0.3\textwidth]
+æ±è¥¿ç·\ruby{å¦å
¸}{ã¿ããã§ã}é§
ã¯â¦â¦\\
+æ±è¥¿ç·ã®\ruby{å¦å
¸}{ã¿ããã§ã}é§
ã¯â¦â¦\\
+æ±è¥¿ç·ã®\ruby{å¦å
¸}{ã¿ããã§ã}ã¨ããé§
â¦â¦\\
+æ±è¥¿ç·\ruby{è西}{ããã}é§
ã¯â¦â¦
+\end{LTXexample}
+%<*en>
+As the above example, ruby hangover is allowed on the Hiragana before/after
+its base characters.
+%
+% ãã®ä¾ã®ããã«ï¼æ¨æºã§ã¯åå¾ã®å¹³ä»®åã«ã«ãå
¨è§ã¾ã§ãããããã«ãªã£ã¦ããï¼
+%<*en>
+\item[Mono-ruby]
+To attach ruby characters to each base characters (\emph{mono-ruby}),
+one should use \verb+\ruby+ multiple times:
+%
+%<*ja>
+ \item[ã¢ãã«ã] 親æåã1æåã«ããã¨ã¢ãã«ãã¨ãªãï¼
+2æå以ä¸ã®çèªãã¢ãã«ãã®å½¢ã§çµã¿ããå ´åã¯ï¼é¢åã§ã
+ãã®æ°ã ã \verb+\ruby+ ãæ¸ãå¿
è¦ãããï¼
+%
+\begin{LTXexample}[width=0.3\textwidth]
+æ±è¥¿ç·ã®\ruby{å¦}{ã¿ãã}\ruby{å
¸}{ã§ã}é§
ã¯â¦â¦
+\end{LTXexample}
+%<*en>
+ \item[Jukugo-ruby]
+Vertical bar~\verb+|+ denotes a boundary of \emph{groups}.
+%
+%<*ja>
+ \item[çèªã«ã] å¼æ°å
ã®ç¸¦æ£ \verb+|+ ã¯ã°ã«ã¼ãã®åºåãã表ãï¼
+è¤æ°ã°ã«ã¼ãã®ã«ãã¯çèªã«ãã¨ãã¦çµã¾ããï¼
+\cite{x4051}ã«ããããã«ï¼
+ã©ã®ã°ã«ã¼ãã§ãã親æåãã対å¿ããã«ã以ä¸ã®é·ãã®å ´åã¯
+åã°ã«ã¼ããã¨ã«ï¼ããã§ãªãã¨ãã¯å
¨ä½ãã¾ã¨ãã¦1ã¤ã®ã°ã«ã¼ãã«ãã¨ãã¦çµã¾ããï¼
+\cite{jlreq}ã§è¦å®ããã¦ããçµã¿æ¹ã¨ã¯ç°ãªãã®ã§æ³¨æï¼
%
+\begin{LTXexample}
+\ruby{å¦|å
¸}{ã¿ãã|ã§ã}\
+\ruby{è|西}{ã|ãã}\
+\ruby{ç¥æ¥½|å}{ããã|ãã}
+\end{LTXexample}
+%<*en>
+If there are multiple groups in one \verb+\ruby+ call,
+A linebreak between two groups is allowed.
+%
+% è¤æ°ã«ãã§ã¯ã°ã«ã¼ãã¨ã°ã«ã¼ãã®éã§æ¹è¡ãå¯è½ã§ããï¼
+\begin{LTXexample}[width=0.3\textwidth]
+\vbox{\hsize=6\zw\noindent
+ \hbox to 2.5\zw{}\ruby{京|æ¥|è²|ç°}{ãã|ããã|ãã¾|ã}
+ \hbox to 2.5\zw{}\ruby{京|æ¥|è²|ç°}{ãã|ããã|ãã¾|ã}
+ \hbox to 3\zw{}\ruby{京|æ¥|è²|ç°}{ãã|ããã|ãã¾|ã}
+}
+\end{LTXexample}
+\end{description}
+
+%<*en>
+If the width of ruby characters are longer than that of base characters,
+\verb+\ruby+ automatically selects the appropriate form
+among the line-head form, the line-middle form, and the line-end form.
+%
+%<*ja>
+ã¾ãï¼ã«ãæåã®ã»ãã親æåãããé·ãå ´åã¯ï¼èªåçã«
+è¡é å½¢ã»è¡ä¸å½¢ã»è¡æ«å½¢ã®ããããé©åãªãã®ãé¸æããï¼
+%
+\begin{LTXexample}[width=0.3\textwidth]
+\vbox{\hsize=8\zw\noindent
+\null\kern3\zw â¦â¦ã\ruby{æ¿}{ãããã¾ã}ã
+ \kern1\zw â¦â¦ã\ruby{æ¿}{ãããã¾ã}ã\\
+\null\kern5\zw â¦â¦ã\ruby{æ¿}{ãããã¾ã}ã
+}
+\end{LTXexample}
+
+
+
@@ -4337,8 +5186,8 @@ for making the difference obvious.
%\section{Storing Parameters}
%\section{ãã©ã¡ã¼ã¿ã®ä¿æ}
\label{sec-para}
-%\subsection{Used Dimensions, Attributes and whatsit nodes}
-%\subsection{\LuaTeX-jaã§ç¨ãããã寸æ³ã¬ã¸ã¹ã¿ï¼å±æ§ã¬ã¸ã¹ã¿ï¼whatsitãã¼ã}
+%\subsection{Used Dimensions, Attributes and Whatsit Nodes}
+%\subsection{\LuaTeX-jaã§ç¨ããããã¬ã¸ã¹ã¿ã¨whatsitãã¼ã}
%<*en>
Here the following is the list of dimensions and attributes which are used in \LuaTeX-ja.
@@ -4349,47 +5198,56 @@ Here the following is the list of dimensions and attributes which are used in \L
%
\begin{list}{}{%
\def\makelabel{\ttfamily}\advance\leftmargin1\zw
-\def\dim#1{\item[\char`\\#1\ \textrm{(dimension)}]}
-\def\attr#1{\item[\char`\\#1\ \textrm{(attribute)}]}
+\def\dim#1{\item[\textbackslash #1\ \textrm{(dimension)}]}
+\def\attr#1{\item[\textbackslash #1\ \textrm{(attribute)}]}
}
\dim{jQ}
%<*en>
\verb+\jQ+ is equal to
- $1\,\textrm{Q}=0.25\,\textrm{mm}$, where `Q'~(also called `ç´') is
- a unit used in Japanese phototypesetting. So one should not change the value of this dimension.
+ $1\,\textrm{Q}=0.25\,\textrm{mm}$, where ``Q''~(also called ``ç´'') is
+ a unit used in Japanese phototypesetting.
+So one should not change the value of this dimension.
%
%<*ja>
-\verb+\jQ+ ã¯$1\,\textrm{Q}=0.25\,\textrm{mm}$
-ã¨çããï¼ããã§ï¼`Q'ï¼ãããã¯ãç´ãï¼ã¯æ¥æ¬ã®åæ¤ã§ç¨ããããåä½ã§ããï¼ãããã£ã¦ï¼
+\verb+\jQ+ ã¯åæ¤ã§ç¨ãããã$1\,\textrm{Q}=0.25\,\textrm{mm}$%
+ï¼ãç´ãã¨ãæ¸ãããï¼ã«çããï¼ãããã£ã¦ï¼
ãã®å¯¸æ³ã¬ã¸ã¹ã¿ã®å¤ãå¤æ´ãã¦ã¯ãªããªãï¼
%
\dim{jH}
%<*en>
-There is also a unit called `æ¯' which equals to $0.25\,\textrm{mm}$ and
- used in Japanese phototypesetting. This
- \verb+\jH+ is a synonym of \verb+\jQ+.
+There is also a unit called ``æ¯'' which equals to $0.25\,\textrm{mm}$ and
+ used in Japanese phototypesetting.
+This \verb+\jH+ is the same \verb+\dimen+ register as \verb+\jQ+.
%
%<*ja>
åããåæ¤ã§ç¨ãããã¦ããåä½ã¨ãã¦ãæ¯ããããï¼ããã$0.25\,\textrm{mm}$ã¨
-çããï¼\verb+\jH+ 㯠\verb+\jQ+ ã®å¥åã§ããï¼
+çããï¼ãã® \verb+\jH+ 㯠\verb+\jQ+ ã¨åã寸æ³ã¬ã¸ã¹ã¿ãæãï¼
%
\dim{ltj@zw}
%<*en>
-A temporal register for the `full-width' of current Japanese font.
+A temporal register for the ``full-width'' of current Japanese font.
+The command \verb+\zw+ sets this register to the correct value, and
+``return'' this register itself.
%
%<*ja>
ç¾å¨ã®åæãã©ã³ãã®ãå
¨è§å¹
ããä¿æããä¸æã¬ã¸ã¹ã¿ï¼
+\verb+\zw+ å½ä»¤ã¯ï¼ãã®ã¬ã¸ã¹ã¿ãé©åãªå¤ã«è¨å®ããå¾ï¼
+ããã®ã¬ã¸ã¹ã¿èªä½ãè¿ããï¼
%
\dim{ltj@zh}
%<*en>
-A temporal register for the `full-height' (usually the sum of height of imaginary body and its depth) of current Japanese font.
+A temporal register for the ``full-height'' (usually the sum of height of imaginary body and its depth) of current Japanese font.
+The command \verb+\zh+ sets this register to the correct value, and
+``return'' this register itself.
%
%<*ja>
ç¾å¨ã®åæãã©ã³ãã®ãå
¨è§é«ããï¼é常ï¼é«ãã¨æ·±ãã®åï¼ãä¿æããä¸æã¬ã¸ã¹ã¿ï¼
+\verb+\zh+ å½ä»¤ã¯ï¼ãã®ã¬ã¸ã¹ã¿ãé©åãªå¤ã«è¨å®ããå¾ï¼
+ããã®ã¬ã¸ã¹ã¿èªä½ãè¿ããï¼
%
\attr{jfam}
@@ -4450,7 +5308,7 @@ Whether the auto insertion of \Param{\hyperlink{fld:xks}{xkanjiskip}} is allowed
\attr{ltj@icflag}
%<*en>
-An attribute for distinguishing `kinds' of a node. One of the following value is
+An attribute for distinguishing ``kinds'' of a node. One of the following value is
assigned to this attribute:
%
%<*ja>
@@ -4459,84 +5317,51 @@ assigned to this attribute:
\begin{description}
\item[\textit{italic} (1)]
%<*en>
-Glues from an italic correction
- (\verb+\/+). This distinction of origins of glues
- (from explicit \verb+\kern+, or from \verb+\/+)
- is needed in the insertion process of \Param{\hyperlink{fld:xks}{xkanjiskip}}.
+Kerns from italic correction (\verb+\/+), or from kerning information of a Japanese font.
+These kerns are ``ignored'' in the insertion process of \textbf{JAglue},
+unlike explicit \verb+\kern+.
%
%<*ja>
-ã¤ã¿ãªãã¯è£æ£(\verb+\/+)ã«ããã°ã«ã¼ï¼ãã®ã°ã«ã¼ã®ç±æ¥ã®åºå¥ï¼\verb+\kern+ ã
-\hskip\ltjgetparameter{xkanjiskip}
-\verb+\/+ ãï¼ã¯\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥éç¨ã«ããã¦å¿
è¦ã«ãªãï¼
+ã¤ã¿ãªãã¯è£æ£(\verb+\/+)ã«ããã«ã¼ã³ï¼
+ã¾ã㯠\Pkg{luaotfload} ã«ãã£ã¦æ¿å
¥ããããã©ã³ãã®ã«ã¼ãã³ã°æ
å ±ç±æ¥ã®ã«ã¼ã³ï¼
+ãããã®ã«ã¼ã³ã¯é常㮠\verb+\kern+ ã¨ã¯ç°ãªãï¼
+\textbf{JAglue}ã®æ¿å
¥å¦çã«ããã¦ã¯ééããï¼
%
\item[\textit{packed} (2)]
\item[\textit{kinsoku} (3)]
%<*en>
-Penalties inserted for the word-wrapping process of Japanese characters (\emph{kinsoku}).
-%
-%<*ja>
-åææåã®ã¯ã¼ãã©ããéç¨ã«ããã¦æ¿å
¥ãããããã«ãã£(\emph{kinsoku})ï¼
-%
-
-\item[\textit{from\_jfm} (6)]
-%<*en>
-Glues/kerns from JFM.
-%
-%<*ja>
-JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ï¼
-%
-
-%%\item[\textit{line\_end} (5)]
-%%%<*en>
-%%Kerns for \ldots
-%%%
-%%%<*ja>
-%%åææåãè¡æ«ã«ããã¨ãï¼è¡æ«ã¨ã®éã«æ¿å
¥ãããã«ã¼ã³ã§ããï¼
-%%% ã¶ãä¸ãçµã¸ã®å¿ç¨
-%%%
-
-\item[\textit{kanji\_skip} (9)]
-%<*en>
-Glues for \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}.
-%
-%<*ja>
-\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®ã°ã«ã¼ï¼
-%
-
-\item[\textit{xkanji\_skip} (10)]
-%<*en>
-Glues for \Param{\hyperlink{fld:xks}{xkanjiskip}}.
-%
-%<*ja>
-\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®ã°ã«ã¼ï¼
-%
-
-\item[\textit{processed} (11)]
-%<*en>
-Nodes which is already processed by \ldots.
-%
-%<*ja>
-\LuaTeX-ja ã®å
é¨å¦çã«ãã£ã¦æ¢ã«å¦çããããã¼ãï¼
-%
-
-\item[\textit{ic\_processed} (12)]
-%<*en>
-Glues from an italic correction, but also already processed.
-%
-%<*ja>
-ã¤ã¿ãªãã¯è£æ£ã«ç±æ¥ããã°ã«ã¼ã§ãããï¼ã¾ã å¦çããã¦ããªããã®ï¼
-%
-
+Penalties inserted for the word-wrapping process (\emph{kinsoku shori}) of Japanese characters.
+%
+%ç¦åå¦çã®ããã«æ¿å
¥ãããããã«ãã£ï¼
+\item[\mathversion{bold}$(\textit{from\_jfm}-2)$--$(\textit{from\_jfm}+2)$~(4--8)]
+%Glues/kerns from JFM.
+%JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ï¼
+\item[\textit{kanji\_skip}~(9), \textit{kanji\_skip\_jfm}~(10)]
+%Glues from \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}.
+%åæé空ç½\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã表ãã°ã«ã¼ï¼
+\item[\textit{xkanji\_skip}~(11), \textit{xkanji\_skip\_jfm}~(12)]
+%Glues from \Param{\hyperlink{fld:xks}{xkanjiskip}}.
+%å欧æé空ç½\Param{\hyperlink{fld:xks}{xkanjiskip}}ã表ãã°ã«ã¼ï¼
+\item[\textit{processed} (13)]
+%Nodes which is already processed by \ldots.
+%\LuaTeX-ja ã®å
é¨å¦çã«ãã£ã¦æ¢ã«å¦çããããã¼ãï¼
+\item[\textit{ic\_processed} (14)]
+%<*en>
+Glues from an italic correction, but already processed in the insertion process of \textbf{JAglue}s.
+%
+%ã¤ã¿ãªãã¯è£æ£ã«ç±æ¥ããã°ã«ã¼ã§ãã£ã¦ï¼æ¢ã« \textbf{JAglue} æ¿å
¥å¦çã«ããã£ããã®ï¼
\item[\textit{boxbdd} (15)]
-%<*en>
-Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph.
-%
+%Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph.
+%hboxã段è½ã®æåãæå¾ã«æ¿å
¥ãããã°ã«ã¼ï¼ã«ã¼ã³ï¼
+\end{description}
+
%<*ja>
-ããæ°´å¹³ããã¯ã¹ã段è½ã®æåãæå¾ã«æ¿å
¥ãããã°ã«ã¼ï¼ã«ã¼ã³ï¼
+ã¾ãï¼æ¿å
¥å¦çã®çµæã§ãããªã¹ãã®æåã®ãã¼ãã§ã¯ï¼\verb+\ltj@icflag+ ã®å¤ã«
+\textit{processed\_begin\_flag}~(128)ã追å ãããï¼ããã«ãã£ã¦ï¼\verb+\unhbox+ ã
+é£ç¶ããå ´åã§ããããã¯ã¹ã®å¢çããèå¥ã§ããããã«ãªã£ã¦ããï¼
%
-\end{description}
\attr{ltj@kcat$i$}
%<*en>
@@ -4551,55 +5376,71 @@ $i$ã¯7ããå°ããèªç¶æ°ï¼
\end{list}
%<*en>
-Furthermore, \LuaTeX-ja uses several `user-defined' whatsit nodes for
+Furthermore, \LuaTeX-ja uses several user-defined whatsit nodes for
inrernal processing. All those nodes store a natural number (hence the node's
\texttt{type} is 100).
+Their \texttt{user\_id} (used for distinguish user-defined whatsits)
+are allocated by \texttt{luatexbase.newuserwhatsitid}.
%
%<*ja>
-ããã«ï¼\LuaTeX-jaã¯ããã¤ãã®ãã¦ã¼ã¶å®ç¾©ã®ãwhatsitãã¼ããå
é¨å¦çã«ç¨ããï¼
-ãããã®å
¨ã¦ã®ãã¼ãã¯èªç¶æ°ãæ ¼ç´ãã¦ããï¼ãããã£ã¦ãã¼ãã®\texttt{type}ã¯
-100ã§ããï¼ï¼
+ããã«ï¼\LuaTeX-jaã¯ããã¤ãã®user-defined whatsit nodeãå
é¨å¦çã«ç¨ããï¼
+ãããã®whatsitãã¼ãã® \texttt{type} ã¯100ã§ããï¼ãã¼ãã¯èªç¶æ°ãæ ¼ç´ãã¦ããï¼
+user-defined whatsitãèå¥ããããã® \texttt{user\_id} ã¯\
+\texttt{luatexbase.newuserwhatsitid} ã«ãã確ä¿ããã¦ããï¼
+ä¸ã®è¦åºãã¯åãªãèå¥ç¨ã§ãããªãï¼
%
\begin{description}
-\item[\texttt{inhibitglue}]
+\item[\textit{inhibitglue}]
%<*en>
Nodes for indicating that \verb+\inhibitglue+ is
specified. The \texttt{value} field of these nodes doesn't matter.
%
%<*ja>
-\verb+\inhibitglue+ ãæå®ããããã¨ã示ããã¼ãï¼ãããã®ãã¼ãã®
-\texttt{value}ãã£ã¼ã«ãã¯æå³ãæããªãï¼
+\verb+\inhibitglue+ ãæå®ããããã¨ã示ããã¼ãï¼ãããã®ãã¼ãã®\
+\texttt{value} ãã£ã¼ã«ãã¯æå³ãæããªãï¼
%
-\item[\texttt{stack\_marker}]
+\item[\textit{stack\_marker}]
%<*en>
Nodes for \LuaTeX-ja's stack system (see the next
subsection). The \texttt{value} field of these nodes is
- current group.
+ current group level.
%
%<*ja>
\LuaTeX-jaã®ã¹ã¿ãã¯ã·ã¹ãã ï¼æ¬¡ã®ç¯ãåç
§ï¼ã®ããã®ãã¼ãï¼
-ãããã®ãã¼ãã®\texttt{value}ãã£ã¼ã«ãã¯ç¾å¨ã®ã°ã«ã¼ãã表ãï¼
+ãããã®ãã¼ãã® \texttt{value} ãã£ã¼ã«ãã¯ç¾å¨ã®ã°ã«ã¼ããã¹ãã¬ãã«ã表ãï¼
%
-\item[\texttt{char\_by\_cid}]
+\item[\textit{char\_by\_cid}]
%<*en>
-Nodes for Japanese Characters which the callback process of
+Nodes for \textbf{JAchar} which the callback process of
\Pkg{luaotfload} won't be applied, and the character code is
- stored in the \texttt{value} field. Each node having this
- \verb+user_id+ is converted to a `glyph\_node' \emph{after}
+ stored in the \texttt{value} field. Each node of this type are
+ converted to a \textit{glyph\_node} \emph{after}
the callback process of luaotfload.
- This \verb+user_id+ is only used by the \Pkg{luatexja-otf} package.
+Nodes of this type is used in \verb+\CID+, \verb+\UTF+ and IVS support.
%
%<*ja>
-\Pkg{luaotfload}ã®ã³ã¼ã«ããã¯ã«ããå¦çãé©ç¨ãããªãåææåã®ããã®ãã¼ãã§ï¼
-\texttt{value}ãã£ã¼ã«ãã«ãã®æåã®ã³ã¼ããæ ¼ç´ããã¦ããï¼
-ãã® \verb+user_id+ ãæã¤ãã¼ãã¯ããããã\Pkg{luaotfload}ã®ã³ã¼ã«ããã¯ã®å¦çã®
-\emph{å¾ã§}`glyph\_node'ã«å¤æãããï¼ãã® \verb+user_id+ 㯠%
-\Pkg{luatexja-otf} ããã±ã¼ã¸ã§ã®ã¿ä½¿ç¨ãããï¼
+\Pkg{luaotfload}ã®ã³ã¼ã«ããã¯ã«ããå¦çãé©ç¨ãããªã\textbf{JAchar}ã®ããã®ãã¼ãã§ï¼
+\texttt{value} ãã£ã¼ã«ãã«æåã³ã¼ããæ ¼ç´ããã¦ããï¼
+ãã®ç¨®é¡ã®ãã¼ãã¯ããããã\Pkg{luaotfload}ã®ã³ã¼ã«ããã¯ã®å¦çã®
+\emph{å¾ã§}\textit{glyph\_node}ã«å¤æãããï¼
+\verb+\CID+, \verb+\UTF+ãIVS対å¿å¦çã§ãã®ç¨®é¡ã®ãã¼ããå©ç¨ããã¦ããï¼
%
-\item[\texttt{begin\_par}]
+\item[\textit{replace\_vs}]
+%<*en>
+Similar to \textit{char\_by\_cid} whatsits above.
+These nodes are for \textbf{ALchar} which the callback process of
+ \Pkg{luaotfload} won't be applied.
+%
+%<*ja>
+ä¸ã®\textit{char\_by\_cid}ã¨åæ§ã«ï¼
+ãããã®ãã¼ãã¯\Pkg{luaotfload}ã®ã³ã¼ã«ããã¯ã«ããå¦çãé©ç¨ãããªã\textbf{ALchar}ã®ã
+ ããã®ã§ããï¼
+%
+
+\item[\textit{begin\_par}]
%<*en>
Nodes for indicating beginning of a paragraph.
A paragraph which is started by \verb+\item+ in list-like environments has a horizontal box
@@ -4638,7 +5479,8 @@ source:
%
\begin{LTXexample}
\ltjsetparameter{kanjiskip=0pt}ãµããµã.%
-\setbox0=\hbox{\ltjsetparameter{kanjiskip=5pt}ã»ãã»ã}
+\setbox0=\hbox{%
+ \ltjsetparameter{kanjiskip=5pt}ã»ãã»ã}
\box0.ã´ãã´ã\par
\end{LTXexample}
@@ -4646,19 +5488,19 @@ source:
As described in Subsection~\ref{ssec-param}, the only effective value of
\Param{\hyperlink{fld:kanjiskip}{kanjiskip}} in an hbox is the latest value, so the value of
\Param{\hyperlink{fld:kanjiskip}{kanjiskip}} which applied in the entire hbox should be 5\,pt.
-However, by the implementation method of \LuaTeX, this `5\,pt' cannot be
-known from any callbacks. In the \texttt{tex/packaging.w} (which is a
-file in the source of \LuaTeX), there are the following codes:
+However, by the implementation method of \LuaTeX, this ``5\,pt'' cannot be
+known from any callbacks. In the \texttt{tex/packaging.w}, which is a
+file in the source of \LuaTeX, there are the following codes:
%
%<*ja>
-\ref{ssec-param}ç¯ã§è¿°ã¹ãããã«ï¼ããæ°´å¹³ããã¯ã¹ã®ä¸ã§å¹åãæã¤
+\ref{ssec-param}ç¯ã§è¿°ã¹ãããã«ï¼ããhboxã®ä¸ã§å¹åãæã¤
\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®å¤ã¯æå¾ã«ç¾ããå¤ã®ã¿ã§ããï¼ãããã£ã¦ããã¯ã¹å
¨ä½ã«é©ç¨ããã
-\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã¯5\,ptã§ããã¹ãã§ããï¼ãããï¼\LuaTeX ã®å®è£
ã®ããã«ï¼
-ãã®`5\,pt'ã¯ã©ã®ã³ã¼ã«ããã¯ãããç¥ããã¨ã¯ã§ããªãï¼
-\texttt{tex/packaging.w}ï¼ããã¯\LuaTeX ã®ã½ã¼ã¹ãã¡ã¤ã«ã§ããï¼ã®ä¸ã«ï¼
+\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã¯5\,ptã§ããã¹ãã§ããï¼ãããï¼\LuaTeX ã®å®
+è£
ã観å¯ããã¨ï¼ãã®5\,ptã¨ããé·ãã¯ã©ã®ã³ã¼ã«ããã¯ãããç¥ããã¨ã¯ã§ããªããã¨ããããï¼
+\LuaTeX ã®ã½ã¼ã¹ãã¡ã¤ã«ã®1㤠\texttt{tex/packaging.w} ã®ä¸ã«ï¼
以ä¸ã®ã³ã¼ããããï¼
%
-\begin{lstlisting}
+\begin{lstlisting}[numbers=left,firstnumber=1226]
void package(int c)
{
scaled h; /* height of box */
@@ -4676,20 +5518,20 @@ void package(int c)
subtype(cur_box) = HLIST_SUBTYPE_HBOX;
\end{lstlisting}
%<*en>
-Notice that \verb+unsave+ is executed \emph{before}
-\verb+filtered_hpack+ (this is where \verb+hpack_filter+ callback is
-executed): so `5\,pt' in the above source is orphaned at
-\verb+unsave+, and hence it can't be accessed from \verb+hpack_filter+
+Notice that \texttt{unsave()} is executed \emph{before}
+\texttt{filtered\_hpack()}, where \texttt{hpack\_filter} callback is
+executed) here. So ``5\,pt'' in the above source is orphaned at
+\texttt{unsave()}, and hence it can't be accessed from \texttt{hpack\_filter}
callback.
%
%<*ja>
-\verb+unsave+ ã \verb+filtered_hpack+ï¼ãã㯠\verb+hpack_filter+ ã³ã¼ã«ããã¯ã
+\texttt{unsave()} ã \texttt{filtered\_hpack()}ï¼ãã㯠\texttt{hpack\_filter} ã³ã¼ã«ããã¯ã
å®è¡ãããã¨ããã§ããï¼ã®\emph{åã«}å®è¡ããã¦ãããã¨ã«æ³¨æããï¼
-ãããã£ã¦ï¼ä¸è¨ã½ã¼ã¹ä¸ã§`5\,pt'㯠\verb+unsave+ ã®ã¨ããã§æ¨ã¦ããï¼
-\verb+hpack_filter+ ããã¯ã¢ã¯ã»ã¹ãããã¨ãã§ããªãï¼
+ãããã£ã¦ï¼ä¸è¨ã½ã¼ã¹ä¸ã§5\,pt㯠\texttt{unsave()} ã®ã¨ããã§æ¨ã¦ããï¼
+\texttt{hpack\_filter} ã³ã¼ã«ããã¯ããã¯ã¢ã¯ã»ã¹ãããã¨ãã§ããªãï¼
%
-%\paragraph{The method}
+%\paragraph{Implementation}
%\paragraph{解決æ³}
%<*en>
@@ -4697,7 +5539,8 @@ The code of stack system is based on that in a post of Dev-luatex mailing list\f
\texttt{[Dev-luatex] tex.currentgrouplevel}, a post at 2008/8/19 by Jonathan Sauer.}.
%
%<*ja>
-ã¹ã¿ãã¯ã·ã¹ãã ã®ã³ã¼ãã¯Dev-luatexã¡ã¼ãªã³ã°ãªã¹ãã®ããæ稿\footnote{\texttt{[Dev-luatex] tex.currentgrouplevel}: Jonathan Sauerã«ãã2008/8/19ã®æ稿ï¼}ã
+ã¹ã¿ãã¯ã·ã¹ãã ã®ã³ã¼ãã¯Dev-luatexã¡ã¼ãªã³ã°ãªã¹ãã®ããæ稿\footnote{%
+\texttt{[Dev-luatex] tex.currentgrouplevel}: Jonathan Sauerã«ãã2008/8/19ã®æ稿ï¼}ã
ãã¼ã¹ã«ãã¦ããï¼
%
@@ -4712,7 +5555,7 @@ previous level is copied.
%
%<*ja>
æ
å ±ãä¿æããããã«ï¼2ã¤ã®\TeX ã®æ´æ°ã¬ã¸ã¹ã¿ãç¨ãã¦ããï¼
-\verb+\ltj@@stack+ ã§ã¹ã¿ãã¯ã¬ãã«ï¼\verb+\ltj@@group@level+ ã§æå¾ã®ä»£å
¥ã
+\verb+\ltj@@stack+ ã«ã¹ã¿ãã¯ã¬ãã«ï¼\verb+\ltj@@group@level+ ã«æå¾ã®ä»£å
¥ã
ãªãããæç¹ã§ã®\TeX ã®ã°ã«ã¼ãã¬ãã«ãä¿æãã¦ããï¼
ãã©ã¡ã¼ã¿ã¯\texttt{charprop\_stack\_table}ã¨ããååã®ã²ã¨ã¤ã®å¤§ããªãã¼ãã«ã«
æ ¼ç´ãããï¼ããã§ï¼\texttt{charprop\_stack\_table[$i$]}ã¯ã¹ã¿ãã¯ã¬ãã«$i$ã®
@@ -4721,35 +5564,35 @@ previous level is copied.
%
%<*en>
-To resolve the problem mentioned in `Background' above, \LuaTeX-ja uses
-another thing: When a new stack level is about to be created, a whatsit
+To resolve the problem mentioned in above paragraph ``Background'', \LuaTeX-ja uses
+another trick. When the stack level is about to be increased, a whatsit
node whose type, subtype and value are 44~(\textit{user\_defined}),
-30112, and current group level respectively is appended to the current
+\textit{stack\_marker} and the current group level respectively is appended to the current
list (we refer this node by \textit{stack\_flag}). This enables us to
know whether assignment is done just inside a hbox. Suppose that the
stack level is~$s$ and the \TeX's group level is~$t$ just after the hbox
group, then:
%
%<*ja>
-ä¸ã®ãèæ¯ãã§è¿°ã¹ãåé¡ã解決ããããã«ï¼\LuaTeX-jaã§ã¯ããä¸ã¤ã®ææ³ãå°å
¥ããï¼
-æ°ããã¹ã¿ãã¯ã¬ãã«ãçæããããã¨ããã¨ãï¼type, subtype, valueããããã
-44~(\textit{user\_defined}), 30112ï¼ããã¦ç¾å¨ã®ã°ã«ã¼ãã¬ãã«ã§ããwhatsitãã¼ã
+ä¸ã®ãèæ¯ãã§è¿°ã¹ãåé¡ã解決ããããã«ï¼\LuaTeX-jaã§ã¯æ¬¡ã®ææ³ãç¨ããï¼
+ã¹ã¿ãã¯ã¬ãã«ãå¢å ããããã¨ãï¼type, subtype, valueããããã
+44~(\textit{user\_defined}), \textit{stack\_marker}ï¼ããã¦ç¾å¨ã®ã°ã«ã¼ãã¬ãã«ã§ããwhatsitãã¼ã
ãç¾å¨ã®ãªã¹ãã«ä»ãå ããï¼ãã®ãã¼ãã\textit{stack\_flag}ã¨ããï¼ï¼
-ããã«ããï¼ããæ°´å¹³ããã¯ã¹ã®ä¸ã§ä»£å
¥ããªããããã©ãããç¥ããã¨ãå¯è½
-ã¨ãªãï¼ã¹ã¿ãã¯ã¬ãã«ã$s$ï¼ãã®æ°´å¹³ããã¯ã¹ã°ã«ã¼ãã®ç´å¾ã®\TeX ã®ã°ã«ã¼ãã¬ãã«ã
+ããã«ããï¼ããhboxã®ä¸ã§ä»£å
¥ããªããããã©ãããç¥ããã¨ãå¯è½
+ã¨ãªãï¼ã¹ã¿ãã¯ã¬ãã«ã$s$ï¼ãã®hbox groupã®ç´å¾ã®\TeX ã®ã°ã«ã¼ãã¬ãã«ã
$t$ã¨ããã¨ï¼
%
\begin{itemize}
%<*en>
-\item If there is no \textit{stack\_flag} node in the list of the hbox, then
+\item If there is no \textit{stack\_flag} node in the list of the contents of the hbox, then
no assignment was occurred inside the hbox. Hence values of
parameters at the end of the hbox are stored in the stack
level~$s$.
%
%<*ja>
-\item ãããã®æ°´å¹³ããã¯ã¹ã®ãªã¹ãã®ä¸ã«\textit{stack\_flag}ãã¼ãããªããã°ï¼
- æ°´å¹³ããã¯ã¹ã®ä¸ã§ã¯ä»£å
¥ã¯èµ·ãããªãã£ãã¨ãããã¨ã«ãªãï¼
- ãããã£ã¦ï¼ãã®æ°´å¹³ããã¯ã¹ã®çµããã«ããããã©ã¡ã¼ã¿ã®å¤ã¯ã¹ã¿ãã¯ã¬ãã«$s$ã«
+\item ãããã®hboxã®ä¸èº«ã表ããªã¹ãã®ä¸ã«\textit{stack\_flag}ãã¼ãããªããã°ï¼
+ hboxã®ä¸ã§ã¯ä»£å
¥ã¯èµ·ãããªãã£ãã¨ãããã¨ã«ãªãï¼
+ ãããã£ã¦ï¼ãã®hboxã®çµããã«ããããã©ã¡ã¼ã¿ã®å¤ã¯ã¹ã¿ãã¯ã¬ãã«$s$ã«
æ ¼ç´ããã¦ããï¼
%
@@ -4761,22 +5604,22 @@ $t$ã¨ããã¨ï¼
%
%<*ja>
\item ããå¤ã$t+1$ã®\textit{stack\_flag}ãã¼ããããã°ï¼ãã®
- æ°´å¹³ããã¯ã¹ã°ã«ã¼ãã®ä¸ã§ä»£å
¥ãèµ·ãã£ããã¨ã«ãªãï¼
- ãããã£ã¦ï¼æ°´å¹³ããã¯ã¹ã®çµããã«ããããã©ã¡ã¼ã¿ã®å¤ã¯ã¹ã¿ãã¯ã¬ãã«$s+1$ã«
+ hboxã®ä¸ã§ä»£å
¥ãèµ·ãã£ããã¨ã«ãªãï¼
+ ãããã£ã¦ï¼hboxã®çµããã«ããããã©ã¡ã¼ã¿ã®å¤ã¯ã¹ã¿ãã¯ã¬ãã«$s+1$ã«
æ ¼ç´ããã¦ããï¼
%
%<*en>
\item If there are \textit{stack\_flag} nodes but all of their values
are more than~$t+1$, then an assignment was occurred in the box,
- but it is done is `more internal' group. Hence values of
+ but it is done in more internal group. Hence values of
parameters at the end of the hbox are stored in the stack
level~$s$.
%
%<*ja>
\item ãã\textit{stack\_flag}ãã¼ããããããããã®å¤ãå
¨ã¦$t+1$ãã大ãã
å ´åï¼ãã®ããã¯ã¹ã®ä¸ã§ä»£å
¥ãèµ·ãã£ããï¼ããã¯ãããå
é¨ã®ãã°ã«ã¼ãã§
- èµ·ãã£ãã¨ãããã¨ã«ãªãï¼ãããã£ã¦ï¼æ°´å¹³ããã¯ã¹ã®çµããã§ã®ãã©ã¡ã¼ã¿ã®
+ èµ·ãã£ãã¨ãããã¨ã«ãªãï¼ãããã£ã¦ï¼hboxã®çµããã§ã®ãã©ã¡ã¼ã¿ã®
å¤ã¯ã¹ã¿ãã¯ã¬ãã«$s$ã«æ ¼ç´ããã¦ããï¼
%
\end{itemize}
@@ -4785,8 +5628,8 @@ $t$ã¨ããã¨ï¼
Note that to work this trick correctly, assignments to
\verb+\ltj@@stack+ and \verb+\ltj@@group@level+ have to be local always,
regardless the value of \verb+\globaldefs+.
-This problem is resolved by using
-\hbox{\verb+\directlua{tex.globaldefs=0}+} (this assignment is local).
+To solve this problem, we use another trick: the assignment
+\hbox{\verb+\directlua{tex.globaldefs=0}+} is always local.
%
%<*ja>
ãã®ããªãã¯ãæ£ããåãããããã«ã¯ï¼\verb+\ltj@@stack+ 㨠\verb+\ltj@@group@level+ ã¸ã®
@@ -4795,7 +5638,177 @@ This problem is resolved by using
ç¨ãããã¨ã§è§£æ±ºãã¦ããï¼
%
-%\section{Linebreak after Japanese Character}
+%<*en>
+\subsection{Lua Functions of the Stack System}
+In this subsection, we will see how a user use \LuaTeX-ja's stack system to
+store some data which obeys the grouping of \TeX.
+%
+%<*ja>
+\subsection{ã¹ã¿ãã¯ã·ã¹ãã ã§ä½¿ç¨ãããé¢æ°}
+æ¬ç¯ã§ã¯ï¼ã¦ã¼ã¶ã\LuaTeX-jaã®ã¹ã¿ãã¯ã·ã¹ãã ã使ç¨ãã¦ï¼
+\TeX ã®ã°ã«ã¼ãã³ã°ã«å¾ããããª
+ç¬èªã®ãã¼ã¿ãåãæ±ãæ¹æ³ãè¿°ã¹ãï¼
+%
+
+%<*en>
+The following function can be used to store data into a stack:
+\begin{verbatim}
+luatexja.stack.set_stack_table(index, data)
+\end{verbatim}
+Any values which except \texttt{nil}~and~NaN are usable as \textit{index}.
+However, a user should use only negative integers or strings as \textit{index},
+since natural numbers are used by \LuaTeX-ja itself.
+Also, whether \textit{data} is stored locally or globally
+is determined by \texttt{luatexja.isglobal}
+(stored globally if and only if \texttt{luatexja.isglobal == 'global'}).
+%
+%<*ja>
+ã¹ã¿ãã¯ã«å¤ãè¨å®ããã«ã¯ï¼ä»¥ä¸ã®Luaé¢æ°ãå¼ã³ã ãã°è¯ãï¼
+\begin{verbatim}
+luatexja.stack.set_stack_table( index, data)
+\end{verbatim}
+ç´æçã«ã¯ï¼ã¹ã¿ãã¯ãã¼ãã«ä¸ã®ã¤ã³ããã¯ã¹\textit{index}ã®å¤ã\textit{data}ã«ããï¼ã¨ããæå³ã§ããï¼
+\textit{index}ã®å¤ã¨ãã¦ã¯ \texttt{nil} ã¨NaN以å¤ã®ä»»æã®å¤ã使ãããï¼
+èªç¶æ°ã¯\LuaTeX-jaã使ç¨ããï¼å°æ¥ã®æ¡å¼µç¨ãå«ãï¼ã®ã§ï¼
+ã¦ã¼ã¶ã使ç¨ããå ´åã¯è² ã®æ´æ°å¤ãæååã®å¤ã«ãããã¨ãæã¾ããï¼
+ã¾ãï¼ãã¼ã«ã«ã«è¨å®ããããã°ãã¼ãã«ã«è¨å®ããããã¯ï¼\texttt{luatexja.isglobal} ã®å¤ã«ä¾åãã
+ï¼ã°ãã¼ãã«ã«è¨å®ãããã®ã¯ï¼\texttt{luatexja.isglobal == 'global'} ã§ããã¡ããã©ãã®æï¼ï¼
+%
+
+%<*en>
+Stored data can be obtained as the return value of
+\begin{verbatim}
+luatexja.stack.get_stack_table(index, default, level)
+\end{verbatim}
+where \textit{level} is the stack level, which is usually the value of \verb+\ltj@@stack+,
+and \textit{default} is the default value which will be returned if no values are stored
+in the stack table whose level is \textit{level}.
+%
+%<*ja>
+ã¹ã¿ãã¯ã®å¤ã¯ï¼
+\begin{verbatim}
+luatexja.stack.get_stack_table( index, default, level)
+\end{verbatim}
+ã®æ»ãå¤ã§åå¾ã§ããï¼\textit{level}ã¯ã¹ã¿ãã¯ã¬ãã«ã§ããï¼
+é常㯠\verb+\ltj@@stack+ ã®å¤ãæå®ãããã¨ã«ãªãã ããï¼
+\textit{default}ã¯ã¬ãã«\textit{level}ã®ã¹ã¿ãã¯ã«å¤ãè¨å®ããã¦ããªãã£ãå ´åã«
+è¿ãããã©ã«ãå¤ã§ããï¼
+%
+
+\begin{figure}[tb]
+\begin{lstlisting}[numbers=left, firstnumber=380]
+\protected\def\ltj@setpar@global{%
+ \relax\ifnum\globaldefs>0\directlua{luatexja.isglobal='global'}%
+ \else\directlua{luatexja.isglobal=''}\fi
+}
+\protected\def\ltjsetparameter#1{%
+ \ltj@setpar@global\setkeys[ltj]{japaram}{#1}\ignorespaces}
+\protected\def\ltjglobalsetparameter#1{%
+ \relax\ifnum\globaldefs<0\directlua{luatexja.isglobal=''}%
+ \else\directlua{luatexja.isglobal='global'}\fi%
+ \setkeys[ltj]{japaram}{#1}\ignorespaces}
+\end{lstlisting}
+%\caption{ãã©ã¡ã¼ã¿è¨å®å½ä»¤ã®å®ç¾©}
+%\caption{Definiton of parameter setting commands}
+\label{fig:setpar-def}
+\end{figure}
+
+%<*en>
+\subsection{Extending Parameters}
+Keys for \verb+\ltjsetparameter+~and~\verb+\ltjgetparameter+ can be extended,
+as in \Pkg{luatexja-adjust}.
+%
+%<*ja>
+\subsection{ãã©ã¡ã¼ã¿ã®æ¡å¼µ}
+ããã§ã¯ï¼\Pkg{luatexja-adjust}ã§è¡ãªã£ã¦ããããã«ï¼
+\verb+\ltjsetparameter+,~\verb+\ltjgetparameter+ã«æå®å¯è½ãªãã¼ã追å ããæ¹æ³
+ãè¿°ã¹ãï¼
+%
+
+%<*en>
+\paragraph{Setting parameters}
+Figure~\ref{fig:setpar-def} shows the ``most outer'' definition of
+two commands,
+\verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+.
+Most important part is the last \verb+\setkeys+,
+which is offered by the \Pkg{xkeyval} package.
+
+Hence, to add a key in \verb+\ltjsetparameter+, one only have to add a key
+whose prefix is \texttt{ltj} and whose family is \texttt{japaram}, as the following.
+\begin{verbatim}
+\define@key[ltj]{japaram}{...}{...}
+\end{verbatim}
+
+\verb+\ltjsetparameter+~and~\verb+\ltjglobalsetparameter+ automatically sets
+\texttt{luatexja.isglobal}. Its meaning is the following.
+\begin{align}
+ \texttt{luatexja.isglobal} =
+\begin{cases}
+ \texttt{'global'}&\text{global}\\
+ \texttt{''}&\text{local}
+\end{cases}
+\end{align}
+This is determined not only by command name
+(\verb+\ltjsetparameter+~or~\verb+\ltjglobalsetparameter+),
+but also by the value of \verb+\globaldefs+.
+%
+%<*ja>
+\paragraph{ãã©ã¡ã¼ã¿ã®è¨å®}
+\verb+\ltjsetparameter+ ã¨ï¼\verb+\ltjglobalsetparameter+ ã®å®ç¾©ã¯å³\ref{fig:setpar-def}ã®
+ã®ããã«ãªã£ã¦ããï¼
+æ¬è³ªçãªã®ã¯æå¾ã® \verb+\setkeys+ ã§ï¼ããã¯\Pkg{xkeyval}ããã±ã¼ã¸ã®æä¾ããå½ä»¤ã§ããï¼
+
+ãã®ããï¼\verb+\ltjsetparameter+ ã«æå®å¯è½ãªãã©ã¡ã¼ã¿ã追å ããã«ã¯ï¼
+ã \texttt{ltj}ï¼ã \texttt{japaram} ã¨ãããã¼ã
+\begin{verbatim}
+\define@key[ltj]{japaram}{...}{...}
+\end{verbatim}
+ã®ããã«å®ç¾©ããã°è¯ãã ãã§ããï¼
+ãªãï¼ãã©ã¡ã¼ã¿æå®ãã°ãã¼ãã«ããã¼ã«ã«ãã©ããã示ã \texttt{luatexja.isglobal} ãï¼
+\begin{align}
+ \texttt{luatexja.isglobal} =
+\begin{cases}
+ \texttt{'global'}&\text{ãã©ã¡ã¼ã¿è¨å®ã¯ã°ãã¼ãã«}\\
+ \texttt{''}&\text{ãã©ã¡ã¼ã¿è¨å®ã¯ãã¼ã«ã«}
+\end{cases}
+\end{align}
+ã¨ãã¦èªåçã«ã»ããããã\footnote{å½ä»¤ã \texttt{\textbackslash ltjglobalsetparameter} ãã©ããã ãã§ã¯
+ãªãï¼å®è¡æã® \texttt{\textbackslash globaldefs} ã®å¤ã«ãä¾åãã¦å®ã¾ãï¼}ï¼
+%
+
+%<*ja>
+\paragraph{ãã©ã¡ã¼ã¿ã®åå¾}
+ä¸æ¹ï¼\verb+\ltjgetparameter+ ã¯Luaã¹ã¯ãªããã«ãã£ã¦å®è£
ããã¦ããï¼
+å¤ãåå¾ããã®ã«è¿½å å¼æ°ã®è¦ããªããã©ã¡ã¼ã¿ã«ã¤ãã¦ã¯ï¼\verb+luatexja.unary_pars+\
+å
ã«å¦çå
容ãè¨è¿°ããé¢æ°ãå®ç¾©ããã°è¯ãï¼ä¾ãã°ï¼Luaã¹ã¯ãªããã§
+\begin{lstlisting}[numbers=left]
+function luatexja.unary_pars.hoge (t)
+ return 42
+end
+\end{lstlisting}
+ãå®è¡ããã¨ï¼\verb+\ltjgetparameter{hoge}+ 㯠\texttt{42} ã¨ãã\emph{æåå}ãè¿ãï¼
+é¢æ° \verb+luatexja.unary_pars.hoge+ ã®å¼æ°$t$ã¯ï¼\ref{ssec-stack}ç¯ã§è¿°ã¹ã
+\LuaTeX-jaã®ã¹ã¿ãã¯ã·ã¹ãã ã«ãããã¹ã¿ãã¯ã¬ãã«ã§ããï¼
+æ»ãå¤ã¯ãããªãå¤ã§ãã£ã¦ãï¼æçµçã«ã¯æååã¨ãã¦åºåããããã¨ã«æ³¨æï¼
+
+ä¸æ¹ï¼è¿½å å¼æ°ï¼\emph{æ°å¤ãã許容ããªã}ï¼ãå¿
è¦ãªãã©ã¡ã¼ã¿ã«ã¤ãã¦ã¯ï¼
+ã¾ãLuaã¹ã¯ãªããã§å¦çå
容ã®æ¬ä½ãè¨è¿°ãã¦ããï¼
+\begin{lstlisting}[numbers=left]
+function luatexja.binary_pars.fuga (c, t)
+ return tostring(c) .. ', ' .. tostring(42)
+end
+\end{lstlisting}
+å¼æ°$t$ã¯ï¼å
ã«è¿°ã¹ãéãã®ã¹ã¿ãã¯ã¬ãã«ã§ããï¼ä¸æ¹ï¼å¼æ°$c$ã¯\
+\verb+\ltjgetparameter+ ã®ç¬¬2å¼æ°ã表ãæ°å¤ã§ããï¼
+ãããããã ãã§ã¯é§ç®ã§ï¼
+\begin{verbatim}
+\ltj@@decl@array@param{fuga}
+\end{verbatim}
+ãå®è¡ãï¼\TeX ã¤ã³ã¿ã¼ãã§ã¼ã¹å´ã«
+ã\verb+\ltjgetparameter{fuga}+ ã¯è¿½å å¼æ°ãå¿
è¦ãã¨ãããã¨ãéç¥ããå¿
è¦ãããï¼
+%
+
+%\section{Linebreak after a Japanese Character}
%\section{åææåç´å¾ã®æ¹è¡}
\label{sec-lbreak}
%\subsection{Reference: Behavior in \pTeX}
@@ -4817,11 +5830,11 @@ internal states are as follows:
\item State~$M$: middle of line
\item State~$K$: after a Japanese character
\end{itemize}
-The first three states---$N$, $S$~and~$M$---are as same as \TeX's input
+The first three states---$N$,~$S$, and~$M$---are as same as \TeX's input
processor. State~$K$ is similar to state~$M$, and is entered after
Japanese characters. The diagram of state transitions are indicated in
Figure~\ref{fig-ptexipro}. Note that \pTeX\ doesn't leave state~$K$
-after `beginning/ending of a group' characters.
+after ``beginning/ending of a group'' characters.
%
%<*ja>
@@ -4881,7 +5894,7 @@ after `beginning/ending of a group' characters.
(midline) edge node {5\ [\sp]} (endm)
(midline) edge [loop left] node {G, O} (midline)
(skipspc) edge node [right] {5} (ends)
- (newline) edge node {5 [{\tt\char92par}]} (endn);
+ (newline) edge node {5 [{\tt\textbackslash par}]} (endn);
\begin{scope}[red]
\path (newline) edge [bend right] node [right=25,below=3]{J} (kanji)
(midline) edge node [below]{J} (kanji)
@@ -4904,14 +5917,14 @@ after `beginning/ending of a group' characters.
\item[\textsf{5}] \textit{end-of-line} (usually \verb+^+\verb+^J+).
\item[\textsf{10}] space (usually \sp).
\item[\textsf{O}] other characters, whose category code is in $\{3,4,6,7,8,11,12,13\}$.
-\item[\textsf{[\sp]}, \textsf{[{\tt\char92par}]}]
+\item[\textsf{[\sp]}, \textsf{[{\tt\textbackslash par}]}]
emits a space, or~\verb+\par+.
\end{description}
\end{minipage}
\begin{itemize}
\item We omitted about category codes
-9~(\textit{ignored}), 14~(\textit{comment})~and~15~(\textit{invalid})
-from the above diagram. We also ignored the input like `\verb+^+\verb+^A+' or `\verb+^+\verb+^df+'.
+9~(\textit{ignored}), 14~(\textit{comment}), and~15~(\textit{invalid})
+from the above diagram. We also ignored the input like ``\verb+^+\verb+^A+'' or ``\verb+^+\verb+^df+''.
\item When a character whose category code is 0 (\textit{escape character}) is seen by \TeX,
the input processor scans a control sequence (\textsf{scan a c.s.}).
These paths are not shown in the above diagram.
@@ -4919,8 +5932,8 @@ These paths are not shown in the above diagram.
After that, the state is changed to State~$S$ (skipping blanks) in most cases, but
to State~$M$ (middle of line) sometimes.
\end{itemize}
-%\caption{State transitions of \pTeX's input processor.}
-%\caption{\pTeX ã®å
¥åå¦çé¨ã®ç¶æ
é·ç§»ï¼}
+%\caption{State transitions of \pTeX's input processor}
+%\caption{\pTeX ã®å
¥åå¦çé¨ã®ç¶æ
é·ç§»}
\label{fig-ptexipro}
\end{figure}
@@ -4934,22 +5947,22 @@ and they can't be customized by any callbacks. Hence, we can only use
suppress a space by a line break which is after Japanese characters.
However, \verb+token_filter+ callback cannot be used either, since a
-character in category code 5~(end-of-line) is converted into an space
+character in category code 5~(\textit{end-of-line}) is converted into an space
token \emph{in the input processor}. So we can use only the
\verb+process_input_buffer+ callback. This means that suppressing a
space must be done \emph{just before} an input line is read.
Considering these situations, handling of an end-of-line in \LuaTeX-ja are as follows:
\begin{quote}
-A character \texttt{U+FFFFF} (its category code is set to 14~(comment) by
+A character \texttt{U+FFFFF} (its category code is set to 14~(\textit{comment}) by
\LuaTeX-ja) is appended to an input line, \emph{before \LuaTeX\ actually
process it}, if and only if the following three conditions are satisfied:
\begin{enumerate}
\item The category code of \verb+\endlinechar+%
-\footnote{Usually, it is $\langle${return}$\rangle$
- (whose character code is 13).} is 5~(end-of-line).
-\item The category code of \texttt{U+FFFFF} itself is 14~(comment).
-\item The input line matches the following `regular expression':
+\footnote{Usually, it is $\langle$\textit{return}$\rangle$
+ (whose character code is 13).} is 5~(\textit{end-of-line}).
+\item The category code of \texttt{U+FFFFF} itself is 14~(\textit{comment}).
+\item The input line matches the following ``regular expression'':
\[
(\text{any char})^*(\textbf{JAchar})
\bigl(\{\text{catcode}=1\}\cup\{\text{catcode}=2\}\bigr)^*
@@ -4958,19 +5971,30 @@ process it}, if and only if the following three conditions are satisfied:
\end{quote}
\paragraph{Remark}
-The following example shows the major difference from the behavior of \pTeX:
+The following example shows the major difference from the behavior of \pTeX.
\begin{LTXexample}
+\fontspec[Ligatures=TeX]{TeX Gyre Termes}
\ltjsetparameter{autoxspacing=false}
\ltjsetparameter{jacharrange={-6}}xã
-y\ltjsetparameter{jacharrange={+6}}zã
+y\ltjsetparameter{jacharrange={+6}}zã
u
\end{LTXexample}
+It is not strange that ``ã'' does not printed in the above output.
+This is because \TeX\ Gyre\ Termes does not contain ``ã'', and because
+``ã'' in line~3 is considered as an \textbf{ALchar}.
+
+Note that there is no space before ``y'' in the output, but
+there is a space before ``u''. This follows from following reasons:
\begin{itemize}
-\item There is no space between `x' and `y', since the line~2 ends with a \textbf{JAchar} `ã'
-(this `ã' considered as an \textbf{JAchar} at the ending of line~1).
-\item There is no space between `ã' (in the line~3) and `u', since the
- line~3 ends with an \textbf{ALchar}
-(the letter `ã' considered as an \textbf{ALchar} at the ending of line~2).
+\item When line~3 is processed by \texttt{process\_input\_buffer} callback,
+``ã'' is considered as an \textbf{JAchar}.
+Since line~3 ends with an \textbf{JAchar},
+the comment character \texttt{U+FFFFF} is appended to this line,
+and hence the linebreak immediately after this line is ignored.
+\item When line~4 is processed by \texttt{process\_input\_buffer} callback,
+``ã'' is considered as an \textbf{ALchar}.
+Since line~4 ends with an \textbf{ALchar}, the linebreak immediately after this line
+emits a space.
\end{itemize}
%
@@ -4995,8 +6019,8 @@ u
ãæ«å°¾ã«è¿½å ããï¼ãã£ã¦ï¼ãã®å ´åã«æ¹è¡ã¯ç©ºç½ã¨ã¯è¦åãããªããã¨ã¨ãªãï¼
\begin{enumerate}
\item \verb+\endlinechar+ã®æå\footnote{æ®éã¯ï¼æ¹è¡æåï¼æåã³ã¼ã13çªï¼ã§ããï¼}
-ã®ã«ãã´ãªã¼ã³ã¼ãã5~(end-of-line)ã§ããï¼
-\item \texttt{U+FFFFF}ã®ã«ãã´ãªã¼ã³ã¼ãã14~(comment)ã§ããï¼
+ã®ã«ãã´ãªã¼ã³ã¼ãã5~(\textit{end-of-line})ã§ããï¼
+\item \texttt{U+FFFFF}ã®ã«ãã´ãªã¼ã³ã¼ãã14~(\textit{comment})ã§ããï¼
\item å
¥åè¡ã¯æ¬¡ã®ãæ£è¦è¡¨ç¾ãã«ããããã¦ããï¼
\[
(\text{any char})^*(\textbf{JAchar})
@@ -5005,24 +6029,32 @@ u
\end{enumerate}
\end{quote}
-ãã®ä»æ§ã¯ï¼åç¯ã§è¿°ã¹ã\pTeX ã®ä»æ§ã«ã§ããã ãè¿ã¥ãããã®ã¨ãªã£ã¦ããï¼æåã®æ¡ä»¶ã¯ï¼
+ãã®ä»æ§ã¯ï¼åç¯ã§è¿°ã¹ã\pTeX ã®ä»æ§ã«ã§ããã ãè¿ã¥ãããã®ã¨ãªã£ã¦ããï¼æ¡ä»¶1.ã¯ï¼
\texttt{verbatim}ç³»ç°å¢ãªã©ã®æ¥æ¬èªå¯¾å¿ãã¯ããæ¸ããªãã¦ãã¾ããããã®ãã®ã§ããï¼
-ããããªããï¼å®å
¨ã«åãæåãå®ç¾ã§ããããã§ã¯ãªãï¼
-å·®ç°ã¯ï¼æ¬¡ã®ä¾ã示ãããã«ï¼åææåã®ç¯å²ãå¤æ´ããè¡ã®æ¹è¡ã«ããã¦è¦ãããï¼
+
+ããããªããï¼\pTeX ã¨å®å
¨ã«åãæåãå®ç¾ã§ããããã§ã¯ãªãï¼
+次ã®ããã«ï¼åææåã®ç¯å²ãå¤æ´ããã¡ããã©ãã®è¡ã«ããã¦ã¯æåãç°ãªãï¼
\begin{LTXexample}
+\fontspec[Ligatures=TeX]{TeX Gyre Termes}
\ltjsetparameter{autoxspacing=false}
\ltjsetparameter{jacharrange={-6}}xã
-y\ltjsetparameter{jacharrange={+6}}zã
+y\ltjsetparameter{jacharrange={+6}}zã
u
\end{LTXexample}
-ãã\pTeX ã¨ã¾ã£ããåãæåã示ããªãã°ï¼åºåã¯
-ã\hbox{\ltjsetparameter{autoxspacing=false}x yzãu}ãã¨ãªãã¹ãã§ããï¼ãããï¼å®éã«ã¯
-ä¸ã®ããã«ç°ãªãæåã¨ãªã£ã¦ããï¼
+ä¸ã½ã¼ã¹ä¸ã®ãããã¯æ¬§ææåæ±ãã§ããï¼
+ããã§ä½¿ç¨ãã¦ãã欧æãã©ã³ã\TeX\ Gyre Termesã¯ããããå«ã¾ãªãï¼
+ãã£ã¦ï¼åºåã«ãããã¯ç¾ããªããã¨ã¯ä¸æè°ã§ã¯ãªãï¼
+ããã§ãï¼\pTeX ã¨ã¾ã£ããåãæåã示ããªãã°ï¼åºåã¯
+ã\hbox{\ltjsetparameter{autoxspacing=false}x yzãu}ãã¨ãªãã¯ãã§ããï¼ãããï¼å®éã«ã¯
+ä¸ã®ããã«ç°ãªãæåã¨ãªã£ã¦ãããï¼ããã¯ä»¥ä¸ã®çç±ã«ããï¼
\begin{itemize}
-\item 2è¡ç®ã¯ãããã¨ããåææåã§çµããï¼2è¡ç®ãå¦çããåã®æç¹ã§ã¯ï¼
- ãããã¯åææåæ±ãã§ããï¼ããï¼ç´å¾ã®æ¹è¡æåã¯ç¡è¦ãããï¼
-\item 3è¡ç®ã¯ãããã¨ãã欧ææåã§çµããï¼2è¡ç®ãå¦çããåã®æç¹ã§ã¯ï¼
- ãããã¯æ¬§ææåæ±ãã§ããï¼ããï¼ç´å¾ã®æ¹è¡æåã¯ç©ºç½ã«ç½®ãæããï¼
+\item 3è¡ç®ã \texttt{process\_input\_buffer} ã§å¦çããæç¹ã§ã¯ï¼
+ ãããã¯åææåæ±ãã§ããï¼ãã£ã¦3è¡ç®ã¯åææåã§çµãããã¨ã«ãªãï¼
+ ã³ã¡ã³ãæå \texttt{U+FFFFF} ã追å ãããï¼
+ ãã£ã¦ï¼ç´å¾ã®æ¹è¡æåã¯ç¡è¦ããããã¨ã«ãªãï¼ç©ºç½ã¯å
¥ããªãï¼
+\item 4è¡ç®ã \texttt{process\_input\_buffer} ã§å¦çããæç¹ã§ã¯ï¼
+ ãããã¯æ¬§ææåæ±ãã§ããï¼ãã£ã¦4è¡ç®ã¯æ¬§ææåã§çµãããã¨ã«ãªãï¼
+ ç´å¾ã®æ¹è¡æåã¯ç©ºç½ã«ç½®ãæããï¼
\end{itemize}
ãã®ããï¼ãã©ãã«ãé¿ããããã«ï¼åææåã®ç¯å²ã\verb+\ltjsetparameter+ã§ç·¨éããå ´åï¼
ãã®è¡ã¯ããã§æ¹è¡ããããã«ããæ¹ãããã ããï¼
@@ -5041,11 +6073,11 @@ u
\begin{itemize}
\item JFMã°ã«ã¼ã®æ¿å
¥ã¯ï¼åææåã表ããã¼ã¯ã³ãå
ã«æ°´å¹³ãªã¹ãã«ï¼æåã表ãï¼ã
追å ããéç¨ã§è¡ãããï¼
-\item \Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥ã¯ï¼æ°´å¹³ããã¯ã¹ã¸ã®ããã±ã¼ã¸ã³ã°ãè¡åå²åã«è¡ãããï¼
+\item \Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥ã¯ï¼hboxã¸ã®ããã±ã¼ã¸ã³ã°ãè¡åå²åã«è¡ãããï¼
\item \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã¯ãã¼ãã¨ãã¦ã¯æ¿å
¥ãããªãï¼ããã±ã¼ã¸ã³ã°ãè¡åå²ã®è¨ç®æã«
ãåææåã表ã2ã¤ã®ã®éã«ã¯\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãããããã®ã¨ã¿ãªãããï¼
\end{itemize}
-ãããï¼\LuaTeX-jaã§ã¯ï¼æ°´å¹³ããã¯ã¹ã¸ã®ããã±ã¼ã¸ã³ã°ãè¡åå²åã«å
¨ã¦ã®
+ãããï¼\LuaTeX-jaã§ã¯ï¼hboxã¸ã®ããã±ã¼ã¸ã³ã°ãè¡åå²åã«å
¨ã¦ã®
\textbf{JAglue}ï¼å³ã¡JFMã°ã«ã¼ã»\Param{\hyperlink{fld:xks}{xkanjiskip}}ã»\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®
3種é¡ãä¸åº¦ã«æ¿å
¥ãããã¨ã«ãªã£ã¦ããï¼ããã¯ï¼\LuaTeX ã«ããã¦æ¬§æã®ååã»
ã«ã¼ãã³ã°å¦çããã¼ããã¼ã¹ã«ãªã£ããã¨ã«å¯¾å¿ããå¤æ´ã§ããï¼
@@ -5057,7 +6089,7 @@ u
ã«ã¯é¢ä¿ããªããã®ãããï¼
-%\subsection{definition of a `cluster'}
+%\subsection{Definition of a Cluster}
%\subsection{ãã¯ã©ã¹ã¿ãã®å®ç¾©}
\def\OA{$\text{\sf O}_{\text{\sf A}}$}
@@ -5079,7 +6111,7 @@ with the \textit{id} of it:
%
%<*ja>
\item ãã® \verb+\ltj@icflag+ ã®å¤ã$[3,15)$ã«å
¥ããã¼ãã®ãªã¹ãï¼
- ãããã®ãã¼ãã¯ããæ¢ã«ããã±ã¼ã¸ã³ã°ãããæ°´å¹³ããã¯ã¹ãã \verb+\unhbox+ ã§
+ ãããã®ãã¼ãã¯ããæ¢ã«ããã±ã¼ã¸ã³ã°ãããhboxãã \verb+\unhbox+ ã§
ã¢ã³ããã¯ããããã®ã§ããï¼
ãã®\textit{id}ã¯\textit{id\_pbox}ã§ããï¼
%
@@ -5147,7 +6179,7 @@ The \textit{id} is \textit{id\_hlist} if the node is an
%<*ja>
\item ããã¯ã¹æ§ã®ãã¼ãï¼ã¤ã¾ãæ°´å¹³ããã¯ã¹ï¼åç´ããã¯ã¹ï¼ç½«ç· (\verb+\vrule+)ï¼
ããã¦\textit{unset\_node}ï¼
- ãã®\textit{id}ã¯åç´ã«ç§»åãã¦ããªãæ°´å¹³ããã¯ã¹ãªãã°\textit{id\_hlist}ï¼
+ ãã®\textit{id}ã¯åç´ã«ç§»åãã¦ããªãhboxãªãã°\textit{id\_hlist}ï¼
ããã§ãªããã°\textit{id\_box\_like}ã¨ãªãï¼
%
@@ -5183,7 +6215,7 @@ $\mathit{Np}.\mathit{id}$ã®æå³ãè¿°ã¹ãã¨ã¨ãã«ï¼
$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã¯ï¼ãã®åææåã表ãã¦ãã
\textit{glyph\_node}ãã®ãã®ã§ããï¼
\item[\textit{id\_glyph}] åææåã表ãã¦ããªã\textit{glyph\_node}~$p$ï¼\\
-å¤ãã®å ´åï¼$p$ã¯æ¬§ææåãæ ¼ç´ãã¦ãããï¼`ffi'ãªã©ã®ååã«ãã£ã¦ä½ããã
+å¤ãã®å ´åï¼$p$ã¯æ¬§ææåãæ ¼ç´ãã¦ãããï¼ãffiããªã©ã®ååã«ãã£ã¦ä½ããã
\textit{glyph\_node}ã§ããå¯è½æ§ãããï¼
åè
ã®å ´åï¼$\mathit{Np}.\mathit{head}$,~$\mathit{Np}.\mathit{tail} = p$ã§ããï¼
ä¸æ¹ï¼å¾è
ã®å ´åï¼
@@ -5196,7 +6228,7 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã¯ï¼ãã®åææå
\item[\textit{id\_math}] ã¤ã³ã©ã¤ã³æ°å¼ï¼\\
便å®çã«ï¼$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã¨ãã«
ãæåã³ã¼ã$-1$ã®æ¬§ææåãã¨ããï¼
-\item[\textit{id\_hlist}] 縦æ¹åã«ã·ããããã¦ããªãæ°´å¹³ããã¯ã¹ï¼\\
+\item[\textit{id\_hlist}] 縦æ¹åã«ã·ããããã¦ããªãhboxï¼\\
ãã®å ´åï¼$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã¯ãããã$p$ã®å
容ã表ããªã¹ãã®ï¼
å
é ã»æ«å°¾ã®ãã¼ãã§ããï¼
\begin{itemize}
@@ -5204,10 +6236,12 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã¯ï¼ãã®åææå
\begin{verbatim}
\hbox{\hbox{abc}...\hbox{\lower1pt\hbox{xyz}}}
\end{verbatim}
-ã®ããã«ï¼$p$ã®å
容ãå¥ã®æ°´å¹³ããã¯ã¹ã§éå§ã»çµäºãã¦ããå¯è½æ§ãååããå¾ãï¼ãã®ãããªå ´åï¼
-$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã®ç®åºã¯ï¼\emph{åç´æ¹åã«ã·ããããã¦ããªã}æ°´å¹³ããã¯ã¹ã®
+ã®ããã«ï¼$p$ã®å
容ãå¥ã®hboxã§éå§ã»çµäºãã¦ããå¯è½æ§ãååããå¾ãï¼ãã®ãããªå ´åï¼
+$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã®ç®åºã¯ï¼
+\emph{åç´æ¹åã«ã·ããããã¦ããªã}hboxã®
å ´åã ãå
é¨ãå帰çã«æ¢ç´¢ããï¼ä¾ãã°ä¸ã®ä¾ã§ã¯ï¼$\mathit{Np}.\mathit{head}$ã¯æåãaãã表ããã¼ãã§ããï¼
-ä¸æ¹$\mathit{Np}.\mathit{tail}$ã¯åç´æ¹åã«ã·ãããããæ°´å¹³ããã¯ã¹ï¼\verb+\lower1pt\hbox{xyz}+ã«å¯¾å¿ãããã¼ãã§ããï¼
+ä¸æ¹$\mathit{Np}.\mathit{tail}$ã¯åç´æ¹åã«ã·ãããããhboxï¼
+\verb+\lower1pt\hbox{xyz}+ ã«å¯¾å¿ãããã¼ãã§ããï¼
\item ã¾ãï¼å
é ã«ã¢ã¯ã»ã³ãä»ãã®æåããããï¼æ«å°¾ã«ã¤ã¿ãªãã¯è£æ£ç¨ã®ã«ã¼ã³ã
æ¥ããã¨ãããå¾ãï¼ãã®å ´åã¯ï¼ã¯ã©ã¹ã¿ã®å®ç¾©ã®ã¨ããã«ããã£ãããã«ï¼ãããã¯ç¡è¦ãã¦ç®åºãè¡ãï¼
\item æåã»æå¾ã®ãã¼ããååã«ãã£ã¦ä½ããã\textit{glyph\_node}ã®ã¨ãã¯ï¼ããããã«å¯¾ãã¦\textit{id\_glyph}%
@@ -5236,11 +6270,11 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ã®ç®åºã¯ï¼\emph{å
\textit{id}ã\textit{id\_jglyph}ã§ãããï¼\\
\textit{id}ã\textit{id\_pbox}ã§ãã£ã¦$\mathit{Np}.\mathit{head}$ã\textbf{JAchar}ã§ããã¨ãï¼
-\item[åæB] ãªã¹ãä¸ã®æ°´å¹³ããã¯ã¹ã®ä¸èº«ã®å
é ã¨ãã¦åºç¾ããåææåï¼åæAã¨ã®éãã¯ï¼ããã®åã«
+\item[åæB] ãªã¹ãä¸ã®hboxã®ä¸èº«ã®å
é ã¨ãã¦åºç¾ããåææåï¼åæAã¨ã®éãã¯ï¼ããã®åã«
JFMã°ã«ã¼ã®æ¿å
¥ãè¡ãããªãï¼\Param{\hyperlink{fld:xks}{xkanjiskip}},~\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã¯å
¥ãå¾ãï¼ãã¨ã§ããï¼\\
\textit{id}ã\textit{id\_hlist}ã\textit{id\_disc}ã§ãã£ã¦$\mathit{Np}.\mathit{head}$ã\textbf{JAchar}ã§ããã¨ãï¼
-\item[欧æ] ãªã¹ãä¸ã«ç´æ¥ï¼æ°´å¹³ããã¯ã¹ã®ä¸èº«ã¨ãã¦åºç¾ãã¦ãã欧ææåï¼æ¬¡ã®3ã¤ã®å ´åã該å½ï¼
+\item[欧æ] ãªã¹ãä¸ã«ç´æ¥ï¼hboxã®ä¸èº«ã¨ãã¦åºç¾ãã¦ãã欧ææåï¼æ¬¡ã®3ã¤ã®å ´åã該å½ï¼
\begin{itemize}
\item \textit{id}ã\textit{id\_glyph}ã§ããï¼
\item \textit{id}ã\textit{id\_math}ã§ããï¼
@@ -5254,65 +6288,69 @@ JFMã°ã«ã¼ã®æ¿å
¥ãè¡ãããªãï¼\Param{\hyperlink{fld:xks}{xkanjiskip}
\end{description}
-\subsection{段è½ï¼æ°´å¹³ããã¯ã¹ã®å
é ãæ«å°¾}
+\subsection{段è½ï¼hboxã®å
é ãæ«å°¾}
\paragraph{å
é é¨ã®å¦ç}
-ã¾ãï¼æ®µè½ï¼æ°´å¹³ããã¯ã¹ã®ä¸çªæåã«ããã¯ã©ã¹ã¿\textit{Np}ãæ¢ç´¢ããï¼
-æ°´å¹³ããã¯ã¹ã®å ´åã¯ä½ã®åé¡ããªããï¼æ®µè½ã®å ´åã§ã¯ä»¥ä¸ã®ãã¼ãéãäºåã«èªã¿é£ã°ãã¦ããï¼
-\begin{center}
-\verb+\parindent+ç±æ¥ã®æ°´å¹³ããã¯ã¹ ($\mathit{subtype}=3$)ï¼åã³\textit{subtype}ã44~(\textit{user\_defined})ã§ãªã
-ãããªwhatsitï¼
-\end{center}
-ããã¯ï¼\verb+\parindent+ç±æ¥ã®æ°´å¹³ããã¯ã¹ãã¯ã©ã¹ã¿ãæ§æããªãããã«ããããã§ããï¼
+ã¾ãï¼æ®µè½ï¼hboxã®ä¸çªæåã«ããã¯ã©ã¹ã¿\textit{Np}ãæ¢ç´¢ããï¼
+hboxã®å ´åã¯ä½ã®åé¡ããªããï¼æ®µè½ã®å ´åã§ã¯ä»¥ä¸ã®ãã¼ãéãäºåã«èªã¿é£ã°ãã¦ããï¼
+\begin{itemize}
+\item \verb+\parindent+ ç±æ¥ã®hbox($\mathit{subtype}=3$)
+\item \textit{subtype}ã44~(\textit{user\_defined})ã§ãªããããªwhatsit
+\end{itemize}
+ããã¯ï¼\verb+\parindent+ç±æ¥ã®hboxãã¯ã©ã¹ã¿ãæ§æããªãããã«ããããã§ããï¼
次ã«ï¼\textit{Np}ã®ç´åã«ç©ºç½$g$ãå¿
è¦ãªãæ¿å
¥ããï¼
\begin{enumerate}
\item ãã®å¦çãåããããª\textit{Np}ã¯\textsf{åæA}ã§ããï¼
-\item åé¡ã®ãªã¹ããåä¸ãããã®æ®µè½ï¼\verb+\parindent+ç±æ¥ã®æ°´å¹³ããã¯ã¹ããï¼ã®å ´åã¯ï¼
-ãã®ç©ºç½$g$ã¯ãæåã³ã¼ã\texttt{'parbdd'}ã®æåãã¨\textit{Np}ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã§ããï¼
-\item ããã§ãªãã¨ãï¼\verb+noindent+ã§éå§ããã段è½ãæ°´å¹³ããã¯ã¹ï¼ã¯ï¼
-$g$ã¯ãæåã³ã¼ã\texttt{'boxbdd'}ã®æåãã¨\textit{Np}ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã§ããï¼
+\item åé¡ã®ãªã¹ããåä¸ãããã®æ®µè½ï¼\verb+\parindent+ ç±æ¥ã®hboxããï¼ã®å ´åã¯ï¼
+ãã®ç©ºç½$g$ã¯ãæåã³ã¼ã \texttt{'parbdd'} ã®æåãã¨\textit{Np}ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã§ããï¼
+\item ããã§ãªãã¨ãï¼\verb+noindent+ ã§éå§ããã段è½ãhboxï¼ã¯ï¼
+$g$ã¯ãæåã³ã¼ã \texttt{'boxbdd'} ã®æåãã¨\textit{Np}ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã§ããï¼
\end{enumerate}
ãã ãï¼ãã$g$ãglueã§ãã£ãå ´åï¼ãã®æ¿å
¥ã«ãã£ã¦\textit{Np}ã«ããè¡åå²ãæ°ãã«å¯è½ã«ãªãã¹ãã§ã¯ãªãï¼
-ããã§ï¼ä»¥ä¸ã®å ´åã«ã¯ï¼$g$ã®ç´åã«\verb+\penalty10000+ãæ¿å
¥ããï¼
+ããã§ï¼ä»¥ä¸ã®å ´åã«ã¯ï¼$g$ã®ç´åã« \verb+\penalty10000+ ãæ¿å
¥ããï¼
\begin{itemize}
\item åé¡ã«ãã¦ãããªã¹ãã段è½ã§ããï¼ãã¤
\item \textit{Np}ã®åã«ã¯äºãããã«ãã£ããªãï¼$g$ã¯glueï¼
\end{itemize}
\paragraph{æ«å°¾ã®å¦ç}
-æ«å°¾ã®å¦çã¯ï¼åé¡ã®ãªã¹ãã段è½ã®ãã®ãæ°´å¹³ããã¯ã¹ã®ãã®ãã«ãã£ã¦ç°ãªãï¼
-å¾è
ã®å ´åã¯å®¹æãï¼æå¾ã®ã¯ã©ã¹ã¿ã\textit{Nq}ã¨ããã¨ï¼\textit{Nq}ã¨ãæåã³ã¼ã\texttt{'boxbdd'}ã®æåãã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ãï¼
+æ«å°¾ã®å¦çã¯ï¼åé¡ã®ãªã¹ãã段è½ã®ãã®ãhboxã®ãã®ãã«ãã£ã¦ç°ãªãï¼
+å¾è
ã®å ´åã¯å®¹æãï¼æå¾ã®ã¯ã©ã¹ã¿ã\textit{Nq}ã¨ããã¨ï¼\textit{Nq}ã¨ãæåã³ã¼ã\
+\texttt{'boxbdd'} ã®æåãã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ãï¼
\textit{Nq}ã®ç´å¾ã«æ¿å
¥ããã®ã¿ã§ããï¼
-ä¸æ¹ï¼åè
ï¼æ®µè½ï¼ã®å ´åã¯ï¼ãªã¹ãã®æ«å°¾ã¯å¸¸ã«\verb+\penalty10000+ã¨ï¼
-\verb+\parfillskip+ç±æ¥ã®ã°ã«ã¼ãåå¨ããï¼ãã£ã¦ï¼æå¾ã®ã¯ã©ã¹ã¿\textit{Np}ã¯
-ãã®\verb+\parfillskip+ç±æ¥ã®ã°ã«ã¼ã¨ãªãï¼å®è³ªçãªä¸èº«ã®æå¾ã¯ãã®1ã¤åã®ã¯ã©ã¹ã¿\textit{Nq}ã¨ãªãï¼
-\begin{enumerate}
-\item ã¾ã\textit{Nq}ã®ç´å¾ã«ï¼å¾ã«è¿°ã¹ãï¼\textsf{line-end~[E]}ã«ãã£ã¦å®ã¾ã空ç½ãæ¿å
¥ããï¼
-\item 次ã«ï¼æ®µè½ã®æå¾ã®ãé常ã®åææå${}+{}$å¥ç¹ããç¬ç«ããè¡ã¨ãªãã®ãé²ãããã«ï¼
+ä¸æ¹ï¼åè
ï¼æ®µè½ï¼ã®å ´åã¯ï¼ãªã¹ãã®æ«å°¾ã¯å¸¸ã« \verb+\penalty10000+ ã¨ï¼
+\verb+\parfillskip+ ç±æ¥ã®ã°ã«ã¼ãåå¨ããï¼%ãã£ã¦ï¼æå¾ã®ã¯ã©ã¹ã¿\textit{Np}ã¯
+%ãã® \verb+\parfillskip+ ç±æ¥ã®ã°ã«ã¼ã¨ãªãï¼å®è³ªçãªä¸èº«ã®æå¾ã¯ãã®1ã¤åã®ã¯ã©ã¹ã¿\textit{Nq}ã¨ãªãï¼
+段è½ã®æå¾ã®ãé常ã®åææå${}+{}$å¥ç¹ããç¬ç«ããè¡ã¨ãªãã®ãé²ãããã«ï¼
\Param{jcharwidowpenalty}ã®å¤ã®åã ãé©åãªå ´æã®ããã«ãã£ãå¢ããï¼
-ããã«ãã£éãå¢ããå ´æã¯ï¼\textit{head}ã\textbf{JAchar}ã§ããï¼ãã¤ãã®æåã®\Param{kcatcode}ãå¶æ°ã§ãããããª
-æå¾ã®ã¯ã©ã¹ã¿ã®ç´åã«ãããã®ãã¡ã§ãã\footnote{大éæã«è¨ãã°ï¼\Param{kcatcode}ãå¥æ°ã§ãããããª\textbf{JAchar}
-ãç´ç©ã¨ãã¦èãã¦ãããã¨ã«ãªãï¼\Param{kcatcode}ã®æä¸ä½ãããã¯ãã®\Param{jcharwidowpenalty}ç¨ã«ã®ã¿å©ç¨ãããï¼}ï¼
-\end{enumerate}
+ããã«ãã£éãå¢ããå ´æã¯ï¼\textit{head}ã\textbf{JAchar}ã§ããï¼
+ãã¤ãã®æåã®\Param{kcatcode}ãå¶æ°ã§ãããããª
+æå¾ã®ã¯ã©ã¹ã¿ã®ç´åã«ãããã®ãã¡ã§ãã%
+\footnote{大éæã«è¨ãã°ï¼\Param{kcatcode}ãå¥æ°ã§ãããããª\textbf{JAchar}%
+ãç´ç©ã¨ãã¦èãã¦ãããã¨ã«ãªãï¼
+\Param{kcatcode}ã®æä¸ä½ãããã¯ãã®\Param{jcharwidowpenalty}ç¨ã«ã®ã¿å©ç¨ãããï¼}ï¼
\subsection{æ¦è¦³ã¨å
¸åä¾ï¼2ã¤ã®ãåæAãã®å ´å}
+\label{ssec-cluster-wa}
å
ã«è¿°ã¹ãããã«ï¼2ã¤ã®é£ãåã£ãã¯ã©ã¹ã¿ï¼\textit{Nq}ã¨\textit{Np}ã®éã«ã¯ï¼
ããã«ãã£ï¼\verb+\vadjust+ï¼whatsitãªã©ï¼è¡çµçã«ã¯é¢ä¿ããªããã®ãããï¼æ¨¡å¼çã«è¡¨ãã¨ï¼
\[
\Node{cluster}{\textit{Nq}}\longrightarrow
\overbrace{
-\Node{penalty}{$p$}\longrightarrow \cdots\longrightarrow \Node{whatsit}{}}^{(a)}
+\Node{penalty}{$p$}\longrightarrow \cdots\longrightarrow \Node{whatsit}{}}^{\textrm{(a)}}
\longrightarrow \Node{cluster}{\textit{Np}}
\]
ã®ããã«ãªã£ã¦ããï¼éã®(a)ã«ç¸å½ããé¨åã«ã¯ï¼ä½ã®ãã¼ãããªãå ´åããã¡ããããå¾ãï¼
ãããã¦ï¼JFMã°ã«ã¼æ¿å
¥å¾ã«ã¯ï¼ãã®2ã¯ã©ã¹ã¿éã¯æ¬¡ã®ããã«ãªãï¼
\[
- \Node{cluster}{\textit{Nq}}\longrightarrow\Node{kern}{左空ç½}\longrightarrow
+ \Node{cluster}{\textit{Nq}}\longrightarrow%\Node{kern}{左空ç½}\longrightarrow
\overbrace{
-\Node{penalty}{$p+x$}\longrightarrow \cdots\longrightarrow \Node{whatsit}{}}^{(a)}
-\longrightarrow \Node{glue or kern}{å³ç©ºç½}\longrightarrow \Node{cluster}{\textit{Np}}
+\Node{penalty}{$p+x$}\longrightarrow \cdots\longrightarrow
+\Node{whatsit}{}}^{\textrm{(a)}}\longrightarrow
+\Node{glue or kern}{\raisebox{-.2\zw}{å³ç©ºç½}}\longrightarrow
+\Node{cluster}{\textit{Np}}
\]
以å¾ï¼\emph{å
¸åçãªä¾ã¨ãã¦ï¼ã¯ã©ã¹ã¿\textit{Nq}ã¨\textit{Np}ãå
±ã«\textsf{\textmd{åæA}}ã§ããå ´åãè¦ã¦ãããï¼}
@@ -5324,11 +6362,11 @@ $g$ã¯ãæåã³ã¼ã\texttt{'boxbdd'}ã®æåãã¨\textit{Np}ã®éã«å
¥
\item[JFMç±æ¥{[M]}] JFMã®æåã¯ã©ã¹æå®ã«ãã£ã¦å
¥ã空ç½ã以ä¸ã«ãã£ã¦æ±ããï¼ãã®æ®µéã§ç©ºç½éãæªå®ç¾©ï¼æªæå®ï¼ã ã£ãå ´åï¼
ããã©ã«ãå¤\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãæ¡ç¨ãããã¨ã¨ãªãã®ã§ï¼æ¬¡ã¸ï¼
\begin{enumerate}
-\item ãã両ã¯ã©ã¹ã¿ã®éã§\verb+\inhibitglue+ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼
+\item ãã両ã¯ã©ã¹ã¿ã®é㧠\verb+\inhibitglue+ ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼
代ããã«\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãæ¿å
¥ããããã¨ã¨ãªãï¼æ¬¡ã¸ï¼
\item \textit{Nq}ã¨\textit{Np}ãåãJFMã»åã\texttt{jfmvar}ãã¼ã»åããµã¤ãºã®åæãã©ã³ãã§ãã£ããªãã°ï¼
å
±éã«ä½¿ã£ã¦ããJFMå
ã§æ¿å
¥ããã空ç½ï¼ã°ã«ã¼ãã«ã¼ã³ï¼ã決ã¾ã£ã¦ããã調ã¹ï¼æ±ºã¾ã£ã¦ããã°ãããæ¡ç¨ï¼
-\item 1.ã§ã2.ã§ããªãå ´åã¯ï¼\textit{Nq}ã¨\textit{Np}ãéãJFM/\texttt{jfmvar}/ãµã¤ãºã§ããï¼
+\item 1.ã§ã2.ã§ããªãå ´åã¯ï¼JFMã»\texttt{jfmvar}ã»ãµã¤ãºã®3ã¤çµã¯\textit{Nq}ã¨\textit{Np}ã§ç°ãªãï¼
ãã®å ´åï¼ã¾ã
\[
\vcenter{\halign{\hfil$#:={}$&\inhibitglue#\inhibitglue\cr
@@ -5343,9 +6381,12 @@ ga&(\inhibitglue ã使ç¨ãã©ã³ãã\textit{Np}ã®ããã¨åãã§ï¼\hfi
$\mathit{gb}$,~$\mathit{ga}$ããããã«å¯¾ããã®å¤ã$d_b$,~$d_a$ã¨ããï¼
\begin{itemize}
\item
-$\mathit{ga}$ã¨$\mathit{gb}$ã®ä¸¡æ¹ãæªå®ç¾©ã§ãããªãã°ï¼JFMç±æ¥ã®ã°ã«ã¼ã¯æ¿å
¥ãããï¼\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãæ¡ç¨ãããã¨ã¨ãªãï¼ã©ã¡ããçæ¹ã®ã¿ãæªå®ç¾©ã§ãããªãã°ï¼æ¬¡ã®ã¹ãããã§ãã®æªå®ç¾©ã®æ¹ã¯é·ã0ã®kernã§ï¼ã®å¤ã¯0ã§ãããã®ããã«æ±ãããï¼
+$\mathit{ga}$ã¨$\mathit{gb}$ã®ä¸¡æ¹ãæªå®ç¾©ã§ãããªãã°ï¼JFMç±æ¥ã®ã°ã«ã¼ã¯æ¿å
¥ãããï¼
+\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãæ¡ç¨ãããã¨ã¨ãªãï¼
+ã©ã¡ããçæ¹ã®ã¿ãæªå®ç¾©ã§ãããªãã°ï¼æ¬¡ã®ã¹ãããã§ãã®æªå®ç¾©ã®æ¹ã¯é·ã0ã®kernã§ï¼ã®å¤ã¯0ã§ãããã®ããã«æ±ãããï¼
\item
-\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}ã®å¤ã\texttt{pleft}, \texttt{pright}, \texttt{paverage}ã®ã¨ãï¼
+\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}ã®å¤ã \texttt{pleft}, \texttt{pright},
+ \texttt{paverage} ã®ã¨ãï¼
ã®æå®ã«å¾ã£ã¦æ¯ä¾é
åãè¡ãï¼
JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ã¯ä»¥ä¸ã®å¤ã¨ãªãï¼
\[
@@ -5361,7 +6402,7 @@ y&\text{if\ }\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}=\texttt{pright};\\
\end{cases}.
\]
\item
-\Param{differentmet}ããã以å¤ã®å¤ã®æã¯ï¼ã®å¤ã¯ç¡è¦ããï¼JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ã¯ä»¥ä¸ã®å¤ã¨ãªãï¼
+\Param{differentjfm}ããã以å¤ã®å¤ã®æã¯ï¼ã®å¤ã¯ç¡è¦ããï¼JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ã¯ä»¥ä¸ã®å¤ã¨ãªãï¼
\[
f(\textit{gb},\textit{ga})
\]
@@ -5379,35 +6420,37 @@ x+y&\text{if\ }\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}=\texttt{both};
ä¾ãã°ï¼
\begin{verbatim}
-\jfont\foo=psft:Ryumin-Light:jfm=ujis
-\jfont\bar=psft:GothicBBB-Medium:jfm=ujis
-\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo
+\jfont\foo=psft:Ryumin-Light:jfm=ujis;-kern
+\jfont\bar=psft:GothicBBB-Medium:jfm=ujis;-kern
+\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo;-kern
\end{verbatim}
ã¨ãã3ãã©ã³ããèãï¼
\[
- \overbrace{\Node{glyph}{{\tt\char`\\foo}, `ã'}}^{p}
-\longrightarrow \overbrace{\Node{glyph}{{\tt\char`\\bar}, `ã'}}^{q}
-\longrightarrow \overbrace{\Node{glyph}{{\tt\char`\\baz}, `ã'}}^{r}
+ \overbrace{\Node{glyph}{{\tt\textbackslash foo}, `ã'}}^{p}
+\longrightarrow \overbrace{\Node{glyph}{{\tt\textbackslash bar}, `ã'}}^{q}
+\longrightarrow \overbrace{\Node{glyph}{{\tt\textbackslash baz}, `ã'}}^{r}
\]
ã¨ãã3ãã¼ããèããï¼ããããåç¬ã§ã¯ã©ã¹ã¿ããªãï¼ï¼
-ãã®å ´åï¼$p$ã¨$q$ã®éã¯ï¼å®ãã©ã³ããç°ãªãã«ãããããã(2)ã®ç¶æ³ã¨ãªãä¸æ¹ã§ï¼
-$q$ã¨$r$ã®éã¯ï¼å®ãã©ã³ããåããªã®ã«ï¼\texttt{jfmvar}ãã¼ã®å
容ãç°ãªãã®ã§(3)ã®ç¶æ³ã¨ãªãï¼
+ãã®å ´åï¼$p$ã¨$q$ã®éã¯ï¼å®ãã©ã³ããç°ãªãã«ãããããã2.ã®ç¶æ³ã¨ãªãä¸æ¹ã§ï¼
+$q$ã¨$r$ã®éã¯ï¼å®ãã©ã³ããåããªã®ã«ï¼\texttt{jfmvar} ãã¼ã®å
容ãç°ãªãã®ã§3.ã®ç¶æ³ã¨ãªãï¼
\item[\Param{kanjiskip}~{[K]}] ä¸ã®[M]ã«ããã¦ç©ºç½ãå®ã¾ããªãã£ãå ´åï¼
以ä¸ã§å®ããéãå³ç©ºç½ãã¨ãã¦æ¡ç¨ããï¼
-ãã®æ®µéã«ããã¦ã¯ï¼\verb+\inhibitglue+ã¯å¹åãæããªãããï¼
+ãã®æ®µéã«ããã¦ã¯ï¼\verb+\inhibitglue+ ã¯å¹åãæããªãããï¼
çµæã¨ãã¦ï¼2ã¤ã®åææåéã«ã¯å¸¸ã«ä½ããã®ã°ã«ã¼ï¼ã«ã¼ã³ãæ¿å
¥ããããã¨ã¨ãªãï¼
\begin{enumerate}
\item 両ã¯ã©ã¹ã¿ï¼å³å¯ã«ã¯$\mathit{Nq}.\mathit{tail}$ï¼$\mathit{Np}.\mathit{head}$ï¼ã®ä¸èº«ã®æåã³ã¼ãã«å¯¾ãã
\Param{autospacing}ãã©ã¡ã¿ã両æ¹ã¨ãfalseã ã£ãå ´åã¯ï¼é·ã0ã®glueã¨ããï¼
-\item ã¦ã¼ã¶å´ããè¦ã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãã©ã¡ã¿ã®èªç¶é·ã${\tt \char`\\maxdimen}=(2^{30}-1)\,{\rm sp}$ã§
+\item ã¦ã¼ã¶å´ããè¦ã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãã©ã¡ã¿ã®èªç¶é·ã${\tt \textbackslash maxdimen}=(2^{30}-1)\,{\rm sp}$ã§
ãªããã°ï¼\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ãã©ã¡ã¿ã®å¤ãæã¤glueãæ¡ç¨ããï¼
\item 2.ã§ãªãå ´åã¯ï¼\textit{Nq}, \textit{Np}ã§ä½¿ããã¦ããJFMã«æå®ããã¦ãã\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}ã®å¤ãç¨ããï¼
ã©ã¡ããçæ¹ã®ã¯ã©ã¹ã¿ã ããåææåï¼\textsf{åæA}ã»\textsf{åæB}ï¼ã®ã¨ãã¯ï¼ãã¡ãã®ã¯ã©ã¹ã¿ã§ä½¿ããã¦ãã
JFMç±æ¥ã®å¤ã ããç¨ããï¼ãã両è
ã§ä½¿ããã¦ããJFMãç°ãªã£ãå ´åã¯ï¼ä¸ã®[M]~3.ã¨åæ§ã®æ¹æ³ãç¨ãã¦èª¿æ´ããï¼
\end{enumerate}
\end{description}
-\paragraph{ã左空ç½ãã®ç®åºã¨ããã«ä¼´ãè£æ£}
-ã左空ç½ãã¯éå»ã®ãã¼ã¸ã§ã³ã§ã¯å®ç¾©ãã¦ãããï¼ãã®ãã¼ã¸ã§ã³ã§ã¯æ¿å
¥ã¯ä¸åè¡ãããªãï¼æ©è½èªä½åé¤ãã¦ããï¼ï¼ãããï¼ä»æ§ã¯æµåçã§ããï¼å°æ¥å¾©æ´»ããå¯è½æ§ãããããï¼ããã¥ã¢ã«ä¸ã®è¨è¿°ã¯ä»ã®ã¨ãã極åå¤æ´ããªãï¼
+%\paragraph{ã左空ç½ãã®ç®åºã¨ããã«ä¼´ãè£æ£}
+%ã左空ç½ãã¯éå»ã®ãã¼ã¸ã§ã³ã§ã¯å®ç¾©ãã¦ãããï¼ãã®ãã¼ã¸ã§ã³ã§ã¯
+%æ¿å
¥ã¯ä¸åè¡ãããªãï¼æ©è½èªä½åé¤ãã¦ããï¼ï¼
+%ãããï¼ä»æ§ã¯æµåçã§ããï¼å°æ¥å¾©æ´»ããå¯è½æ§ãããããï¼ããã¥ã¢ã«ä¸ã®è¨è¿°ã¯ä»ã®ã¨ãã極åå¤æ´ããªãï¼
\paragraph{ç¦åç¨ããã«ãã£ã®æ¿å
¥}
ã¾ãï¼
\[
@@ -5433,19 +6476,21 @@ $a$ã¯ç¦åå¦çç¨ã«\textit{Nq}ã¨\textit{Np}ã®éã«å ããããã¹ã
\item ãå³ç©ºç½ããã«ã¼ã³ã§ããã¨ãï¼
ããã¯ã\textit{Nq}ã¨\textit{Np}ã®éã§æ¹è¡ã¯è¨±ãããªãããã¨ãæå³ãã¦ããï¼ãã®ããï¼
ãã®å ´åã¯$a\neq 0$ã§ãã£ã¦ãããã«ãã£ã®æ¿å
¥ã¯ããªãï¼
-\item ã左空ç½ããã«ã¼ã³ã¨ãã¦ãã£ã¡ãå®ç¾©ããã¦ããæï¼ãã®ã¨ãï¼ãå³ç©ºç½ãã¯ã«ã¼ã³ã§ãªãï¼ï¼
-ãã®ã左空ç½ãã®ç´å¾ã§ã®è¡åå²ã許容ããªãã¨ãããªãã®ã§ï¼$a=0$ã§ãã£ã¦ã
-\textit{penalty\_node}ãä½ã£ã¦æ¿å
¥ããï¼
-\item 以ä¸ã®ã©ãã§ããªãã¨ãã¯ï¼$a\neq 0$ãªãã°\textit{penalty\_node}ãä½ã£ã¦æ¿å
¥ããï¼
+\item ããã§ãªããªãã¨ãã¯ï¼$a\neq 0$ãªãã°\textit{penalty\_node}ãä½ã£ã¦æ¿å
¥ããï¼
+%\item ã左空ç½ããã«ã¼ã³ã¨ãã¦ãã£ã¡ãå®ç¾©ããã¦ããæï¼ãã®ã¨ãï¼ãå³ç©ºç½ãã¯ã«ã¼ã³ã§ãªãï¼ï¼
+%ãã®ã左空ç½ãã®ç´å¾ã§ã®è¡åå²ã許容ããªãã¨ãããªãã®ã§ï¼$a=0$ã§ãã£ã¦ã
+%\textit{penalty\_node}ãä½ã£ã¦æ¿å
¥ããï¼
+%\item 以ä¸ã®ã©ãã§ããªãã¨ãã¯ï¼$a\neq 0$ãªãã°\textit{penalty\_node}ãä½ã£ã¦æ¿å
¥ããï¼
\end{itemize}
\end{description}
\def\gkf#1#2#3{\sf$\displaystyle\vphantom{\Bigg(}%
- \frac{\hbox to 1\zw{#1}\hbox to 4.5\zw{\hss #2}}{\hbox{#3}}$}
+ \frac{\hbox to 4\zw{\hss#2\hss}}{\hbox{#3}}$}
\begin{table}[t]
-%\caption{Summary of JFM glues.}
-%\caption{JFM ã°ã«ã¼ã®æ¦è¦ï¼}
+%\caption{Summary of JFM glues}
+%\caption{JFM ã°ã«ã¼ã®æ¦è¦}
\label{tab-jfmglue}
+%\medskip
\begin{center}
\small
\begin{tabular}{c|cccccc}
@@ -5473,34 +6518,36 @@ $a$ã¯ç¦åå¦çç¨ã«\textit{Nq}ã¨\textit{Np}ã®éã«å ããããã¹ã
\end{center}
\begin{quote}
%<*en>
-Here {\small\gkf{E}{MâK}{PN}} means that
+In the table above, {\small\gkf{E}{MâK}{PN}} means that
%
%<*ja>
-ãã㧠{\small\gkf{E}{MâK}{PN}} ã¯æ¬¡ã®æå³ã§ããï¼
+ä¸ã®è¡¨ã«ããã¦ï¼{\small\gkf{E}{MâK}{PN}}ã¯æ¬¡ã®æå³ã§ããï¼
%
\begin{enumerate}
%<*en>
-\item To determine the `right-space', \LuaTeX-ja first attempts by the method `\textsf{JFM-origin~[M]}'.
-If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}'.
+\item To determine the ``right-space'', \LuaTeX-ja first attempts by the method ``\textsf{JFM-origin~[M]}''.
+If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]}''.
%
%<*ja>
\item ãå³ç©ºç½ãã決ããããã«ï¼\LuaTeX-ja ã¯ã¾ããJFMç±æ¥{[M]}ãã®æ¹æ³ã試ã¿ãï¼
ããã失æãããï¼\LuaTeX-ja ã¯ã\Param{kanjiskip}~{[K]}ãã®æ¹æ³ã試ã¿ãï¼
%
-%<*en>
-\item The `left space' between \textit{Nq}~and~\textit{Np} is determined by the method `\textsf{line-end~[E]}'.
-%
-%<*ja>
-\item \textit{Nq} 㨠\textit{Np} ã®éã®ã左空ç½ãã¯ã\textsf{line-end~[E]}ãã®
- æ¹æ³ã§æ±ºå®ãããï¼
-%
+% %<*en>
+% \item The ``left space'' between \textit{Nq}~and~\textit{Np} is
+% determined by the method ``\textsf{line-end~[E]}''.
+% %
+% %<*ja>
+% \item \textit{Nq} 㨠\textit{Np} ã®éã®ã左空ç½ãã¯ã\textsf{line-end~[E]}ãã®
+% æ¹æ³ã§æ±ºå®ãããï¼
+% %
%<*en>
-\item \LuaTeX-ja adopts the method `\textsf{P-normal~[PN]}' to adjust the penalty between two clusters for \emph{kinsoku shori}.
+\item \LuaTeX-ja adopts the method ``\textsf{P-normal~[PN]}'' to adjust the penalty
+ between two clusters for \emph{kinsoku shori}.
%
%<*ja>
-\item \LuaTeX-jaã¯2ã¤ã®ã¯ã©ã¹ã¿ã®éã®ç¦åå¦çç¨ã®ããã«ãã£ã調ç¯ããããã«ã\textsf{P-normal~[PN]}ãã®æ¹æ³ãæ¡ç¨ããï¼
+\item \LuaTeX-jaã¯2ã¤ã®ã¯ã©ã¹ã¿ã®éã®ç¦åå¦çç¨ã®ããã«ãã£ãè¨å®ããããã«ã\textsf{P-normal~[PN]}ãã®æ¹æ³ãæ¡ç¨ããï¼
%
\end{enumerate}
\end{quote}
@@ -5514,7 +6561,7 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\begin{itemize}
\item ãå³ç©ºç½ãã«ã¤ãã¦ã¯ï¼ã¾ã以ä¸ã«è¿°ã¹ã\textsf{Boundary-B~[\OB]}ã«ãã空ç½ã決å®ãããã¨è©¦ã¿ãï¼
ããã失æããå ´åã¯ï¼\textsf{\Param{\hyperlink{fld:xks}{xkanjiskip}}~[X]}ã«ãã£ã¦å®ããï¼
-\item ã左空ç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{line-end~[E]}ããã®ã¾ã¾æ¡ç¨ããï¼ããã«ä¼´ããå³ç©ºç½ãã®è£æ£ãåãï¼
+%\item ã左空ç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{line-end~[E]}ããã®ã¾ã¾æ¡ç¨ããï¼ããã«ä¼´ããå³ç©ºç½ãã®è£æ£ã%åãï¼
\item ç¦åç¨ããã«ãã£ãï¼ä»¥åè¿°ã¹ã\textsf{P-normal~[PN]}ã¨åãã§ããï¼
\end{itemize}
\begin{description}
@@ -5523,14 +6570,15 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\textsf{JFM-origin~[M]}ã®å¤ç¨®ã¨èãã¦è¯ãï¼
ããã«ãã£ã¦å®ã¾ã空ç½ã®å
¸åä¾ã¯ï¼åæã®éãæ¬å¼§ã¨æ¬§ææåã®éã«å
¥ãåè§ã¢ãã§ããï¼
\begin{enumerate}
-\item ãã両ã¯ã©ã¹ã¿ã®éã§\verb+\inhibitglue+ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼æ¬¡ã¸ï¼
+\item ãã両ã¯ã©ã¹ã¿ã®é㧠\verb+\inhibitglue+ ãå®è¡ããã¦ããå ´å%
+ï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼ãå³ç©ºç½ãã¯æªå®ç¾©ï¼
\item ããã§ãªããã°ï¼
-\textit{Nq}ã¨ãæåã³ã¼ãã{\tt'jcharbdd'}ã®æåãã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã¨ãã¦å®ã¾ãï¼
+\textit{Nq}ã¨ãæåã³ã¼ãã {\tt'jcharbdd'} ã®æåãã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã¨ãã¦å®ã¾ãï¼
\end{enumerate}
-\item[\Param{\hyperlink{fld:xks}{xkanjiskip}}~{[X]}]
+\item[\Param{xkanjiskip}~{[X]}]
ãã®æ®µéã§ã¯ï¼\textsf{\Param{kanjiskip}~[K]}ã®ã¨ãã¨åãããã«ï¼
以ä¸ã§å®ããéããå³ç©ºç½ãã¨ãã¦æ¡ç¨ããï¼
-ãã®æ®µéã§\verb+\inhibitglue+ã¯å¹åãæããªãã®ãåãã§ããï¼
+\verb+\inhibitglue+ ã¯å¹åãæããªãï¼
\begin{enumerate}
\item 以ä¸ã®ããããã®å ´åã¯ï¼\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥ã¯ææ¢ãããï¼ãããï¼å®éã«ã¯è¡åå²ã許容ããããã«ï¼é·ã0ã®glueãæ¡ç¨ããï¼
\begin{itemize}
@@ -5540,7 +6588,7 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\item \textit{Np}ã®ä¸èº«ã®æåã³ã¼ãã«ã¤ãã¦ï¼ãç´åã¸ã®\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®æ¿å
¥ããç¦æ¢ããã¦ãã
ï¼ã¤ã¾ãï¼\Param{jaxspmode}~(or \Param{alxspmode})ãã©ã¡ã¿ãå¶æ°ï¼ï¼
\end{itemize}
-\item ã¦ã¼ã¶å´ããè¦ã\Param{\hyperlink{fld:xks}{xkanjiskip}}ãã©ã¡ã¿ã®èªç¶é·ã${\tt \char`\\maxdimen}=(2^{30}-1)\,{\rm sp}$ã§
+\item ã¦ã¼ã¶å´ããè¦ã\Param{\hyperlink{fld:xks}{xkanjiskip}}ãã©ã¡ã¿ã®èªç¶é·ã${\tt \textbackslash maxdimen}=(2^{30}-1)\,{\rm sp}$ã§
ãªããã°ï¼\Param{\hyperlink{fld:xks}{xkanjiskip}}ãã©ã¡ã¿ã®å¤ãæã¤glueãæ¡ç¨ããï¼
\item 2.ã§ãªãå ´åã¯ï¼\textit{Nq}, \textit{Np}ï¼\textsf{åæA}/\textsf{åæB}ãªã®ã¯çæ¹ã ãï¼
ã§ä½¿ããã¦ããJFMã«æå®ããã¦ãã\Param{\hyperlink{fld:xks}{xkanjiskip}}ã®å¤ãç¨ããï¼
@@ -5553,7 +6601,7 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\begin{itemize}
\item ãå³ç©ºç½ãã«ã¤ãã¦ã¯ï¼ã¾ã以ä¸ã«è¿°ã¹ã\textsf{Boundary-A~[\OA]}ã«ãã空ç½ã決å®ãããã¨è©¦ã¿ãï¼
ããã失æããå ´åã¯ï¼\textsf{\Param{\hyperlink{fld:xks}{xkanjiskip}}~[X]}ã«ãã£ã¦å®ããï¼
-\item \textit{Nq}ãåæã§ãªãã®ã§ï¼ã左空ç½ãã¯ç®åºãããªãï¼
+%\item \textit{Nq}ãåæã§ãªãã®ã§ï¼ã左空ç½ãã¯ç®åºãããªãï¼
\item ç¦åç¨ããã«ãã£ã¯ï¼ä»¥åè¿°ã¹ã\textsf{P-normal~[PN]}ã¨åãã§ããï¼
\end{itemize}
\begin{description}
@@ -5562,9 +6610,9 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\textsf{JFM-origin~[M]}ã®å¤ç¨®ã¨èãã¦è¯ãï¼
ããã«ãã£ã¦å®ã¾ã空ç½ã®å
¸åä¾ã¯ï¼æ¬§ææåã¨åæã®éãæ¬å¼§ã¨ã®éã«å
¥ãåè§ã¢ãã§ããï¼
\begin{enumerate}
-\item ãã両ã¯ã©ã¹ã¿ã®éã§\verb+\inhibitglue+ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼æ¬¡ã¸ï¼
+\item ãã両ã¯ã©ã¹ã¿ã®é㧠\verb+\inhibitglue+ ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼æ¬¡ã¸ï¼
\item ããã§ãªããã°ï¼
-ãæåã³ã¼ãã{\tt'jcharbdd'}ã®æåãã¨\textit{Np}ã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã¨ãã¦å®ã¾ãï¼
+ãæåã³ã¼ãã {\tt'jcharbdd'} ã®æåãã¨\textit{Np}ã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³ã¨ãã¦å®ã¾ãï¼
\end{enumerate}
\end{description}
@@ -5576,16 +6624,16 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\begin{itemize}
\item ãå³ç©ºç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{Boundary-B~[\OB]}ã«ãã空ç½ã決å®ãããã¨è©¦ã¿ãï¼
ããã失æããå ´åã¯ï¼ãå³ç©ºç½ãã¯æ¿å
¥ãããªãï¼
-\item ã左空ç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{line-end~[E]}ã®ç®åºæ¹æ³ããã®ã¾ã¾æ¡ç¨ããï¼ããã«ä¼´ããå³ç©ºç½ãã®è£æ£ãåãï¼
+%\item ã左空ç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{line-end~[E]}ã®ç®åºæ¹æ³ããã®ã¾ã¾æ¡ç¨ããï¼ããã«ä¼´ããå³ç©ºç½ãã®è£æ£ãåãï¼
\item ç¦åç¨ããã«ãã£ã®å¦çã¯ï¼å¾ãã®ã¯ã©ã¹ã¿\textit{Np}ã®ç¨®é¡ã«ãã£ã¦ç°ãªãï¼
ãªãï¼$\mathit{Np}.\mathit{head}$ã¯ç¡æå³ã§ããããï¼
ã$\mathit{Np}.\mathit{head}$ã«å¯¾ãã\Param{\hyperlink{fld:prebp}{prebreakpenalty}}ã®å¤ãã¯0ã¨ã¿ãªãããï¼è¨ãæããã°ï¼
\[
- a:=(\text{\textit{Nq}{\footnotemark}ã®æåã«å¯¾ãã\Param{\hyperlink{fld:postbp}{postbreakpenalty}}ã®å¤}).
+ a:=(\text{\textit{Nq}ã®æåã«å¯¾ãã\Param{\hyperlink{fld:postbp}{postbreakpenalty}}ã®å¤}).
\]
\begin{description}
\item[ç®±] \textit{Np}ã\textsf{ç®±}ã§ãã£ãå ´åã¯ï¼ä¸¡ã¯ã©ã¹ã¿ã®éã§ã®è¡åå²ã¯
-ï¼æ示çã«ä¸¡ã¯ã©ã¹ã¿ã®éã«\verb+\penalty10000+ããã£ãå ´åãé¤ãï¼ãã¤ã許容ãããï¼ãã®ããï¼
+ï¼æ示çã«ä¸¡ã¯ã©ã¹ã¿ã®éã« \verb+\penalty10000+ ããã£ãå ´åãé¤ãï¼ãã¤ã許容ãããï¼ãã®ããï¼
ããã«ãã£å¦çã¯ï¼å¾ã«è¿°ã¹ã\textsf{P-allow~[PA]}ã\textsf{P-normal~[PN]}ã®ä»£ããã«ç¨ããããï¼
\item[ã°ã«ã¼] \textit{Np}ãã°ã«ã¼ã®å ´åï¼ããã«ãã£å¦çã¯\textsf{P-normal~[PN]}ãç¨ããï¼
\item[ã«ã¼ã³] \textit{Np}ãã«ã¼ã³ã§ãã£ãå ´åã¯ï¼ä¸¡ã¯ã©ã¹ã¿ã®éã§ã®è¡åå²ã¯
@@ -5603,11 +6651,11 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
(a)é¨åã«ããã«ãã£ãåå¨ãã¦ããªãå ´åï¼
\LuaTeX-ja ã¯\textit{Nq}ã¨\textit{Np}ã®éã®è¡åå²ãå¯è½ã«ãããã¨ããï¼
-ãã®ããã«ï¼ä»¥ä¸ã®å ´åã«$a$ããã¤\textit{penalty\_node}ãä½ã£ã¦
+ãã®ããã«ï¼ä»¥ä¸ã®ããããã®å ´åã«$a$ããã¤\textit{penalty\_node}ãä½ã£ã¦
ãå³ç©ºç½ãã®ï¼ããæªå®ç¾©ãªã\textit{Np}ã®ï¼ç´åã«æ¿å
¥ããï¼
\begin{itemize}
\item ãå³ç©ºç½ããã°ã«ã¼ã§ãªãï¼ã«ã¼ã³ãæªå®ç¾©ï¼ã§ããã¨ãï¼
-\item ã左空ç½ããã«ã¼ã³ã¨ãã¦ãã£ã¡ãå®ç¾©ããã¦ããæï¼
+\item $a\neq 0$ã®ã¨ãã¯ï¼ãå³ç©ºç½ããã°ã«ã¼ã§ãã£ã¦ã\textit{penalty\_node}ãä½ãï¼
\end{itemize}
\item[P-suppress~{[PS]}]
@@ -5617,10 +6665,10 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
(a)é¨åã«ããã«ãã£ãåå¨ãã¦ããªãå ´åï¼
\textit{Nq}ã¨\textit{Np}ã®éã®è¡åå²ã¯å
ã
ä¸å¯è½ã®ã¯ãã ã£ãã®ã§ãããï¼
\LuaTeX-ja ã¯ãããããããè¡åå²å¯è½ã«ã¯ããªãï¼
-ãã®ããï¼ãå³ç©ºç½ããglueã§ããã°ï¼ãã®ç´åã«\verb+\penalty10000+ãæ¿å
¥ããï¼
+ãã®ããï¼ãå³ç©ºç½ããglueã§ããã°ï¼ãã®ç´åã« \verb+\penalty10000+ ãæ¿å
¥ããï¼
\end{description}
-ãªãï¼ãå³ç©ºç½ãã¯ã«ã¼ã³ï¼ã左空ç½ãã¯æªå®ç¾©ã®
+ãªãï¼ãå³ç©ºç½ãã¯ã«ã¼ã³ã®%ï¼ã左空ç½ãã¯æªå®ç¾©ã®
\[
\overbrace{\Node{glyph}{`ã'}}^{\mathit{Nq}}\longrightarrow \overbrace{\Node{glue}{1\,pt}}^{\mathit{Np}}
\]
@@ -5646,15 +6694,16 @@ If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}
\paragraph{ç®±ã»ã°ã«ã¼ã»ã«ã¼ã³ã¨åæAã®é}
\textit{Np}ã\textsf{ç®±}ã»ã°ã«ã¼ã»ã«ã¼ã³ã®ããããã§ï¼\textit{Np}ã\textsf{åæA}ã§ãã£ãå ´åã¯ï¼
-ããä¸ã®ï¼\textit{Nq}ã¨\textit{Np}ã®é åºãéã«ãªã£ã¦ããï¼å ´åã¨ã»ã¼åãã§ãããï¼ã左空ç½ãããªããªããã¨ã«ã®ã¿æ³¨æï¼
+ããä¸ã®ï¼\textit{Nq}ã¨\textit{Np}ã®é åºãéã«ãªã£ã¦ããï¼å ´åã¨åãã§ããï¼
+%ãï¼ã左空ç½ãããªããªããã¨ã«ã®ã¿æ³¨æï¼
\begin{itemize}
\item ãå³ç©ºç½ãã«ã¤ãã¦ã¯ï¼æ¢ã«è¿°ã¹ã\textsf{Boundary-A~[\OA]}ã«ãã空ç½ã決å®ãããã¨è©¦ã¿ãï¼
ããã失æããå ´åã¯ï¼ãå³ç©ºç½ãã¯æ¿å
¥ãããªãï¼
-\item \textit{Nq}ãåæã§ãªãã®ã§ï¼ã左空ç½ãã¯ç®åºãããªãï¼
+%\item \textit{Nq}ãåæã§ãªãã®ã§ï¼ã左空ç½ãã¯ç®åºãããªãï¼
\item ç¦åç¨ããã«ãã£ã®å¦çã¯ï¼\textit{Nq}ã®ç¨®é¡ã«ãã£ã¦ç°ãªãï¼
$\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
\[
- a:=(\text{\textit{Np}{\footnotemark}ã®æåã«å¯¾ãã\Param{\hyperlink{fld:prebp}{prebreakpenalty}}ã®å¤}).
+ a:=(\text{\textit{Np}ã®æåã«å¯¾ãã\Param{\hyperlink{fld:prebp}{prebreakpenalty}}ã®å¤}).
\]
\begin{description}
\item[ç®±] \textit{Nq}ã\textsf{ç®±}ã®å ´åã¯ï¼\textsf{P-allow~[PA]}ãç¨ããï¼
@@ -5664,12 +6713,13 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
\end{itemize}
\paragraph{åæAã¨åæBã®éã}
-å
ã«è¿°ã¹ãããã«ï¼\textsf{åæB}ã¯æ°´å¹³ããã¯ã¹ã®ä¸èº«ã®å
é ï¼or æ«å°¾ï¼ã¨ãã¦åºç¾ãã¦ãã
+å
ã«è¿°ã¹ãããã«ï¼\textsf{åæB}ã¯hboxã®ä¸èº«ã®å
é ï¼or æ«å°¾ï¼ã¨ãã¦åºç¾ãã¦ãã
åææåã§ããï¼ãªã¹ãå
ã«ç´æ¥ãã¼ãã¨ãã¦ç¾ãã¦ããåææåï¼\textsf{åæA}ï¼ã¨ã®éãã¯ï¼
\begin{itemize}
\item \textsf{åæB}ã«å¯¾ãã¦ã¯ï¼JFMã®æåã¯ã©ã¹æå®ããå®ã¾ã空ç½
\textsf{JFM-origin~[M]}ï¼\textsf{Boundary-A~[\OA]}ï¼\textsf{Boundary-B~[\OB]}ï¼ã®æ¿å
¥ã¯è¡ãããªãï¼
-ã左空ç½ãã®ç®åºãè¡ãããªãï¼ä¾ãã°ï¼
+%ã左空ç½ãã®ç®åºãè¡ãããªãï¼
+ä¾ãã°ï¼
\begin{itemize}
\item çæ¹ã\textsf{åæA}ï¼ããçæ¹ã\textsf{åæB}ã®ã¯ã©ã¹ã¿ã®å ´åï¼
\textsf{Boundary-A~[\OA]}ã¾ãã¯\textsf{Boundary-B~[\OB]}ã®æ¿å
¥ã試ã¿ï¼ããããã¡ãªã
@@ -5692,48 +6742,51 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
\begin{itemize}
\item 1è¡ç®ã®\verb+\inhibitglue+ã¯\textsf{Boundary-B~[\OB]}ã®å¦çã®ã¿ãææ¢ããã®ã§ï¼ããªãªãã¨ãAãã®éã«ã¯
\Param{\hyperlink{fld:xks}{xkanjiskip}}ï¼ååã¢ãï¼ãå
¥ããã¨ã«æ³¨æï¼
-\item 2è¡ç®ã®ããªãªãã¨ãAãã®éã«ããã¦ã¯ï¼åè
ã\textsf{åæB}ã¨ãªãï¼æ°´å¹³ããã¯ã¹ã®ä¸èº«ã®æ«å°¾ã¨ãã¦ç»å ´ãã¦ããããï¼ã®ã§ï¼
+\item 2è¡ç®ã®ããªãªãã¨ãAãã®éã«ããã¦ã¯ï¼åè
ã\textsf{åæB}ã¨ãªãï¼hboxã®ä¸èº«ã®æ«å°¾ã¨ãã¦ç»å ´ãã¦ããããï¼ã®ã§ï¼
ãããã\textsf{Boundary-B~[\OB]}ã®å¦çã¯è¡ãããªãï¼ãã£ã¦ï¼\Param{\hyperlink{fld:xks}{xkanjiskip}}ãå
¥ããã¨ã¨ãªãï¼
\item 3è¡ç®ã§ã¯ï¼ããªãªãã®å±ããã¯ã©ã¹ã¿ã¯\textsf{åæA}ã§ããï¼ããã«ãã£ã¦ï¼
ããªãªãã¨ãAãã®éã«ã¯\textsf{Boundary-B~[\OB]}ç±æ¥ã®åè§ã¢ããå
¥ããã¨ã«ãªãï¼
\end{itemize}
%
-%\section{Patch for the \Pkg{listings} package}
+%\section{Patch for the \Pkg{listings} Package}
%\section{\Pkg{listings} ããã±ã¼ã¸ã¸ã®å¯¾å¿}
%<*en>
It is well-known that the \Pkg{listings} package outputs weird results
for Japanese input.
The \Pkg{listings} package makes most of letters active and assigns
-output command for each letter \cite{listings}.
+output command for each letter~(\cite{listings}).
But Japanese characters are not included in these activated letters.
For \pTeX{} series, there is no method to make Japanese characters active;
-a patch \Pkg{jlisting.sty} \cite{jlisting} resolves the problem forcibly.
+a patch \Pkg{jlisting.sty}~(\cite{jlisting}) resolves the problem forcibly.
%
%<*ja>
\Pkg{listings} ããã±ã¼ã¸ãï¼ãã®ã¾ã¾ã§ã¯æ¥æ¬èªãã¾ã¨ãã«åºåã§ããªããã¨
ã¯ããç¥ããã¦ããï¼ãã¡ãã¨æ´å½¢ãã¦åºåããããã«ï¼\Pkg{listings}ããã±ã¼
ã¸ã¯å
é¨ã§ãã»ã¨ãã©ã®æåããã¢ã¯ãã£ãã«ãï¼åæåã«å¯¾ãã¦ãã®æåã®åº
-åå½ä»¤ãå²ãå½ã¦ã¦ãã \cite{listings}ï¼
+åå½ä»¤ãå²ãå½ã¦ã¦ãã(\cite{listings})ï¼
ãããï¼ããã§ã¢ã¯ãã£ãã«ããæåã®ä¸ã«ï¼åææ
åããªãããã§ããï¼\pTeX ç³»åã§ã¯ï¼åææåãã¢ã¯ãã£ãã«ããææ³ããªãï¼
-\Pkg{jlisting.sty} ã¨ããããã\cite{jlisting}ãç¨ãããã¨ã§ç¡çãã解決ãã¦ããï¼
+\Pkg{jlisting.sty} ã¨ããããã(\cite{jlisting})ãç¨ãããã¨ã§ç¡çãã解決ãã¦ããï¼
%
%<*en>
-In \LuaTeX-ja, the problem is resolved by using \verb+process_input_buffer+ callback.
-The callback function inserts the output command before each letter above \texttt{U+0080}.
+In \LuaTeX-ja, the problem is resolved by using the \verb+process_input_buffer+ callback.
+The callback function inserts the output command (active character \texttt{U+FFFFF})
+before each letter above \texttt{U+0080}.
This method can omits the process to make all Japanese characters active
(most of the activated characters are not used in many cases).
%
%<*ja>
\LuaTeX-jaã§ã¯ï¼\verb+process_input_buffer+ ã³ã¼ã«ããã¯ãå©ç¨ãããã¨ã§ï¼
-ãåè¡ã«åºç¾ãã\texttt{U+0080}以éã®æåã«å¯¾ãã¦ï¼ãããã®åºåå½ä»¤ãåç½®ãããã¨ããæ¹æ³ãã¨ã£ã¦ããï¼
+ãåè¡ã«åºç¾ãã\texttt{U+0080}以éã®æåã«å¯¾ãã¦ï¼ãããã®åºåå½ä»¤ãåç½®ããã
+ã¨ããæ¹æ³ãã¨ã£ã¦ããï¼åºåå½ä»¤ã¨ãã¦ã¯ï¼ã¢ã¯ãã£ãæååãã \texttt{U+FFFFF} ãç¨ãã¦ããï¼
ããã«ããï¼ï¼å
¥åã«ã¯ä½¿ç¨ããã¦ããªããããããªãï¼åææåãããã¹ã¦ã¢ã¯ãã£ãåããæéããªãï¼
è¦éããè¯ãå®è£
ã«ãªã£ã¦ããï¼
%
+
%<*en>
If the \Pkg{listings} package and \LuaTeX-ja were loaded,
then the patch \Pkg{lltjp-listings} is loaded automatically at \verb+\begin{document}+.
@@ -5745,8 +6798,94 @@ then the patch \Pkg{lltjp-listings} is loaded automatically at \verb+\begin{docu
æèããå¿
è¦ã¯ãªãï¼
%
-%\paragraph{Class of characters}
-%\paragraph{æå種}
+%\subsection{Notes}
+%\subsection{注æ}
+%<*en>
+\paragraph{Escaping to \LaTeX}
+We used the \verb+process_input_buffer+ callback to output \textbf{JAchar}s.
+But it has a drawback; any commands whose name contains a \textbf{JAchar}
+cannot be used in any ``escape to \LaTeX''.
+
+Consider the following input:
+%
+%<*ja>
+\paragraph{\LaTeX ã¸ã®ã¨ã¹ã±ã¼ã}
+æ¥æ¬èªå¯¾å¿ãè¡ãããã« \verb+process_input_buffer+ ã使ç¨ãããã¨ã§ï¼
+\texttt{texcl},~\texttt{escapeinside}ã¨ãã£ã\emph{ã\LaTeX ã¸ã®ã¨ã¹ã±ã¼ããä¸ã§ã¯ï¼
+\textbf{JAchar}ãå称ã®ä¸é¨ã«å«ãå¶å¾¡ç¶´ã¯ä½¿ç¨ä¸å¯è½}ã§ããï¼
+ä¾ãã°æ¬¡ã®ãããªå
¥åãèãããï¼
+%
+\begin{verbatim*}
+\begin{lstlisting}[escapechar=\#]
+#\ã»ã xã´ã#
+\end{lstlisting}
+\end{verbatim*}
+%The line~2 is transformed by the callback to
+%ããã§ï¼2è¡ç®ã¯ \verb+process_input_buffer+ ã®ä½ç¨ã«ããï¼
+\begin{lstlisting}[showspaces, escapechar=\!]
+#\!\IVSA FFFFF!ã»!\IVSA FFFFF !ã x!\IVSA FFFFF !ã´!\IVSA FFFFF !ã#
+\end{lstlisting}
+%<*en>
+before the line is actually processed.
+In the escape (between the character ``\verb+#+''),
+the category code of \texttt{U+FFFFF} is set to 9~(\emph{ignored}).
+Hence the control symbol ``\verb+\+\IVSA FFFFF'' will be executed,
+instead of ``\verb+\ã»ã+''.
+%
+%<*ja>
+ã¨å¤æããã¦ããï¼å®éã®å¦çã«åãããï¼
+ã\verb+#+ãã§æã¾ããã\LaTeX ã¸ã®ã¨ã¹ã±ã¼ããä¸ã§ã¯\
+\texttt{U+FFFFF} ã®ã«ãã´ãªã¼ã³ã¼ãã¯9~(\textit{ignored})ã¨ãªãã®ã§ï¼
+çµå±ã\verb+\ã»ã+ãã®ä»£ããã«
+ã\verb+\+\IVSA FFFFFãã¨ããcontrol symbolãå®è¡ããããã¨ã«ãªãï¼
+%
+
+%<*ja>
+\paragraph{ç°ä½åã»ã¬ã¯ã¿ã®æ±ã}
+\texttt{lstlisting} ç°å¢ãªã©ã®å
é¨ã«ããç°ä½åã»ã¬ã¯ã¿ãæ±ãããï¼
+\Pkg{lltjp-listings} ã§ã¯ \texttt{vsraw} 㨠\texttt{vscmd} ã¨ãã2ã¤ã®ãã¼ã追å ããï¼
+ãããï¼\Pkg{lltjp-listings} ãå®éã«ãã¼ããããã®ã¯ \verb+\begin{document}+\
+ã®ã¨ããã§ããã®ã§ï¼ããªã¢ã³ãã«å
ã§ã¯ãããã®è¿½å ãã¼ã¯ä½¿ç¨ã§ããªãï¼
+
+\texttt{vsraw}ã¯ï¼ãã¼ã«å¤ã®å¤ãã¨ããã¼ã§ããï¼æ¨æºã§ã¯falseã§ããï¼
+\begin{itemize}
+ \item trueã®å ´åã¯ï¼ç°ä½åã»ã¬ã¯ã¿ã¯ãç´åã®æåã«ç¶ãã¦ãåºåãããï¼
+ãããIVSãµãã¼ãï¼\ref{ssec-ltjotf}ç¯ï¼ãæå¹ã«ãªã£ã¦ããå ´åã¯ï¼
+以ä¸ã®ä¾ï¼å·¦å´ã¯å
¥åï¼å³å´ã¯ãã®åºåï¼ã®ããã«ãªãï¼
+\begin{LTXexample}
+\begin{lstlisting}[vsraw=true]
+èó åå¸ï¼èó 飾åºï¼è西
+\end{lstlisting}
+\end{LTXexample}
+\item falseã®å ´åã¯ï¼ç°ä½åã»ã¬ã¯ã¿ã¯é©å½ãªå½ä»¤ã«ãã£ã¦ãè¦ããå½¢ã§ãåºåãããï¼
+ã©ã®ãããªå½¢ã§åºåãããããè¦å®ããã®ã \texttt{vscmd} ãã¼ã§ããï¼
+\Pkg{lltjp-listings} ã®æ¨æºè¨å®ã§ã¯ä»¥ä¸ã®ä¾ã®å³å´ã®ããã«åºåãããï¼
+\begin{LTXexample}
+\begin{lstlisting}[vsraw=false,
+ vscmd=\ltjlistingsvsstdcmd]
+èó åå¸ï¼èó 飾åºï¼è西
+\end{lstlisting}
+\end{LTXexample}
+ã¡ãªã¿ã«ï¼æ¬ããã¥ã¡ã³ãã§ã¯æ¬¡ã®ããã«ãã¦ããï¼
+\begin{lstlisting}[numbers=left]
+\def\IVSA#1#2#3#4#5{%
+ \textcolor{blue}{\raisebox{3.5pt}{\tt%
+ \fboxsep=0.5pt\fbox{\tiny \oalign{0#1#2\crcr#3#4#5\crcr}}}}%
+}
+{\catcode`\%=11
+ \gdef\IVSB#1{\expandafter\IVSA\directlua{
+ local cat_str = luatexbase.catcodetables['string']
+ tex.sprint(cat_str, string.format('%X', 0xE00EF+#1))
+}}}
+\lstset{vscmd=\IVSB}
+\end{lstlisting}
+\end{itemize}
+æ¢å®ã®åºåå½ä»¤ã復活ããããå ´åã¯\ \verb+vsraw=\ltjlistingsvsstdcmd+\
+ã¨ããã°è¯ãï¼
+%
+
+%\subsection{Class of Characters}
+%\subsection{æå種}
%Roughly speaking, the \Pkg{listings} package processes input as follows:
%\Pkg{listings} ããã±ã¼ã¸ã®å
é¨ã§ã¯ï¼å¤§éæã«è¨ãã¨
@@ -5774,11 +6913,11 @@ for the name of identifiers or not.
%<*en>
For Japanese characters, line breaks are permitted on both sides
-except for parentheses, dashes, etc.
-To process Japanese characters,
-The pacth \Pkg{lltjp-listings} introduces a new flag \verb+\lst@ifkanji+, which indicates
-whether the previous character is Japanese character or not.
-For illustration, we introduce the following classes of character:
+except for brackets, dashes, etc.
+Hence the patch \Pkg{lltjp-listings} introduces
+a new flag \verb+\lst@ifkanji+, which indicates
+whether the previous character is a Japanese character or not.
+For illustration, we introduce following classes of characters:
%
%<*ja>
ãã¦ï¼æ¥æ¬èªã®å¦çã§ããï¼æ®ã©ã®åææåã®åå¾ã§ã¯è¡åå²ãå¯è½ã§ãããï¼ãã®ä¸æ¹ã§
@@ -5793,7 +6932,8 @@ For illustration, we introduce the following classes of character:
&Letter&Other&Kanji&Open&Close\\\midrule
\verb+\lst@ifletter+&T&F&T&F&T\\
\verb+\lst@ifkanji+&F&F&T&T&F\\
-%Meaning&identifier char&other alphabet&most of Japanese char&open paren&close paren\\
+%Meaning&char in an identifier&other alphabet&%
+%most of Japanese char&opening brackets&closing brackets\\
%æå³&èå¥åä¸ã®æå&ãã®ä»æ¬§ææå&æ®ã©ã®åææå&éãæ¬å¼§é¡&éãæ¬å¼§é¡\\
\bottomrule
\end{tabular}
@@ -5811,7 +6951,7 @@ Other according to circumstances.
%<*en>
For example, let us consider the case an Open comes after a Letter.
-Since an Open represents Japanese open parenthesis,
+Since an Open represents Japanese open brackets,
it is preferred to be permitted to insert line break after the Letter.
Therefore, the collected character string is output in this case.
%
@@ -5864,39 +7004,36 @@ Prev&Kanji&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
%\item ãåéãã¯ï¼å¾å´ã®æåãï¼ç¾å¨åéãããæååã«è¿½å ï¼è¡åå²ä¸å¯ï¼ãæå³ããï¼
\end{itemize}
-%\paragraph{Classification of characters}
-%\paragraph{åææåæ±ãã¨ãªãæå}
-
-%<*en>
-Characters are classified according to \Param{jacharrange} parameter (see Section \ref{ssec-setrange}):
+%<*en>
+Charatcers above \texttt{U+0080} \emph{except Variation Selectors}
+are classified into above 5~classes by the following rules:
%
%<*ja>
-\Pkg{listings} ããã±ã¼ã¸ã«ããã¦åææåã¨æ±ããã
-ï¼åã«è¿°ã¹ãKanji, Openï¼ãããã¯ãéãæ¬å¼§é¡ãåé¡ï¼ãå¦ãã¯ï¼
-é常ã®\textbf{JAchar}/\textbf{Alchar}ã®ç¯å²ã®è¨å®ï¼\Param{jacharrange} ãã©ã¡ã¼ã¿ï¼\ref{ssec-setrange}ç¯ãåç
§ï¼ã«å¾ã£ã¦è¡ãããï¼
+\texttt{U+0080}以éã®\emph{ç°ä½åã»ã¬ã¯ã¿ä»¥å¤ã®}åæåã
+Letter, Other, Kanji, Open, Closeã®ã©ãã«å±ãããã¯æ¬¡ã«ãã£ã¦æ±ºã¾ãï¼
%
\begin{itemize}
+%\item \textbf{ALchar}s above \texttt{U+0080} are classified as Letter.
+%\item ï¼\texttt{U+0080}以éã®ï¼\textbf{ALchar}ã¯ï¼ãã¹ã¦Letteræ±ãã§ããï¼
-%\item \textbf{ALchars} above U+0080 are Letter.
-%\item ï¼U+0080以éã®ï¼\textbf{ALchar}ã¯ï¼ãã¹ã¦Letteræ±ãã§ããï¼
-
-%\item \textbf{JAchars} are classified in the order as follows:
-%\item ï¼U+0080以éã®ï¼\textbf{JAchar}ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®é åºã«å¾ã£ã¦æå種ã決ããï¼
+%\item \textbf{JAchar}s are classified in the order as follows:
+%\item \textbf{JAchar}ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®é åºã«å¾ã£ã¦æå種ã決ããï¼
\begin{enumerate}
-%\item Characters whose \Param{\hyperlink{fld:prebp}{prebreakpenalty}} is greater than or equal to 0 are Open.
+%\item Characters whose \Param{\hyperlink{fld:prebp}{prebreakpenalty}} is greater than or equal to 0 are classified as Open.
%\item \Param{\hyperlink{fld:prebp}{prebreakpenalty}}ã0以ä¸ã®æåã¯Openæ±ãã§ããï¼
-%\item Characters whose \Param{\hyperlink{fld:postbp}{postbreakpenalty}} is greater than or equal to 0 are Close.
+%\item Characters whose \Param{\hyperlink{fld:postbp}{postbreakpenalty}} is greater than or equal to 0 are classified as Close.
%\item \Param{\hyperlink{fld:postbp}{postbreakpenalty}}ã0以ä¸ã®æåã¯Closeæ±ãã§ããï¼
-%\item Characters that don't satisfy the above two conditions are Kanji.
-%\item ä¸ã®2æ¡ä»¶ã®ã©ã¡ãã«ãå½ã¦ã¯ã¾ããªãã£ãæåã¯ï¼Kanjiæ±ãã§ããï¼
+%\item Characters that don't satisfy the above two conditions are classified as Kanji.
+%\item ä¸ã®3æ¡ä»¶ã®ã©ã¡ãã«ãå½ã¦ã¯ã¾ããªãã£ãæåã¯ï¼Kanjiæ±ãã§ããï¼
\end{enumerate}
\end{itemize}
%<*en>
-The width of halfwidth kana (U+FF61--U+FF9F) is same as the width of \textbf{ALchar};
-the width of the other \textbf{JAchars} is double the width of \textbf{ALchar}.
+The width of halfwidth kana (\texttt{U+FF61}--\texttt{U+FF9F})
+is same as the width of \textbf{ALchar};
+the width of the other \textbf{JAchar}s is double the width of \textbf{ALchar}.
%
%<*ja>
ãªãï¼åè§ã«ã(U+FF61--U+FF9F)以å¤ã®\textbf{JAchar}ã¯æ¬§ææå2æååã®å¹
ãã¨ããã®ã¨ã¿ãªãããï¼
@@ -5904,8 +7041,8 @@ the width of the other \textbf{JAchars} is double the width of \textbf{ALchar}.
%
%<*en>
-The classification process is executed every time a character appears in
-listing environments.
+This classification process is executed every time a character appears in
+the \texttt{lstlisting} environment or other environments/commands.
%
%<*ja>
ãããã®æå種決å®ã¯ï¼å®éã« \texttt{lstlisting} ç°å¢ãªã©ã®å
é¨ã§æåãåºã¦ãããã³ã«è¡ãããï¼
@@ -5946,17 +7083,19 @@ listing environments.
ã¾ãï¼æ®µè½ä¸ã®è¡ä¸ã®ã°ã«ã¼ã
\begin{itemize}
\item \textbf{JAglue}ã§ã¯ãªãã°ã«ã¼
-\item JFMã°ã«ã¼ï¼\ref{ssec-jfm-str}ç¯ã«ããããã«ï¼åJFMã°ã«ã¼ã«ã¯$-2$ãã2ã¾ã§ã®
-åªå
度ãã¤ãã¦ããï¼åªå
度å¥ã«ã¾ã¨ããããï¼
+\item JFMã°ã«ã¼ï¼åªå
度\footnote{%
+ \ref{ssec-jfm-str}ç¯ã«ããããã«ï¼
+ åJFMã°ã«ã¼ã«ã¯$-2$ãã2ã¾ã§ã®åªå
度ãã¤ãã¦ããï¼}%
+å¥ã«ã¾ã¨ããããï¼
\item å欧æé空ç½(\Param{\hyperlink{fld:xks}{xkanjiskip}})
\item åæé空ç½(\Param{\hyperlink{fld:kanjiskip}{kanjiskip}})
\end{itemize}
ã®$1+1+5+1=8$ã¤ã«é¡å¥ãï¼ããããã®ç¨®å¥ãã¨ã«
許容ããã¦ãã伸ã³éï¼\texttt{stretch}ã®å¤ï¼ã®åè¨ãè¨ç®ããï¼
-ã¾ãï¼è¡é·ã¨èªç¶é·ã¨ã®å·®ãè¨ç®ãï¼ãã®ã\textit{total}ã¨ããï¼
+ã¾ãï¼è¡é·ã¨èªç¶é·ã¨ã®å·®ã\textit{total}ã¨ããï¼
-\subsection{第1段éï¼è¡æ«æåã®ä½ç½®èª¿æ´}
+\subsection{è¡æ«æåã®ä½ç½®èª¿æ´}
è¡æ«ãæåã¯ã©ã¹$n$ã®\textbf{JAchar}ã§ãã£ãå ´åï¼
ãããåãããã¨ã«ãã£ã¦ï¼\textit{total}ã®ãã¡
\textbf{JAglue}ãè² æ
ããåãå°ãªããããã¨ããï¼
@@ -6002,7 +7141,7 @@ JFMä¸ã«ããæåã¯ã©ã¹$n$ã®å®ç¾©ã®
\end{enumerate}
\begin{enumerate}
\item è¡æ«ã®åææåã移åãããã¨ã§$\textit{total}=0$ã¨ãªãã°ï¼
-調æ´ã®å¿
è¦ã¯ãªãï¼è¡ãæ ¼ç´ããã¦ããæ°´å¹³ããã¯ã¹ã®
+調æ´ã®å¿
è¦ã¯ãªãï¼è¡ãæ ¼ç´ããã¦ããhboxã®
\texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}ãåè¨ç®ããã°ããï¼
以éï¼$\textit{total}\neq 0$ã¨ä»®å®ããï¼
\item \textit{total}ãã\textbf{JAglue}以å¤ã®ã°ã«ã¼ã®ä¼¸ã³éã®åè¨ãï¼ä»¥ä¸ï¼(A)ã®ä¼¸ã³éã®
@@ -6011,7 +7150,7 @@ JFMä¸ã«ããæåã¯ã©ã¹$n$ã®å®ç¾©ã®
ãã£ã¦ï¼ä»¥ä¸ã®å¦çãè¡ãï¼
\begin{enumerate}
\item å\textbf{JAglue}ã®ä¼¸ã³éã0ã¨ããï¼
-\item è¡ãæ ¼ç´ããã¦ããæ°´å¹³ããã¯ã¹ã®
+\item è¡ãæ ¼ç´ããã¦ããhboxã®
\texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}ãåè¨ç®ããï¼
ããã«ãã£ã¦ï¼\textit{total}ã¯\textbf{JAglue}以å¤ã®ã°ã«ã¼ã«ãã£ã¦è² æ
ãããï¼
\end{enumerate}
@@ -6032,21 +7171,266 @@ JFMä¸ã«ããæåã¯ã©ã¹$n$ã®å®ç¾©ã®
\begin{enumerate}
\item (C)ã«å±ããã°ã«ã¼ã®ä¼¸ã³éã$p$åããï¼
\item (D)--(H)ã«å±ããã°ã«ã¼ã®ä¼¸ã³éã0ã¨ããï¼
-\item è¡ãæ ¼ç´ããã¦ããæ°´å¹³ããã¯ã¹ã®
+\item è¡ãæ ¼ç´ããã¦ããhboxã®
\texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}ãåè¨ç®ããï¼
ããã«ãã£ã¦ï¼\textit{total}ã¯\textbf{JAglue}以å¤ã®ã°ã«ã¼ã«ãã£ã¦è² æ
ãããï¼
\end{enumerate}
\item \textit{total}ã(A)--(H)ã®ä¼¸ã³éã®åè¨ããã大ããå ´åï¼ã©ããããããªãã®ã§
- \verb+^^;+ä½ãããï¼ä½ãããªãï¼
+ \verb+^^;+ä½ãããªãï¼
\end{enumerate}
%
%<*ja>
-\section{IVS対å¿ï¼æªå®ï¼}
+\section{IVS対å¿}
+\verb+luatexja.otf.enable_ivs()+ ãå®è¡ãï¼IVS対å¿ãæå¹ã«ããç¶æ
ã§ã¯ï¼
+\verb+pre_linebreak_filter+ ã \verb+hpack_filter+ ã³ã¼ã«ããã¯ã«ã¯
+次ã®4ã¤ãé ã«å®è¡ãããç¶æ
ã¨ãªã£ã¦ããï¼
+\begin{description}
+\item[\tt ltj.do\_ivs] \textit{glyph\_node}~$p$ã®ç´å¾ã«ï¼ç°ä½åã»ã¬ã¯ã¿ï¼ã表ã\textit{glyph\_node}ï¼
+ãé£ç¶ããå ´åã«ï¼$p$ã®ãã©ã³ãã«å¯¾å¿ãããæã¤ãç°ä½åæ
å ±ãã«å¾ã£ã¦åºåããã°ãªããå¤ããï¼
+
+ãããï¼åã«$p.\textit{char}$ãå¤æ´ããã ãã§ã¯ï¼å¾ãã
+font featureã®é©ç¨ï¼ããä¸ï¼ã«ããç½®æãããå¯è½æ§ãããï¼ãã®ããï¼
+\verb+\CID+ ã \verb+\UTF+ ã¨åãããã«ï¼\textit{glyph\_node}~$p$ã®ä»£ããã«
+\texttt{user\_id} ã\textit{char\_by\_cid}ã§ãããããªuser-defined whatsitãç¨ãã¦ããï¼
+\item[ï¼\Pkg{luaotfload} ã«ããfont featureã®é©ç¨ï¼]
+\item[\tt ltj.otf] \texttt{user\_id} ã\textit{char\_by\_cid}ã§ãããããªuser-defined whatsitã
+ãã¡ãã¨\textit{glyph\_node}ã«å¤æããï¼ãã®å¦çã¯ï¼\verb+\CID+, \verb+\UTF+ãIVSã«ããç½®æãï¼
+font featureã®é©ç¨ã§ä¸æ¸ãããã¦ãã¾ãã®ãé²æ¢ããããã§ããï¼
+\item[\tt ltj.main\_process] \textbf{JAglue}ã®æ¿å
¥å¦çï¼\ref{sec-jfmglue}ç« ï¼ã¨ï¼
+JFMã®æå®ã«å¾ã£ã¦å\textbf{JAchar}ã®ã寸æ³ãè£æ£ããããã¨ãè¡ãï¼
+\end{description}
+
+åé¡ã¯åãã©ã³ãã®æã£ã¦ããIVSæ
å ±ãã©ã®ããã«åå¾ãããï¼ã§ããï¼
+\Pkg{luaotfload} ã¯ãã©ã³ãçªå·ã®æ
å ±ã\
+\texttt{fonts.hashes.identifiers[]} 以ä¸ã«æ ¼ç´ãã¦ããï¼
+ãããï¼OpenTypeãã©ã³ãã®IVSæ
å ±ã¯æ ¼ç´ããã¦ããªãããã§ãã%
+\footnote{TrueTypeãã©ã³ãã«é¢ãã¦ã¯ï¼
+\begin{center}
+\texttt{fonts.hashes.idenfiers[]%
+ .resources.variants[][]}
+\end{center}
+ã«ï¼çªã®æåã®å¾ã«ç°ä½åã»ã¬ã¯ã¿ãç¶ããå ´åã«
+åºåãã¹ãã°ãªããæ¸ããã¦ããï¼}ï¼
+%ä¾ãã°ï¼å°å¡ææPr6N~Rã§ã¯ï¼
+
+ä¸æ¹ï¼\LuaTeX å
é¨ã® \texttt{fontloader} ã®è¿ããã¼ãã«ã«ã¯
+OpenTypeãã©ã³ãã§ãTrueTypeãã©ã³ãã§ãIVSæ
å ±ãæ ¼ç´ããã¦ããï¼
+å
·ä½çã«ã¯â¦â¦
+
+ãã®ããï¼\LuaTeX-jaã®IVS対å¿ã«ããã¦ã¯ï¼\LuaTeX å
é¨ã®\
+\texttt{fontloader} ãç´æ¥ç¨ãããã¨ã§ï¼ãã©ã³ãã®IVSæ
å ±ãåå¾ãã¦ããï¼
+20140114.0以éã§ãã£ãã·ã¥ãç¨ããããã«ããè¦å ã¯ããã«ããï¼
+\texttt{fontloader} ã®å¼ã³åºãã§ããªãæéãæ¶è²»ãããã¨ããï¼
+%%% to_table ã使ããªããããã¨ã§ï¼ã¡ã¢ãªä½¿ç¨éã¯æ¸ã£ã
+IVSæ
å ±ããã£ãã·ã¥ã«ä¿åãããã¨ã§2åç®ä»¥éã®å®è¡æéãç¯ç´ãã¦ããï¼
+
+
\section{è¤æ°ãã©ã³ãã®ãåæãï¼æªå®ï¼}
+
+\section{\LuaTeX-jaã«ããããã£ãã·ã¥}
+\Pkg{luaotfload}ããã±ã¼ã¸ãï¼åTrueTypeã»]OpenTypeãã©ã³ãã®æ
å ±ã
+ãã£ãã·ã¥ã¨ãã¦ä¿åãã¦ããã®ã¨åæ§ã®æ¹æ³ã§ï¼
+\LuaTeX-jaãããã¤ãã®ãã£ãã·ã¥ãã¡ã¤ã«ãä½æããããã«ãªã£ãï¼
+\begin{itemize}
+ \item é常ï¼ãã£ãã·ã¥ã¯\texttt{\$TEXMFVAR/luatexja/}以ä¸ã«ä¿åããï¼
+ããããèªã¿è¾¼ã¿ãè¡ãããï¼
+ \item ãé常ã®ãããã¹ãå½¢å¼ã®ãã£ãã·ã¥ï¼æ¡å¼µå㯠\texttt{.lua}ï¼ä»¥å¤ã«ãï¼
+ããããã¤ããªå½¢å¼ï¼ãã¤ãã³ã¼ãï¼ã«å¤æãããã®ããµãã¼ããã¦ããï¼
+\begin{itemize}
+ \item \LuaTeX ã¨LuaJIT\TeX ã§ã¯ãã¤ãã³ã¼ãã®å½¢å¼ãç°ãªãããï¼ãã¤ããªå½¢å¼ã®
+ãã£ãã·ã¥ã¯å
±æã§ããªãï¼\LuaTeX ç¨ã®ãã¤ããªãã£ãã·ã¥ã¯ \texttt{.luc}ï¼
+LuaJIT\TeX ç¨ã®ã¯ \texttt{.lub} ã¨æ¡å¼µåãå¤ãããã¨ã§å¯¾å¿ãã¦ããï¼
+ \item ãã£ãã·ã¥ãèªã¿è¾¼ãæï¼ååã®ãã¤ããªãã£ãã·ã¥ãããã°ï¼
+ããã¹ãå½¢å¼ã®ãã®ãããã¡ããåªå
ãã¦èªã¿è¾¼ãï¼
+ \item ããã¹ãå½¢å¼ã®ãã£ãã·ã¥ãæ´æ°/ä½æãããéã¯ï¼ãã®ãã¤ããªçã
+åæã«æ´æ°ãããï¼
+ã¾ãï¼ï¼ãã¤ããªçãè¦ã¤ãããï¼ããã¹ãå½¢å¼ã®ãã£ãã·ã¥å´ãèªã¿è¾¼ã¾ããã¨ãã¯ï¼
+\LuaTeX-jaã¯ãã¤ããªãã£ãã·ã¥ãä½æããï¼
+\end{itemize}
+\end{itemize}
+%
+%<*en>
+\section{Cache Management of \LuaTeX-ja}
+\LuaTeX-ja creates some cache files to reduce the loading time.
+in a similar way to the \Pkg{luaotfload} package:
+\begin{itemize}
+ \item Cache files are usually stored in (and loaded from)
+\texttt{\$TEXMFVAR/luatexja/}.
+ \item In addition to caches of the text form (the extension is ``\texttt{.lua}''),
+caches of the \emph{binary}, precompiled form are supported.
+\begin{itemize}
+ \item We cannot share same binary cache for \LuaTeX\ and LuaJIT\TeX.
+Hence we distinguish them by their extension, ``\texttt{.luc}'' for \LuaTeX\
+and ``\texttt{.lub}'' for LuaJIT\TeX.
+ \item In loading a cache, the binary cache precedes
+the text form.
+ \item When \LuaTeX-ja updates a cache \texttt{hoge.lua},
+its binary version is also updated.
+\end{itemize}
+\end{itemize}
+%
+
+%<*ja>
+\subsection{ãã£ãã·ã¥ã®ä½¿ç¨ç®æ}
+
+\LuaTeX-ja ã§ã¯ä»¥ä¸ã®3種é¡ã®ãã£ãã·ã¥ã使ç¨ãã¦ããï¼
+\begin{list}{}%
+{\def\makelabel#1{\ttfamily#1}}
+\item[ltj-cid-auto-adobe-japan1.lua]
+Ryumin-Lightã®ãããªéåãè¾¼ã¿ãã©ã³ãã®æ
å ±ãæ ¼ç´ãã¦ããï¼
+ï¼ãããã\LuaTeX-jaã®æ¨æºåæãã©ã³ããªã®ã§ï¼\LuaTeX-jaã®èªã¿è¾¼ã¿æã«èªåã§èªã¾ããï¼
+çæã«ã¯\texttt{UniJIS2004-UTF32-H}, \texttt{Adobe-Japan1-UCS2}ã¨ãã2ã¤ã®
+CMapãå¿
è¦ã§ããï¼
+
+\pageref{para-cid}ãã¼ã¸ã§è¿°ã¹ãããã«ï¼\texttt{cid}ãã¼ã使ã£ã¦
+éåãè¾¼ã¿ã®ä¸å½èªã»éå½èªãã©ã³ããå®ç¾©ããå ´åï¼åæ§ã®ãã£ãã·ã¥ãçæãããï¼
+ãã£ãã·ã¥ã®å称ï¼å¿
è¦ã¨ãªãCMapã«ã¤ãã¦ã¯è¡¨\ref{tab:cid-cache}ãåç
§ãã¦æ¬²ããï¼
+
+\item[ivs\_***.lua]
+ãã©ã³ã``\texttt{***}''ã«ãããç°ä½åæ
å ±ãæ ¼ç´ãã¦ããï¼æ§é ã¯ä»¥ä¸ã®éãï¼
+%
+%<*en>
+\subsection{Use of Cache}
+
+\LuaTeX-ja uses the following cache:
+\begin{list}{}%
+{\def\makelabel#1{\ttfamily#1}}
+\item[ltj-cid-auto-adobe-japan1.lua]
+The font table of a CID-keyed non-embedded Japanese font.
+This is loaded in every run.
+It is created from two CMaps, \texttt{UniJIS2004-UTF32-H} and
+ \texttt{Adobe-Japan1-UCS2},
+and this is why these two CMaps are needed in the first run of \LuaTeX-ja.
+
+Similar caches are created as Table~\ref{tab:cid-cache},
+if you specified \texttt{cid} key in \verb+\jfont+
+to use other CID-keyed non-embedded fonts for Chinese or Korean,
+as in Page~\pageref{para-cid}.
+
+\item[ivs\_***.lua]
+This file stores the table of Unicode variants in a font ``\texttt{***}''.
+The structure of the table is the following:
+%
+
+\begin{table}[!tb]
+ \centering\small
+\caption{\texttt{cid} key and corresponding files}
+\label{tab:cid-cache}
+\vspace*{\medskipamount}
+\begin{tabular}{>{\tt}l>{\tt}l>{\tt}l>{\tt}l}
+\toprule
+\bf \texttt{cid} key&\bf name of the cache &
+\multicolumn{2}{c}{\bf used CMaps}\\
+\midrule
+Adobe-Japan1-*<j-cid-auto-adobe-japan1.lua&UniJIS2004-UTF32-H&Adobe-Japan1-UCS2\\
+Adobe-Korea1-*<j-cid-auto-adobe-korea1.lua&UniKS-UTF32-H&Adobe-Korea1-UCS2\\
+Adobe-GB1-*<j-cid-auto-adobe-gb1.lua&UniGB-UTF32-H&Adobe-GB1-UCS2\\
+Adobe-CNS1-*<j-cid-auto-adobe-cns1.lua&UniCNS-UTF32-H&Adobe-CNS1-UCS2\\
+\bottomrule
+\end{tabular}
+\end{table}
+
+\begin{lstlisting}
+return {
+ {
+ [10955]={ -- U+2ACB "Subset Of Above Not Equal To"
+ [65024]=983879, -- <2ACB FE00>
+ },
+ [37001]={ -- U+9089 "é"
+ [0]=37001, -- <9089 E0100>
+ 991049, -- <9089 E0101>
+ ...
+ },
+ ...
+ },
+ ["chksum"]="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", -- checksum of the fontfile
+ ["version"]=4, -- version of the cache
+}
+\end{lstlisting}
+%<*ja>
+\item[ltj-jisx0208.\{luc|lub\}]
+\LuaTeX-jaé
å¸ä¸ã®\texttt{ltj-jisx0208.lua}ããã¤ããªåãããã®ã§ããï¼
+ããã¯JIS~X~0208ã¨Unicodeã¨ã®å¤æãã¼ãã«ã§ããï¼
+\pTeX ã¨ã®äºæç®çã®æåã³ã¼ãå¤æå½ä»¤ã§ç¨ããããï¼
%
+%<*en>
+\item[ltj-jisx0208.\{luc|lub\}]
+The binary version of \texttt{ltj-jisx0208.lua}.
+This is the conversion table between JIS~X~0208 and Unicode
+which is used in Kanji-code conversion commands for compatibility with \pTeX.
+%
+\end{list}
+%<*en>
+\subsection{Internal}
+Cache management system of \LuaTeX-ja is stored in \texttt{luatexja.base}
+(\texttt{ltj-base.lua}).
+There are three public functions for cache management in \texttt{luatexja.base},
+where stands for the filename \emph{without suffix}:
+\begin{list}{}%
+{\def\makelabel#1{\ttfamily#1}}
+\item[save\_cache(, )]
+Save a non-nil table into a cache .
+Both the text form \texttt{.lua} and its binary version
+are created or updated.
+
+\item[save\_cache\_luc(, {[, ]})]\
+
+Same as \texttt{save\_cache}, except that only the binary cache is updated.
+The third argument is not usually given.
+But if this is given, it is treated as a string representation of .
+
+\item[load\_cache(, )]
+Load the cache .
+ is a function which takes one argument (the contents of the cache),
+and its return value is whether the cache is outdated.
+
+\texttt{load\_cache} first tries to
+read the binary cache \texttt{.\{luc|lub\}}.
+If its contents is up-to-date, \texttt{load\_cache} returns the contents.
+If the binary cache is not found or
+its contents is outdated, \texttt{load\_cache} tries to
+read the text form \texttt{.lua}.
+Hence, the return value of \texttt{load\_cache} is non-nil,
+if and only if the updated cache is found.
+\end{list}
+%
+%<*ja>
+\subsection{å
é¨å½ä»¤}
+\LuaTeX-jaã«ããããã£ãã·ã¥ç®¡çã¯ï¼\texttt{luatexja.base}~(\texttt{ltj-base.lua})ã«
+å®è£
ãã¦ããï¼ä»¥ä¸ã®3é¢æ°ãå
¬éããã¦ããï¼
+ããã§ï¼ã¯ä¿åãããã£ãã·ã¥ã®ãã¡ã¤ã«åã\emph{æ¡å¼µåãªãã§}æå®ããï¼
+\begin{list}{}%
+{\def\makelabel#1{\ttfamily#1}}
+\item[save\_cache(, )]
+nilã§ãªãããã£ãã·ã¥ã«ä¿åããï¼
+ããã¹ãå½¢å¼ã®\texttt{.lua}ã®ã¿ãªããï¼
+ãã®ãã¤ããªçãä½æ/æ´æ°ãããï¼
+
+\item[save\_cache\_luc(, {[, ]})]\
+
+\texttt{save\_cache}ã¨åæ§ã ãï¼ãã¤ããªãã£ãã·ã¥ã®ã¿ãæ´æ°ãããï¼
+第3å¼æ°ãä¸ããããå ´åï¼ããã
+ã®æååå表ç¾ã¨ãã¦ä½¿ç¨ããï¼
+ãã®ããï¼ã¯æ®éã¯æå®ããªããã¨ã«ãªãã ããï¼
+
+\item[load\_cache(, )]
+ãã£ãã·ã¥ãèªã¿è¾¼ãï¼
+ã¯1å¼æ°ï¼ãã£ãã·ã¥ã®ä¸èº«ï¼ãã¨ãé¢æ°ã§ããï¼
+ãã®æ»ãå¤ã¯ããã£ãã·ã¥ã®æ´æ°ãå¿
è¦ããã©ããã示ããã¼ã«å¤ã§ãªãã¨ãããªãï¼
+
+\texttt{load\_cache}ã¯ï¼ã¾ããã¤ããªãã£ãã·ã¥\texttt{.\{luc|lub\}}ã
+èªã¿ããï¼ãããã®å
容ããæ°ãããï¼ã¤ã¾ãã®è©ä¾¡çµæã \texttt{false} ãªã
+\texttt{load\_cache}ã¯ãã®ãã¤ããªãã£ãã·ã¥ã®ä¸èº«ãè¿ãï¼
+ãããã¤ããªãã£ãã·ã¥ãè¦ã¤ãããªãã£ããï¼ãå¤ãããããªãã°ããã¹ãç
+ \texttt{.lua}ãèªã¿è¾¼ã¿ï¼ãã®å¤ãè¿ãï¼
+
+以ä¸ããï¼\texttt{load\_cache}èªä½ãnilã§ãªãå¤ãè¿ãã®ã¯ï¼ã¡ããã©ãæ°ããããã£ãã·ã¥ã
+è¦ã¤ãã£ãå ´åã§ããï¼
+\end{list}
+%
\begin{thebibliography}{99}
\addcontentsline{toc}{section}{\refname}