2 \documentclass[a4paper]{bxjsarticle}
3 \setpagelayout*{left=20truemm, right=20truemm,top=15truemm,bottom=20truemm}
5 \usepackage{luatextra,booktabs,amsmath,lmodern}
6 \usepackage[unicode=true]{hyperref}
9 \def\title{\LuaTeX-jaの開発}
11 \def\mail{h\_kitagawa2001@yahoo.co.jp}
12 \hypersetup{pdftitle=\title, pdfauthor=\author}
16 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[0.92489] psft:Ryumin-Light:jfm=ujis}{}
17 \DeclareFontShape{JY3}{gt}{m}{n}{<-> s*[0.92489] psft:GothicBBB-Medium:jfm=ujis}{}
19 \renewcommand{\section}{%
20 \@startsection{section}{1}{\z@}%
23 {\normalfont\large\headfont\raggedright}}
24 \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
25 {0.5\Cvs}{-1\zw}% 改行せず 1zw のアキ
26 {\normalfont\normalsize\headfont ■}}
27 \let\subsection=\paragraph
29 \def\@listI{\leftmargin\leftmargini
30 \parsep \z@\topsep\z@\itemsep\z@}
32 \def\headfont{\normalfont\bfseries\mathversion{bold}}
33 \def\emph#1{\textbf{\mathversion{bold}#1}}
34 \def\centerbaseline#1#2{%
35 \setbox0=\hbox{#1\ltjsetparameter{yjabaselineshift=\z@}あ}%
36 \@tempdima=\dimexpr\cht-\cdp-\ht0+\dp0\relax{#1%
37 \ltjsetparameter{yjabaselineshift=-0.5\@tempdima, yalbaselineshift=-0.5\@tempdima}#2%
39 \def\.#1{{\normalfont\it$\langle$#1$\rangle$}}
40 \def\:#1{{\normalfont\tt\char92 #1}}
52 Lua\TeX-ja は,p\TeX と同等あるいはそれ以上の水準の日本語組版を,
53 次世代標準\TeX エンジンであるLua\TeX で可能にすることを目的としたマクロパッケージである.
55 \item \emph{最低でもp\TeX と同等の組版の自由度を確保する.}
56 \item \emph{p\TeX との100\%互換は目的としない.}
57 p\TeX において不自然/不都合な実装があれば,積極的に改める.
61 \section{p\TeX からの主な違い}
63 落ち着いてきたら縦書きも開発したいが,現状は左横書きのみサポート.
66 大半のパラメタへの代入は\:{ltjsetparameter}へ
67 {\tt \.{key}=\.{value}}の形で渡す.
69 例:行頭禁則用ペナルティ({\sf prebreakpenalty})
70 \begin{center}\medskip\small%
73 &p\TeX&Lua\TeX-ja\\\midrule
74 代入&\:{prebreakpenalty}\.{chr}{\tt =}\.{pena}&
75 \verb+\ltjsetparameter{prebreakpenalty={+\.{chr}{\tt,}\.{pena}\verb+}}+\\
76 取得&\:{prebreakpenalty}\.{chr}(count)&
77 \verb+\ltjgetparameter{prebreakpenalty}{+\.{chr}\verb+}+(string)\\
83 \subsection{行末が和文文字の場合の改行の扱い}
84 Lua\TeX の仕様上,「前行行末時のcatcode」で判定するad hocな仕様.
85 %1行を外部から読み込むとき,前行行末のcatcodeの状態で,行の末尾が次の形のときに改行を無視する:
87 % \hbox{(catcodeが11 or 12の和文文字)}\hbox{(catcodeが1 or 2の文字)}^*
90 \subsection{和文間・和欧文間の空白挿入処理}
92 \item 空白挿入処理をノードベースに変更(Lua\TeX の合字・カーニング処理に合わせた).
93 \item 「和文フォント」はメトリックと実際の字形との組:
95 $\tt\mathcode`\:="703A\mathcode`\*="7020
96 \mathcode`\=="703D\mathcode`\-="702D\mathcode`\|="705C%"
97 \mathcode`\<="707B\mathcode`\>="707D
98 |jfont|tenmin=\underbrace{\tt psft:Ryumin-Light}_{\text{PostScriptフォント(非埋込)}}:%
99 \underbrace{\tt jfm=ujis}_{\text{メトリック}}*at*13.5|jQ
102 空白挿入処理では,メトリックとサイズの同じ和文フォントは同一視される.
104 \item 異なるメトリック・サイズの2つの和文文字の間には,両メトリックから決まる空白の平均値が入る.
107 \begin{center}\medskip\small%
110 \textbf{入力}&\textbf{p\TeX}&\textbf{Lua\TeX-ja}\\\midrule
112 \tt\mathcode`\:="703A\mathcode`\*="7020
113 \mathcode`\=="703D\mathcode`\-="702D\mathcode`\|="705C%"
114 \mathcode`\<="707B\mathcode`\>="707D
115 あ\overbrace{\tt)<|gt(}^{\text{2.}}い
116 \overbrace{\tt)<>(}^{\text{1.}}>う\overbrace{\tt)<|Large(}^{\text{3.}}え>
118 &\large あ)\hbox{}{\gt(い)\hbox{}(}う)\hbox{}{\Large(え}&
119 \large あ){\gt(い){}(}う){\Large(え}\\
126 \subsection{\inhibitglue 「エンジン拡張部分」%
127 \centerbaseline{\scriptsize\normalfont}{(\TeX →p\TeX のエンジン拡張部分
128 に対応)}}\ \par概ね実装済みであるが,細かい仕様変更の可能性あり.また,
129 従来ではprimitiveとして実装していた機能をLuaコードと\TeX マクロで実装しな
130 いといけないので,バグが残っている可能性がある.
132 \subsection{plain \TeX~formatに対するマクロ%
133 \centerbaseline{\scriptsize\normalfont}{({\tt ptex.tex}に相当)}}
136 \subsection{\LaTeXe 用マクロ%
137 \centerbaseline{\scriptsize\normalfont}{(p\LaTeXe 実装{\tt plcore.dtx}他に相当)}%
138 及び,{\tt fontspec}パッケージ用マクロ}\ \par
139 試験的に一部の機能が実装され,ある程度は使える.
140 日本語用クラスファイルとしては,八登さんによるBXjsclsを使用するのが現状では手っ取り早い.
145 \subsection{Lua\TeX-ja プロジェクトについて}\
147 プロジェクト Wiki:\url{http://sourceforge.jp/projects/luatex-ja/wiki/}
149 開発メンバー:北川 弘典,前田 一貴,八登 崇之,黒木 裕介,阿部 紀行,本田 知亮,山本 宗宏