OSDN Git Service

updated manual.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 3 Feb 2014 01:00:02 +0000 (10:00 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 3 Feb 2014 01:00:02 +0000 (10:00 +0900)
doc/luatexja.dtx
src/luatexja.lua

index 98ba0c8..212e7f2 100644 (file)
@@ -1956,8 +1956,11 @@ adopted in the whole paragraph or the whole hbox.
 \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}}''.
@@ -1965,6 +1968,9 @@ To use these data from JFM, set the value of \Param{\hyperlink{fld:kanjiskip}{ka
 \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}}や%
@@ -2642,7 +2648,6 @@ letter-spacing and the width of italic correction are not correct:
 \S あいう\/ABC
 \end{LTXexample}
 
-
 %<en>\subsection{Prefix \texttt{psft}}
 %<ja>\subsection{\texttt{psft}プリフィックス}
 \label{ssec-psft}
@@ -4479,10 +4484,21 @@ Avant Garde (OT1/pag/m/n) に変わっていることがわかる.
 \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
@@ -4542,11 +4558,14 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
 \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}
@@ -4570,6 +4589,13 @@ but please remind remarks below.
 %</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>
@@ -4598,7 +4624,6 @@ ordinary characters in the following points:
 %</ja>
 \end{itemize}
 
-
 %<en>\paragraph{Additional syntax of JFM}
 %<ja>\paragraph{JFMへの記法の追加}
 
index 153bd7a..7c235fc 100644 (file)
@@ -57,44 +57,45 @@ userid_table.IHB  = luatexbase.newuserwhatsitid('inhibitglue',  'luatexja') -- \
 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
 
 --- 定義終わり
@@ -119,10 +120,6 @@ local attr_icflag = luatexbase.attributes['ltj@icflag']
 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