\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}}''.
\Param{\hyperlink{fld:xks}{xkanjiskip}} to \verb+\maxdimen+.
%</en>
%<*ja>
+ここで,\verb+\zw+ は現在の和文フォントの全角幅を表す長さであり,
+\pTeX における長さ単位 \texttt{zw} と同じように使用できる.
+
JFMは「望ましい\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}の値」や
「望ましい\Param{\hyperlink{fld:xks}{xkanjiskip}}の値」を持っていることがある.
これらのデータを使うためには,\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}や%
\S あいう\/ABC
\end{LTXexample}
-
%<en>\subsection{Prefix \texttt{psft}}
%<ja>\subsection{\texttt{psft}プリフィックス}
\label{ssec-psft}
\userelfont\selectfont あいうabc
\end{LTXexample}
-%<en>\section{Extensions}
-%<ja>\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+.
+%</en>
+%<*ja>
+\section{拡張}
+\LuaTeX-jaには(動作には必須ではないが)自由に読み込める拡張が付属している.
+これらは\LaTeX のパッケージとして制作しているが,
+\Pkg{luatexja-otf}と\Pkg{luatexja-adjust}についてはplain \LuaTeX でも\
+\verb+\input+ で読み込み可能である.
+%</ja>
\subsection{\texttt{luatexja-fontspec.sty}}
-
%<*en>
As described in Subsection~\ref{ssec-fontspec}, this optional package
provides the counterparts for several commands defined in the
\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:
%</en>
%<*ja>
-この追加パッケージはAdobe-Japan1の文字の出力をサポートする.
+この追加パッケージはAdobe-Japan1(フォント自身が持っていれば,
+別のCID文字セットでも可)の文字の出力をサポートする.
\Pkg{luatexja-otf}は以下の2つの低レベルコマンドを提供する:
%</ja>
\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
%</ja>
\end{list}
+%<*ja>
+このパッケージは,\texttt{ajmacros.sty}(\Pkg{otf}パッケージ付属のマクロ集,井上浩一氏作)から
+漢字コードをUTF8にしたり,plain \LuaTeX でも利用可能するという
+修正を加えた \texttt{luatexja-ajmacros.sty} も自動的に読み込む.
+そのため,マクロ集にある \verb+\aj半角+ などのマクロもそのまま使用可能である.
+%</ja>
+
%<en>\paragraph{Remarks}
%<ja>\paragraph{注意}
%<*en>
%</ja>
\end{itemize}
-
%<en>\paragraph{Additional syntax of JFM}
%<ja>\paragraph{JFMへの記法の追加}
userid_table.STCK = luatexbase.newuserwhatsitid('stack_marker', 'luatexja') -- スタック管理
userid_table.BPAR = luatexbase.newuserwhatsitid('begin_par', 'luatexja') -- 「段落始め」
+------------------------------------------------------------------------
+-- FIX node.remove
+------------------------------------------------------------------------
do
local node_remove, node_next, node_prev = node.remove, node.next, node.prev
function luatexja.node_remove (head, current)
if head==current then
- local q, r = node_next(current), node_prev(current)
- current.next = nil
- if q then q.prev = r end
- if r and node_next(r)==current then -- r is "real prev"
- r.next = q
- end
- return q, q
+ local q, r = node_next(current), node_prev(current)
+ current.next = nil
+ if q then q.prev = r end
+ if r and node_next(r)==current then
+ r.next = q
+ end
+ return q, q
else
- return node_remove(head, current)
+ return node_remove(head, current)
end
end
-
local Dnode = node.direct or node
if Dnode~=node then
local Dnode_remove = Dnode.remove
local Dnode_next, Dnode_prev = Dnode.getnext, node.getprev
local getfield, setfield = Dnode.getfield, Dnode.setfield
function luatexja.Dnode_remove (head, current)
- if head==current then
- local q, r = Dnode_next(current), Dnode_prev(current)
- setfield(current, 'next', nil)
- if q then setfield(q, 'prev', r) end
- if r and Dnode_next(r) == current then -- r is "real prev"
- setfield(r, 'next', q)
- end
- return q, q
- else
- return Dnode_remove(head, current)
- end
+ if head==current then
+ local q, r = Dnode_next(current), Dnode_prev(current)
+ setfield(current, 'next', nil)
+ if q then setfield(q, 'prev', r) end
+ if r and Dnode_next(r) == current then
+ setfield(r, 'next', q)
+ end
+ return q, q
+ else
+ return Dnode_remove(head, current)
+ end
end
else
luatexja.Dnode_remove = luatexja.node_remove
end
-
end
--- 定義終わり
local attr_uniqid = luatexbase.attributes['ltj@uniqid']
local cat_lp = luatexbase.catcodetables['latex-package']
-
----- table: charprop_stack_table [stack_level].{pre|post|xsp}[chr_code]
-
-
-- Three aux. functions, bollowed from tex.web
local unity=65536