リビジョン | c0cd4f9f4a662b50e47fb55858ecadb23e8f8517 (tree) |
---|---|
日時 | 2011-10-12 14:02:49 |
作者 | Hironori Kitagawa <h_kitagawa2001@yaho...> |
コミッター | Hironori Kitagawa |
Merge branch 'kitagawa_test' into tc11-docs
@@ -2,30 +2,39 @@ | ||
2 | 2 | |
3 | 3 | %<*en> |
4 | 4 | \documentclass[a4paper,titlepage]{article} |
5 | -\usepackage[margin=20mm]{geometry} | |
5 | +\usepackage[margin=20mm,footskip=5mm]{geometry} | |
6 | 6 | %</en> |
7 | 7 | %<*ja> |
8 | 8 | \documentclass[a4paper,titlepage]{bxjsarticle} |
9 | -\setpagelayout*{margin=20mm} | |
9 | +\setpagelayout*{margin=20mm,footskip=5mm} | |
10 | 10 | \def\headfont{\normalfont\bfseries} |
11 | 11 | % \def\headfont{\sffamily\gtfamily} is needed in ordinal documents |
12 | 12 | %</ja> |
13 | 13 | |
14 | -\usepackage{amsmath,amssymb,xcolor,pict2e} | |
14 | +\usepackage{amsmath,amssymb,xcolor,pict2e,multienum,amsthm,float} | |
15 | 15 | \usepackage{booktabs,listings,lltjlisting,showexpl,multicol} |
16 | 16 | \usepackage{luatexja-otf} |
17 | -\usepackage[unicode=true]{hyperref} | |
17 | +\usepackage[unicode=false]{hyperref} | |
18 | 18 | \usepackage[all]{xy} |
19 | 19 | \SelectTips{cm}{} |
20 | 20 | |
21 | 21 | \DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-\kern-.125em\TeX} |
22 | 22 | \DeclareRobustCommand\LuaTeX{Lua\TeX} |
23 | +\DeclareRobustCommand\pdfTeX{pdf\TeX} | |
23 | 24 | \DeclareRobustCommand\pTeX{p\kern-.05em\TeX} |
24 | 25 | \DeclareRobustCommand\upTeX{p\kern-.05em\TeX} |
25 | 26 | \DeclareRobustCommand\pLaTeX{p\kern-.05em\LaTeX} |
26 | 27 | \DeclareRobustCommand\pLaTeXe{p\kern-.05em\LaTeXe} |
27 | 28 | \DeclareRobustCommand\epTeX{\ensuremath{\varepsilon}-\kern-.125em\pTeX} |
28 | 29 | |
30 | +\theoremstyle{definition} | |
31 | +\newtheorem{defn}{Definition} | |
32 | + | |
33 | +\newenvironment{cslist}{% | |
34 | + \leftskip2em\parindent=0pt\def\makelabel##1{{\tt\char92##1}} | |
35 | + \def\{{\char`\{}\def\}{\char`\}} | |
36 | + \def\item[##1]{\par\smallskip\par\hskip-\leftskip\makelabel{##1}\par} | |
37 | +}{} | |
29 | 38 | |
30 | 39 | \makeatletter |
31 | 40 | \long\def\@makecaption#1#2{% |
@@ -88,6 +97,7 @@ Japanese documents when using \LuaTeX. | ||
88 | 97 | %</ja> |
89 | 98 | |
90 | 99 | \subsection{Backgrounds} |
100 | +%<*en> | |
91 | 101 | Traditionally, ASCII \pTeX, an extension of \TeX, and its derivatives |
92 | 102 | are used to typeset Japanese documents in \TeX. \pTeX\ is an engine |
93 | 103 | extension of \TeX: so it can produce high-quality Japanese documents |
@@ -106,13 +116,50 @@ using Lua `callbacks', users can customize the internal processing of | ||
106 | 116 | \LuaTeX. So there is no need to modify sources of engines to |
107 | 117 | support Japanese typesetting: to do this, we only have to write Lua |
108 | 118 | scripts for appropriate callbacks. |
109 | - | |
119 | +%</en> | |
120 | +%<*ja> | |
121 | +従来,「\TeX を用いて日本語組版を行う」といったとき,エンジンとしては | |
122 | +ASCII \pTeX やそれの拡張物が用いられることが一般的であった.\pTeX は\TeX | |
123 | +のエンジン拡張であり,(少々仕様上不便な点はあるものの)商業印刷の分野に | |
124 | +も用いられるほどの高品質な日本語組版を可能としている.だが,それは弱点に | |
125 | +もなってしまった:\pTeX という(組版的に)満足なものがあったため,海外で | |
126 | +行われている数々の\TeX の拡張──例えば\eTeX や\pdfTeX ──や,TrueType, | |
127 | +OpenType, Unicodeといった計算機で日本語を扱う際の状況の変化に追従すること | |
128 | +を怠ってしまったのだ. | |
129 | + | |
130 | +ここ数年,若干状況は改善されてきた.現在手に入る大半の\pTeX バイナリでは | |
131 | +外部UTF-8入力が利用可能となり,さらにUnicode化を推進し,\pTeX の内部処理 | |
132 | +までUnicode化した\upTeX も開発されている.また,\pTeX に\eTeX 拡張をマー | |
133 | +ジした\epTeX も登場し,\TeX\ Live\ 2011では\pLaTeX が\epTeX の上で動作す | |
134 | +るようになった.だが,\pdfTeX 拡張(pdf直接出力やmicro-typesetting)を | |
135 | +\pTeX に対応させようという動きはなく,海外とのgapは未だにあるのが現状であ | |
136 | +る. | |
137 | + | |
138 | +しかし,\LuaTeX の登場で,状況は大きく変わることになった.Luaコードで | |
139 | +`callback'を書くことにより,\LuaTeX の内部処理に割り込みをかけることが可 | |
140 | +能となった.これは,エンジン拡張という真似をしなくても,Luaコードとそれに | |
141 | +関する\TeX マクロを書けば,エンジン拡張とほぼ同程度のことができるようになっ | |
142 | +たということを意味する.\LuaTeX-jaは,このアプローチによってLuaコード・ | |
143 | +\TeX マクロによって日本語組版を\LuaTeX の上で実現させようという目的で開発 | |
144 | +が始まったパッケージである. | |
145 | +%</ja> | |
110 | 146 | |
111 | 147 | \subsection{Major Changes from \pTeX} |
148 | +%<*en> | |
112 | 149 | The \LuaTeX-ja package is under much influence of \pTeX\ engine. The initial |
113 | 150 | target of development was to implement features of \pTeX. However, |
114 | 151 | \emph{\LuaTeX-ja is not a just porting of \pTeX; unnatural |
115 | 152 | specifications/behaviors of \pTeX\ were not adopted}. |
153 | +%</en> | |
154 | + | |
155 | +%<*ja> | |
156 | +\LuaTeX-jaは,\pTeX に多大な影響を受けている.初期の開発目標は,\pTeX の機 | |
157 | +能をLuaコードにより実装することであった.しかし,開発が進むにつれ,\pTeX | |
158 | +の完全な移植は不可能であり,また\pTeX における実装がいささか不可解になっ | |
159 | +ているような状況も発見された.そのため,\textbf{\LuaTeX-ja は,もはや | |
160 | +\pTeX の完全な移植は目標とはしない.\pTeX における不自然な仕様・挙動があ | |
161 | +れば,そこは積極的に改める.} | |
162 | +%</ja> | |
116 | 163 | |
117 | 164 | The followings are major changes from \pTeX: |
118 | 165 | \begin{itemize} |
@@ -177,18 +224,23 @@ We say `alphabetic fonts' for fonts used in \textbf{ALchar}, and `Japanese fonts | ||
177 | 224 | This project is hosted by SourceForge.JP. |
178 | 225 | |
179 | 226 | \paragraph{Members}\ |
180 | -% \begin{multicols}{2} | |
181 | -% \begin{itemize} | |
182 | -% \item Hironori KITAGAWA | |
183 | -% \item Kazuki MAEDA | |
184 | -% \item Takayuki YATO | |
185 | -% \item Yusuke KUROKI | |
186 | -% \item Noriyuki ABE | |
187 | -% \item Munehiro YAMAMOTO | |
188 | -% \item Tomoaki HONDA | |
189 | -% \par\ | |
190 | -% \end{itemize} | |
191 | -% \end{multicols} | |
227 | +%<*en> | |
228 | +\begin{multienumerate} | |
229 | +\def\labelenumi{$\bullet$} | |
230 | +\mitemxxx{Hironori KITAGAWA}{Kazuki MAEDA}{Takayuki YATO} | |
231 | +\mitemxxx{Yusuke KUROKI}{Noriyuki ABE}{Munehiro YAMAMOTO} | |
232 | +\mitemx{Tomoaki HONDA} | |
233 | +\end{multienumerate} | |
234 | +%</en> | |
235 | +%<*ja> | |
236 | +\begin{multienumerate} | |
237 | +\def\labelenumi{$\bullet$} | |
238 | +\mitemxxx{Hironori KITAGAWA}{Kazuki MAEDA}{Takayuki YATO} | |
239 | +\mitemxxx{Yusuke KUROKI}{Noriyuki ABE}{Munehiro YAMAMOTO} | |
240 | +\mitemx{Tomoaki HONDA} | |
241 | +\end{multienumerate} | |
242 | +%</ja> | |
243 | + | |
192 | 244 | |
193 | 245 | % \paragraph{Acknowledgments} -- 挿入するならここ |
194 | 246 |
@@ -332,7 +384,7 @@ supports some of functions in \texttt{OTF} package. | ||
332 | 384 | %lltjlisting.sty要修正?:↑「森」の直後で改行. |
333 | 385 | |
334 | 386 | |
335 | -\subsection{Changing Fonts} | |
387 | +\subsection{Changing Fonts}\label{ssub-chgfnt} | |
336 | 388 | \paragraph{Remark: Japanese Characters in Math Mode} |
337 | 389 | Since \pTeX\ supports Japanese characters in math mode, there are |
338 | 390 | sources like the following: |
@@ -382,18 +434,31 @@ of \pLaTeXe\ (in {\tt plfonts.dtx}). | ||
382 | 434 | \verb+\fontshape+ and \verb+\selectfont+ can be used to change |
383 | 435 | attributes of Japanese fonts. |
384 | 436 | \begin{center} |
385 | -\begin{tabular}{ccccc} | |
437 | +\begin{tabular}{cccccc} | |
386 | 438 | \toprule |
387 | -&\textbf{encoding}&\textbf{family}&\textbf{series}&\textbf{shape}\\\midrule | |
439 | +&\textbf{encoding}&\textbf{family}&\textbf{series}&\textbf{shape}&\textbf{selection}\\\midrule | |
388 | 440 | alphabetic fonts |
389 | -&\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+\\ | |
441 | +&\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+ | |
442 | +&\verb+\useroman+\\ | |
390 | 443 | Japanese fonts |
391 | -&\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+\\ | |
392 | -both&---&--&\verb+\fontseries+&\verb+\fontshape+\\ | |
393 | -auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---\\ | |
444 | +&\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+ | |
445 | +&\verb+\usekanji+\\ | |
446 | +both&---&--&\verb+\fontseries+&\verb+\fontshape+&---\\ | |
447 | +auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\ | |
394 | 448 | \bottomrule |
395 | 449 | \end{tabular} |
396 | 450 | \end{center} |
451 | + | |
452 | +%<*ja> | |
453 | +ここで,\verb+\fontencoding{<encoding>}+は,引数により和文側か欧文側かの | |
454 | + どちらかが切り替わる.例えば,次の入力で最初の\verb+\fontencoding+ | |
455 | + の呼び出しは和文フォントのエンコーディングを\texttt{JT3}に変更し, | |
456 | + 2回目の呼びだしでは欧文フォント側を\texttt{T1}へと変更する. | |
457 | +\begin{verbatim} | |
458 | +\fontencoding{JY3}\fontencoding{T1} | |
459 | +\end{verbatim} | |
460 | +%</ja> | |
461 | + | |
397 | 462 | \item For defining a Japanese font family, use \verb+\DeclareKanjiFamily+ |
398 | 463 | instead of \verb+\DeclareFontFamily+. |
399 | 464 | \end{itemize} |
@@ -464,8 +529,7 @@ setting of \LuaTeX-ja): | ||
464 | 529 | \begin{verbatim} |
465 | 530 | \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, +8}} |
466 | 531 | \end{verbatim} |
467 | - | |
468 | - | |
532 | +The argument to {\sf jacharrange} parameter is a list of integer. Negative interger $-n$ in the list means that `the character range~$n$ is ...'. | |
469 | 533 | |
470 | 534 | \paragraph{Default Setting} |
471 | 535 | Lua\TeX-ja predefines eight character ranges for convinience. They are |
@@ -522,30 +586,30 @@ This range consist of the following Unicode ranges, \emph{except characters in t | ||
522 | 586 | \end{multicols} |
523 | 587 | \item[Range~3${}^{\text{J}}$] Punctuations and Miscellaneous symbols. The block list is |
524 | 588 | indicated in Table~\ref{table-rng3}. |
525 | -\begin{table}[p] | |
589 | +\begin{table}[!tb] | |
526 | 590 | \caption{Unicode blocks in predefined character range~3.}\label{table-rng3} |
527 | 591 | \catcode`\"=13\def"#1#2#3#4{{\tt U+#1#2#3#4}}%" |
528 | -\begin{center} | |
529 | -\begin{tabular}{ll} | |
530 | -"2000--"206F&General Punctuation\\ | |
592 | +\begin{center}\small | |
593 | +\begin{tabular}{llll} | |
594 | +"2000--"206F&General Punctuation& | |
531 | 595 | "2070--"209F&Superscripts and Subscripts\\ |
532 | -"20A0--"20CF&Currency Symbols\\ | |
533 | -"20D0--"20FF&Combining Diacritical Marks for Symbols\\ | |
534 | -"2100--"214F&Letterlike Symbols\\ | |
596 | +"20A0--"20CF&Currency Symbols& | |
597 | +"20D0--"20FF&Comb.\ Diacritical Marks for Symbols\\ | |
598 | +"2100--"214F&Letterlike Symbols& | |
535 | 599 | "2150--"218F&Number Forms\\ |
536 | -"2190--"21FF&Arrows\\ | |
600 | +"2190--"21FF&Arrows& | |
537 | 601 | "2200--"22FF&Mathematical Operators\\ |
538 | -"2300--"23FF&Miscellaneous Technical\\ | |
602 | +"2300--"23FF&Miscellaneous Technical& | |
539 | 603 | "2400--"243F&Control Pictures\\ |
540 | -"2500--"257F&Box Drawing\\ | |
604 | +"2500--"257F&Box Drawing& | |
541 | 605 | "2580--"259F&Block Elements\\ |
542 | -"25A0--"25FF&Geometric Shapes\\ | |
606 | +"25A0--"25FF&Geometric Shapes& | |
543 | 607 | "2600--"26FF&Miscellaneous Symbols\\ |
544 | -"2700--"27BF&Dingbats\\ | |
608 | +"2700--"27BF&Dingbats& | |
545 | 609 | "2900--"297F&Supplemental Arrows-B\\ |
546 | -"2980--"29FF&Miscellaneous Mathematical Symbols-B\\ | |
610 | +"2980--"29FF&Misc.\ Mathematical Symbols-B& | |
547 | 611 | "2B00--"2BFF&Miscellaneous Symbols and Arrows\\ |
548 | -"E000--"F8FF&Private Use Area\\ | |
612 | +"E000--"F8FF&Private Use Area& | |
549 | 613 | "FB00--"FB4F&Alphabetic Presentation Forms |
550 | 614 | \end{tabular} |
551 | 615 | \end{center} |
@@ -562,48 +626,48 @@ This range consist of the following Unicode ranges, \emph{except characters in t | ||
562 | 626 | \end{lstlisting} |
563 | 627 | \item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas. |
564 | 628 | \item[Range~6${}^{\text{J}}$] Characters used in Japanese. The block list is indicated in Table~\ref{table-rng6}. |
565 | -\begin{table}[p] | |
629 | +\begin{table}[!tb] | |
566 | 630 | \caption{Unicode blocks in predefined character range~6.}\label{table-rng6} |
567 | 631 | \catcode`\"=13\def"#1#2#3#4{{\tt U+#1#2#3#4}}%" |
568 | -\begin{center} | |
569 | -\begin{tabular}{ll} | |
570 | -"2460--"24FF&Enclosed Alphanumerics\\ | |
632 | +\begin{center}\small | |
633 | +\begin{tabular}{llll} | |
634 | +"2460--"24FF&Enclosed Alphanumerics& | |
571 | 635 | "2E80--"2EFF&CJK Radicals Supplement\\ |
572 | -"3000--"303F&CJK Symbols and Punctuation\\ | |
636 | +"3000--"303F&CJK Symbols and Punctuation& | |
573 | 637 | "3040--"309F&Hiragana\\ |
574 | -"30A0--"30FF&Katakana\\ | |
638 | +"30A0--"30FF&Katakana& | |
575 | 639 | "3190--"319F&Kanbun\\ |
576 | -"31F0--"31FF&Katakana Phonetic Extensions\\ | |
640 | +"31F0--"31FF&Katakana Phonetic Extensions& | |
577 | 641 | "3200--"32FF&Enclosed CJK Letters and Months\\ |
578 | -"3300--"33FF&CJK Compatibility\\ | |
642 | +"3300--"33FF&CJK Compatibility& | |
579 | 643 | "3400--"4DBF&CJK Unified Ideographs Extension A\\ |
580 | -"4E00--"9FFF&CJK Unified Ideographs\\ | |
644 | +"4E00--"9FFF&CJK Unified Ideographs& | |
581 | 645 | "F900--"FAFF&CJK Compatibility Ideographs\\ |
582 | -"FE10--"FE1F&Vertical Forms\\ | |
646 | +"FE10--"FE1F&Vertical Forms& | |
583 | 647 | "FE30--"FE4F&CJK Compatibility Forms\\ |
584 | -"FE50--"FE6F&Small Form Variants\\ | |
648 | +"FE50--"FE6F&Small Form Variants& | |
585 | 649 | "{20}000--"{2F}FFF&(Supplementary Ideographic Plane) |
586 | 650 | \end{tabular} |
587 | 651 | \end{center} |
588 | 652 | \end{table} |
589 | 653 | \item[Range~7${}^{\text{J}}$] Characters used in CJK languages, but not included in Adobe-Japan1-6. |
590 | 654 | The block list is indicated in Table~\ref{table-rng7}. |
591 | -\begin{table}[p] | |
655 | +\begin{table}[!tb] | |
592 | 656 | \caption{Unicode blocks in predefined character range~7.}\label{table-rng7} |
593 | 657 | \catcode`\"=13\def"#1#2#3#4{{\tt U+#1#2#3#4}}%" |
594 | -\begin{center} | |
595 | -\begin{tabular}{ll} | |
596 | -"1100--"11FF&Hangul Jamo\\ | |
658 | +\begin{center}\small | |
659 | +\begin{tabular}{llll} | |
660 | +"1100--"11FF&Hangul Jamo& | |
597 | 661 | "2F00--"2FDF&Kangxi Radicals\\ |
598 | -"2FF0--"2FFF&Ideographic Description Characters\\ | |
662 | +"2FF0--"2FFF&Ideographic Description Characters& | |
599 | 663 | "3100--"312F&Bopomofo\\ |
600 | -"3130--"318F&Hangul Compatibility Jamo\\ | |
664 | +"3130--"318F&Hangul Compatibility Jamo& | |
601 | 665 | "31A0--"31BF&Bopomofo Extended\\ |
602 | -"31C0--"31EF&CJK Strokes\\ | |
666 | +"31C0--"31EF&CJK Strokes& | |
603 | 667 | "A000--"A48F&Yi Syllables\\ |
604 | -"A490--"A4CF&Yi Radicals\\ | |
668 | +"A490--"A4CF&Yi Radicals& | |
605 | 669 | "A830--"A83F&Common Indic Number Forms\\ |
606 | -"AC00--"D7AF&Hangul Syllables\\ | |
670 | +"AC00--"D7AF&Hangul Syllables& | |
607 | 671 | "D7B0--"D7FF&Hangul Jamo Extended-B |
608 | 672 | \end{tabular} |
609 | 673 | \end{center} |
@@ -777,15 +841,40 @@ The followings are JFMs shipped with Lua\TeX-ja: | ||
777 | 841 | \item[\tt jfm-min.lua] A counterpart for \verb+min10.tfm+, which is one |
778 | 842 | of the default Japanese font metric shipped with \pTeX. There |
779 | 843 | are notable difference between this JFM and other 2~JFMs, as |
780 | - showed below: | |
781 | - | |
782 | -何かいい例.単純に「min10にはバグあり」ではなく,プロポーショナルな側面も見せたいよね | |
783 | -(乙部さんのmin10.pdfの例を使う?) | |
844 | + shown in Table~\ref{tab-difjfm}. | |
784 | 845 | \end{description} |
785 | 846 | |
786 | -\item[jfmvar=<string>] ... | |
847 | +\item[jfmvar=<string>] Sometimes there is a need that | |
787 | 848 | \end{list} |
788 | 849 | |
850 | +\begin{table}[t] | |
851 | +\caption{Differences between JFMs shipped with \LuaTeX-ja} | |
852 | +\label{tab-difjfm} | |
853 | +\begin{center} | |
854 | +\def\r#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g | |
855 | +\setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆ | |
856 | +ある日モモちゃんがお使いで迷子になって泣きました.}\copy0 | |
857 | +\vrule height 0pt depth \dp0}} | |
858 | +\def\s#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g | |
859 | +\setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}} | |
860 | +\def\t#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 19.24432pt \g | |
861 | +\setbox0=\hbox{漢}% | |
862 | +\vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0 | |
863 | +\kern-\wd0\vrule width\wd0height .2pt depth .2pt | |
864 | +\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}% | |
865 | +\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}% | |
866 | +\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}} | |
867 | +\begin{tabular}{rccc} | |
868 | +\toprule | |
869 | +&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\ | |
870 | +\midrule | |
871 | +Example~1&\r{ujis}&\r{jis}&\r{min}\\ | |
872 | +Example~2&\s{ujis}&\s{jis}&\s{min}\\ | |
873 | +Bounding Box&\t{ujis}&\t{jis}&\t{min}\\ | |
874 | +\bottomrule | |
875 | +\end{tabular} | |
876 | +\end{center} | |
877 | +\end{table} | |
789 | 878 | |
790 | 879 | \paragraph{Note: kern feature}\label{para-kern} |
791 | 880 | Some fonts have information for inter-glyph spacing. However, this |
@@ -860,10 +949,8 @@ This field is a list of characters which are in this character | ||
860 | 949 | than 0 (hence, the character class~0 contains most of |
861 | 950 | \textbf{JAchar}s). In the list, a character can be |
862 | 951 | specified by its code number, or by the character itself |
863 | - (as a string of length~1). | |
864 | - | |
865 | -In addition to those `real' characters, the following `imaginary | |
866 | - characters' can be specified in the list: | |
952 | + (as a string of length~1). Moreover, there are `imaginary | |
953 | + characters' which specified in the list. We will describe these later. | |
867 | 954 | |
868 | 955 | \item[width=<length>, height=<length>, depth=<length>, italic=<length>]\ (required) |
869 | 956 |
@@ -886,7 +973,7 @@ In most cases, \texttt{left} and \texttt{down} fields are~0, while | ||
886 | 973 | it is not uncommon that the \texttt{align} field is \texttt{'middle'} or \texttt{'right'}. |
887 | 974 | For example, setting the \texttt{align} field to \texttt{'right'} is practically needed |
888 | 975 | when the current character class is the class for opening delimiters'. |
889 | -\begin{figure}[tb] | |
976 | +\begin{figure}[!tb] | |
890 | 977 | \begin{minipage}{0.4\textwidth}% |
891 | 978 | \begin{center}\unitlength=10pt\small |
892 | 979 | \begin{picture}(15,12)(-1,-4) |
@@ -962,6 +1049,78 @@ the `real' glyph is centered horizontally (the green rectangle). | ||
962 | 1049 | \item[glue={\{[$j$]=\{<width>, <stretch>, <shrink>\}, ...\}}] |
963 | 1050 | \end{list} |
964 | 1051 | |
1052 | +%<*en> | |
1053 | +\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}} | |
1054 | +\item['lineend'] An ending of a line. | |
1055 | +\item['diffmet'] Used at a boundary between two \textbf{JAchar}s whose JFM or size is different. | |
1056 | +\item['boxbdd'] The beginning/ending of a horizontal box, and the beginging of a noindented paragraph. | |
1057 | +\item['parbdd'] The beginning of an (indented) paragraph. | |
1058 | +\item['jcharbdd'] A boundary between \textbf{JAchar} and anything else | |
1059 | + (such as \textbf{ALchar}, kern, glue, ...). | |
1060 | +\item[$-1$] The left/right boundary of an inline math formula. | |
1061 | +\end{list} | |
1062 | +%</en> | |
1063 | + | |
1064 | +%<*ja> | |
1065 | +上で説明した通り,\texttt{chars}フィールド中にはいくつかの「特殊文字」も | |
1066 | +指定可能である.これらは,大半が\pTeX のJFMグルーの挿入処理ではみな「文字 | |
1067 | +クラス0の文字」として扱われていた文字であり,その結果として\pTeX より細か | |
1068 | +い組版調整ができるようになっている.以下のその一覧を述べる: | |
1069 | +\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}} | |
1070 | +\item['lineend'] 行の終端を表す. | |
1071 | +\item['diffmet'] | |
1072 | + | |
1073 | +\item['boxbdd'] hboxの先頭と末尾,及びインデントされていない | |
1074 | + (\verb+\noindent+で開始された)段落の先頭を表す. | |
1075 | +\item['parbdd'] 通常の(\verb+\noindent+で開始されていない)段落の先頭. | |
1076 | +\item['jcharbdd'] 和文文字と「その他のもの」(欧文文字,glue,kern等)との境界. | |
1077 | +\item[$-1$] 行中数式と地の文との境界. | |
1078 | +\end{list} | |
1079 | + | |
1080 | +\paragraph{\pTeX 用和文フォントメトリックの移植} | |
1081 | +以下に,\pTeX 用和文フォントメトリックを\LuaTeX-ja用に移植する場合の注意点を挙げておく. | |
1082 | +\begin{itemize} | |
1083 | +\item 実際に出力される和文フォントのサイズがdesign sizeとなる. | |
1084 | +このため,例えば$1\,\textrm{zw}$がdesign sizeの0.962216倍であるJISフォン | |
1085 | + トメトリック等を移植する場合は, | |
1086 | +\begin{itemize} | |
1087 | +\item JFM中の全ての数値を$1/0.962216$倍しておく. | |
1088 | +\item \TeX ソース中で使用するところで,サイズ指定を0.962216倍にする. | |
1089 | + \LaTeX でのフォント宣言なら,例えば次のように: | |
1090 | +\begin{verbatim} | |
1091 | +\DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[0.962216] psft:Ryumin-Light:jfm=jis}{} | |
1092 | +\end{verbatim} | |
1093 | +\end{itemize} | |
1094 | +\item 上に述べた特殊文字は,\texttt{'boxbdd'}を除き文字クラスを全部0とする | |
1095 | + (JFM中に単に書かなければよい). | |
1096 | +\item \texttt{'boxbdd'}については,それのみで一つの文字クラスを形成し,その | |
1097 | + 文字クラスに関してはglue/kernの設定はしない. | |
1098 | + | |
1099 | +これは,\pTeX では, | |
1100 | + hboxの先頭・末尾とインデントされていない(\verb+\noindent+で開始さ | |
1101 | + れた)段落の先頭にはJFMグルーは入らないという仕様を実現させるためである. | |
1102 | +\item \pTeX の組版を再現させようというのが目的であれば以上の注意を守れば十分である. | |
1103 | + | |
1104 | +ところで,\pTeX では通常の段落の先頭にJFMグルーが残るという仕様があるので, | |
1105 | + 段落先頭の開き括弧は全角二分下がりになる.全角下がりを実現させるに | |
1106 | + は,段落の最初に手動で\verb+\inhibitglue+を追加するか,あるいは | |
1107 | + \verb+\everypar+のhackを行い,それを自動化させるしかなかった. | |
1108 | + | |
1109 | +一方,\LuaTeX-jaでは,\texttt{'parbdd'}によって,それがJFM側で調整できるよ | |
1110 | +うになった.例えば,\LuaTeX-ja同梱のJFMのように,\texttt{'boxbdd'}と同じ文字クラスに | |
1111 | +\texttt{'parbdd'}を入れれば全角下がりとなる. | |
1112 | + | |
1113 | +\begin{LTXexample} | |
1114 | +\jfont\g=psft:Ryumin-Light:jfm=test \g | |
1115 | +\parindent1\zw\noindent{}◆◆◆◆◆ | |
1116 | +\par{}「◆◆←二分下がり | |
1117 | +\par{}【◆◆←全角下がり | |
1118 | +\par{}〔◆◆←全角二分下がり | |
1119 | +\end{LTXexample} | |
1120 | +\end{itemize} | |
1121 | + | |
1122 | +%</ja> | |
1123 | + | |
965 | 1124 | \subsection{Math Font Family} |
966 | 1125 | \TeX\ handles fonts in math formulas by 16~font families\footnote{Omega, |
967 | 1126 | Aleph, \LuaTeX~and $\varepsilon$-\kern-.125em(u)\pTeX can handles 256~families, but |
@@ -971,11 +1130,13 @@ an external package is needed to support this in plain \TeX\ and | ||
971 | 1130 | |
972 | 1131 | \LuaTeX-ja's handling of Japanese fonts in math formulas is similar; |
973 | 1132 | Table~\ref{tab-math} shows counterparts to \TeX's primitives for math |
974 | -font families. | |
1133 | +font families. There is no relation between the value of | |
1134 | +\verb+\fam+ and that of \verb+\jfam+; with appropreate settings, | |
1135 | +you can set both \verb+\fam+ and \verb+\jfam+ to~the same value. | |
975 | 1136 | |
976 | -\begin{table}[tb] | |
977 | -\label{tab-math} | |
1137 | +\begin{table}[!tb] | |
978 | 1138 | \caption{Primitives for Japanese math fonts.} |
1139 | +\label{tab-math} | |
979 | 1140 | \begin{center}\def\{{\char`\{}\def\}{\char`\}} |
980 | 1141 | \begin{tabular}{lll} |
981 | 1142 | \toprule |
@@ -990,6 +1151,82 @@ scriptscript size&\tt\textsf{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\ve | ||
990 | 1151 | \end{center} |
991 | 1152 | \end{table} |
992 | 1153 | |
1154 | +\subsection{Callbacks} | |
1155 | +Like \LuaTeX\ itself, \LuaTeX-ja also has callbacks. These callbacks can | |
1156 | +be accessed via \verb+luatexbase.add_to_callback+ function and so on, as other callbacks | |
1157 | +\begin{list}{}% | |
1158 | +{\def\makelabel#1{\bfseries#1}} | |
1159 | +\item[\texttt{luatexja.load\_jfm} callback] | |
1160 | +With this callback you can overwrite JFMs. | |
1161 | + | |
1162 | +\begin{verbatim} | |
1163 | +function (<table> jfm_info, <string> jfm_name) | |
1164 | + return <table> new_jfm_info | |
1165 | +end | |
1166 | +\end{verbatim} | |
1167 | + | |
1168 | +The argument \verb+jfm_info+ contains a table similar to the table in a JFM file, except | |
1169 | +this argument has \texttt{chars} field which contains character codes | |
1170 | + whose character class is not~0. | |
1171 | + | |
1172 | +An example of this callback is the \texttt{ltjarticle} class, with | |
1173 | + forcefully assigning character class~0 to \texttt{'parbdd'} | |
1174 | + in the JFM \texttt{jfm-min.lua}. This callback doesn't | |
1175 | + replace any code of \LuaTeX-ja. | |
1176 | + | |
1177 | +\item[\texttt{luatexja.define\_font} callback] | |
1178 | +This callback and the next callback form a pair, and you can assign letters which don't have | |
1179 | + fixed codepoints in Unicode to non-zero character classes. | |
1180 | +This \texttt{luatexja.define\_font} callback is called just when new Japanese font is loaded. | |
1181 | +\begin{verbatim} | |
1182 | +function (<table> jfont_info, <number> font_number) | |
1183 | + return <table> new_jfont_info | |
1184 | +end | |
1185 | +\end{verbatim} | |
1186 | + | |
1187 | +You may assume that \verb+jfont_info+ has the following fields: | |
1188 | +\begin{description} | |
1189 | +\item[\tt jfm] The index number of JFM. | |
1190 | +\item[\tt size] Font size in a scaled point (${}=2^{-16}\,\textrm{pt}$). | |
1191 | +\item[\tt var] The value specified in \texttt{jfmvar=...} at a call of \verb+\jfont+. | |
1192 | +\end{description} | |
1193 | + | |
1194 | +The returned table \verb+new_jfont_info+ also should include these three fields. | |
1195 | +The \verb+font_number+ is a font number. | |
1196 | + | |
1197 | +A good example of this and the next callbacks is \texttt{luatexja-otf} | |
1198 | + package, supporting \verb+"AJ1-xxx"+ form for Adobe-Japan1 | |
1199 | + CID characters in a JFM. This callback doesn't replace any | |
1200 | + code of \LuaTeX-ja. | |
1201 | + | |
1202 | + | |
1203 | +\item[\texttt{luatexja.find\_char\_class} callback] | |
1204 | +This callback is called just when \LuaTeX-ja inready to determine which | |
1205 | + character class a character \verb+chr_code+ belongs. | |
1206 | +A function used in this callback should be in the following form: | |
1207 | +\begin{lstlisting}[numbers=left] | |
1208 | +function (<number> char_class, <table> jfont_info, <number> chr_code) | |
1209 | + if char_class~=0 then return char_class | |
1210 | + else | |
1211 | + .... | |
1212 | + return (<number> new_char_class or 0) | |
1213 | + end | |
1214 | +end | |
1215 | +\end{lstlisting} | |
1216 | + | |
1217 | +The argument \verb+char_class+ is the result of \LuaTeX-ja's default | |
1218 | + routine or previous function calls in this callback, hence | |
1219 | + this argument may not be 0. Moreover, the returned | |
1220 | + \verb+new_char_class+ should be as same as \verb+char_class+ when \verb+char_class+ | |
1221 | + is not~0, otherwise you will overwrite the \LuaTeX-ja's | |
1222 | + default routine. | |
1223 | + | |
1224 | +This callback doesn't replace any code of \LuaTeX-ja. | |
1225 | + | |
1226 | + | |
1227 | + | |
1228 | +\end{list} | |
1229 | + | |
993 | 1230 | |
994 | 1231 | |
995 | 1232 | \section{Parameters} |
@@ -1027,7 +1264,9 @@ character other than space~`{\tt\char32}'~(U+0020) has the category code | ||
1027 | 1264 | 12~(other), while the space has 10~(space). |
1028 | 1265 | |
1029 | 1266 | \subsection{List of Parameters} |
1030 | -In the following list of parameters, [\verb+\cs+] indicates the counterpart in \pTeX, and each symbol has the following meaning: | |
1267 | +The following is the list of parameters which can be specificated by the | |
1268 | +\verb+\ltjsetparameter+ command. [\verb+\cs+] indicates the counterpart | |
1269 | +in \pTeX, and symbols beside each parameter has the following meaning: | |
1031 | 1270 | \begin{itemize} |
1032 | 1271 | \item No mark: values at the end of the paragraph or the hbox are |
1033 | 1272 | adopted in the whole paragraph/hbox. |
@@ -1050,8 +1289,38 @@ At the present version, the lowermost bit of <natural number> indicates | ||
1050 | 1289 | (see the description of \textsf{jcharwidowpenalty} above). |
1051 | 1290 | |
1052 | 1291 | |
1053 | -\item[\textsf{prebreakpenalty}\,=\{<chr\_code>,<penalty>\}] [\verb+\prebreakpenalty+] | |
1292 | +\item[\textsf{prebreakpenalty}\,=\{<chr\_code>,<penalty>\}] [\verb+\prebreakpenalty+]\ | |
1293 | +%<*ja> | |
1294 | +文字コード<chr\_code>の\textbf{JAchar}が行頭にくることを抑止するために, | |
1295 | + この文字の前に挿入/追加されるペナルティの量を指定する. | |
1296 | + | |
1297 | +例えば閉じ括弧「〗」は絶対に行頭にきてはならないので,標準で読み込まれる | |
1298 | + \texttt{luatexja-kinsoku.tex}において | |
1299 | +\begin{verbatim} | |
1300 | +\ltjsetparameter{prebreakpenalty={`〙,10000}} | |
1301 | +\end{verbatim} | |
1302 | +と,最大値の10000が指定されている.他にも,小書きのカナなど,絶対禁止とい | |
1303 | + うわけではないができれば行頭にはきて欲しくない場合に,0と | |
1304 | + 10000の間の値を指定するのも有用であろう. | |
1305 | +\begin{verbatim} | |
1306 | +\ltjsetparameter{prebreakpenalty={`ゕ,150}} | |
1307 | +\end{verbatim} | |
1308 | +%</ja> | |
1309 | + | |
1054 | 1310 | \item[\textsf{postbreakpenalty}\,=\{<chr\_code>,<penalty>\}] [\verb+\postbreakpenalty+] |
1311 | +%<*ja> | |
1312 | +文字コード<chr\_code>の\textbf{JAchar}が行末にくることを抑止するために, | |
1313 | + この文字の後に挿入/追加されるペナルティの量を指定する. | |
1314 | + | |
1315 | +\pTeX では,\verb+\prebreakpenalty+, \verb+\postbreakpenalty+において, | |
1316 | +\begin{itemize} | |
1317 | +\item 一つの文字に対して,pre, postどちらか一つしか指定することができなかっ | |
1318 | + た(後から指定した方で上書きされる). | |
1319 | +\item pre, post合わせて256文字分の情報を格納することしかできなかった. | |
1320 | +\end{itemize} | |
1321 | +という制限があったが,\LuaTeX-ja ではこれらの制限は解消されている. | |
1322 | +%</ja> | |
1323 | + | |
1055 | 1324 | \item[\textsf{jatextfont}\,=\{<jfam>,<jfont\_cs>\}] [\verb+\textfont+ in \TeX] |
1056 | 1325 | \item[\textsf{jascriptfont}\,=\{<jfam>,<jfont\_cs>\}] [\verb+\scriptfont+ in \TeX] |
1057 | 1326 | \item[\textsf{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}] [\verb+\scriptscriptfont+ in \TeX] |
@@ -1072,13 +1341,18 @@ This is the default value. | ||
1072 | 1341 | |
1073 | 1342 | \item[\textsf{alxspmode}\,=\{<chr\_code>,<mode>\}] [\verb+\xspcode+] |
1074 | 1343 | |
1075 | -Setting whether inserting \textsf{xkanjiskip} is allowed before/after a \textbf{ALchar} whose character code is <chr\_code>. | |
1344 | +Setting whether inserting \textsf{xkanjiskip} is allowed before/after a | |
1345 | + \textbf{ALchar} whose character code is <chr\_code>. | |
1076 | 1346 | The followings are allowed for <mode>: |
1077 | 1347 | \begin{description} |
1078 | -\item[0, \texttt{inhibit}] Insertion of \textsf{xkanjiskip} is inhibited before the charater, nor after the charater. | |
1079 | -\item[1, \texttt{preonly}] Insertion of \textsf{xkanjiskip} is allowed before the charater, but not after. | |
1080 | -\item[2, \texttt{postonly}] Insertion of \textsf{xkanjiskip} is allowed after the charater, but not before. | |
1081 | -\item[3, \texttt{allow}] Insertion of \textsf{xkanjiskip} is allowed before the charater and after the charater. | |
1348 | +\item[0, \texttt{inhibit}] Insertion of \textsf{xkanjiskip} is inhibited | |
1349 | + before the charater, nor after the charater. | |
1350 | +\item[1, \texttt{preonly}] Insertion of \textsf{xkanjiskip} is allowed | |
1351 | + before the charater, but not after. | |
1352 | +\item[2, \texttt{postonly}] Insertion of \textsf{xkanjiskip} is allowed | |
1353 | + after the charater, but not before. | |
1354 | +\item[3, \texttt{allow}] Insertion of \textsf{xkanjiskip} is allowed both | |
1355 | + before the charater and after the charater. | |
1082 | 1356 | This is the default value. |
1083 | 1357 | \end{description} |
1084 | 1358 | Note that parameters \textsf{jaxspmode} and \textsf{alxspmode} use a common table. |
@@ -1105,7 +1379,8 @@ The allowed arguments are the followings: | ||
1105 | 1379 | |
1106 | 1380 | |
1107 | 1381 | \section{Other Primitives} |
1108 | -\subsection{Compatibility with \pTeX} | |
1382 | +\subsection{Primitives for Compatibility} | |
1383 | +The following primtives are implemented for compatibility with \pTeX: | |
1109 | 1384 | \begin{list}{}{\def\makelabel{\ttfamily\char92 }} |
1110 | 1385 | \item[kuten] |
1111 | 1386 | \item[jis] |
@@ -1134,7 +1409,7 @@ With the help of this example, we remark the specification of \verb+\inhibitglue | ||
1134 | 1409 | \item The call of \verb+\inhibitglue+ in the (restricted) horizontal |
1135 | 1410 | mode is only effective on the spot; does not get over boundary of |
1136 | 1411 | paragraphs. Moreover, \verb+\inhibitglue+ cancels ligatures and |
1137 | - kernings, as shown in l.~4 of above example. | |
1412 | + kernings, as shown in line~4 of above example. | |
1138 | 1413 | \item The call of \verb+\inhibitglue+ in math mode is just ignored. |
1139 | 1414 | \end{itemize} |
1140 | 1415 |
@@ -1142,6 +1417,67 @@ With the help of this example, we remark the specification of \verb+\inhibitglue | ||
1142 | 1417 | \subsection{Patch for NFSS2} |
1143 | 1418 | As described in Subsection~\ref{ssec-ltx}, \LuaTeX-ja simply adopted |
1144 | 1419 | \texttt{plfonts.dtx} in \pLaTeXe\ for the Japanese patch for NFSS2. |
1420 | +For an convinience, we will describe | |
1421 | +commands which are not described in Subsection~\ref{ssub-chgfnt}. | |
1422 | + | |
1423 | +\begin{cslist}% | |
1424 | +\item[DeclareYokoKanjiEncoding\{<encoding>\}\{<text-settings>\}\{<math-settings>\}] | |
1425 | +In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families | |
1426 | + and Japanese font families is only made by its | |
1427 | + encoding. For example, encodings OT1 and T1 are for | |
1428 | + alphabetic font families, and a Japanese font family cannot | |
1429 | + have these encodings. This command defines a new encoding | |
1430 | + scheme for Japanese font family (in horizontal direction). | |
1431 | + | |
1432 | +\item[DeclareKanjiEncodingDefaults\{<text-settings>\}\{<math-settings>\}] | |
1433 | +\item[DeclareKanjiSubstitution\{<encoding>\}\{<family>\}\{<series>\}\{<shape>\}] | |
1434 | +\item[DeclareErrorKanjiFont\{<encoding>\}\{<family>\}\{<series>\}\{<shape>\}\{<size>\}] | |
1435 | + | |
1436 | +The above 3~commands are just the counterparts for \verb+DeclareFontEncodingDefaults+ and~others. | |
1437 | + | |
1438 | +\item[reDeclareMathAlphabet\{<unified-cmd>\}\{<al-cmd>\}\{<ja-cmd>\}] | |
1439 | +和文・欧文の数式用フォントファミリを一度に変更する命令を作成する. | |
1440 | +具体的には,欧文数式用フォントファミリ変更の命令<al-cmd>と,和文数式用フォ | |
1441 | + ントファミリ変更の命令<ja-cmd>の2つを同時に行う命令として | |
1442 | + <unified-cmd>を(再)定義する.実際の使用では<unified-cmd>と | |
1443 | + <al-cmd>に同じものを指定する,すなわち,<al-cmd>に和文側も変 | |
1444 | + 更させるようにするのが一般的と思われる. | |
1445 | + | |
1446 | +本コマンドの使用については,\pLaTeX 配布中の\texttt{plfonts.dtx}に詳しく | |
1447 | + 注意点が述べられているので,そちらを参照されたい. | |
1448 | + | |
1449 | +\item[DeclareRelationFont\{<ja-encoding>\}\{<ja-family>\}\{<ja-series>\}\{<ja-shape>\}\\ | |
1450 | + \hfill\{<al-encoding>\}\{<al-family>\}\{<al-series>\}\{<al-shape>\}] | |
1451 | +%<*en> | |
1452 | +This command sets the `accompanied' alphabetic font family (given by the latter 4~arguments) | |
1453 | +with respect to a Japanese font family given by the former 4~arguments. | |
1454 | +%</en> | |
1455 | +%<*ja> | |
1456 | +いわゆる「従属欧文」を設定するための命令である.前半の4引数で表される和文フォントファミリに対して, | |
1457 | +そのフォントに対応する「従属欧文」フォントファミリを後半の4引数により与える. | |
1458 | +%</ja> | |
1459 | +\item[SetRelationFont] | |
1460 | +This command is almost same as \verb+\DeclareRelationFont+, except that this command does a local | |
1461 | +assignment, where \verb+\DeclareRelationFont+ does a global assignment. | |
1462 | +\item[userelfont] | |
1463 | +Change current alphabetic font encoding/family/\dots\ to the `accompanied' alphabetic | |
1464 | + font family with respect to current Japanese font family, | |
1465 | + which was set by | |
1466 | + \verb+\DeclareRelationFont+ or \verb+SetRelationFont+. | |
1467 | +Like \verb+\fontfamily+, \verb+\selectfont+ is required to take an effect. | |
1468 | + | |
1469 | +\item[adjustbaseline] | |
1470 | +... | |
1471 | +\end{cslist} | |
1472 | + | |
1473 | +As closing this subsection, we shall introduce an example of | |
1474 | +\verb+SetRelationFont+ and \verb+\userelfont+: | |
1475 | +\begin{LTXexample} | |
1476 | +\gtfamily{}あいうabc | |
1477 | +\SetRelationFont{JY3}{gt}{m}{n}{OT1}{pag}{m}{n} | |
1478 | +\userelfont\selectfont{}あいうabc | |
1479 | +\end{LTXexample} | |
1480 | + | |
1145 | 1481 | |
1146 | 1482 | \subsection{Cropmark/`tombow'} |
1147 | 1483 |
@@ -1207,23 +1543,22 @@ There is also a unit called `歯' which equals to $0.25\,\textrm{mm}$ and | ||
1207 | 1543 | fonts in scaled point ($2^{-16}\,\textrm{pt}$). |
1208 | 1544 | \attr{ltj@autospc} Whether the auto insertion of \textsf{kanjiskip} is allowed at the node. |
1209 | 1545 | \attr{ltj@autoxspc} Whether the auto insertion of \textsf{xkanjiskip} is allowed at the node. |
1210 | -\attr{ltj@icflag} For distinguishing `kinds' of the node. To this | |
1211 | - attribute, one of the following value is | |
1212 | - assigned: | |
1546 | +\attr{ltj@icflag} An attribute for distinguishing `kinds' of a node. One of the following value is | |
1547 | + assigned to this attribute: | |
1213 | 1548 | \begin{description} |
1214 | -\item[ITALIC (1)] Glues from an itaric correction | |
1549 | +\item[\textit{italic} (1)] Glues from an itaric correction | |
1215 | 1550 | (\verb+\/+). This distinction of origins of glues |
1216 | 1551 | (from explicit \verb+\kern+, or from \verb+\/+) |
1217 | 1552 | is needed in the insertion process of \textsf{xkanjiskip}. |
1218 | -\item[PACKED (2)] | |
1219 | -\item[KINSOKU (3)] Penalties inserted for the word-wrapping process of Japanese characters (\emph{kinsoku}). | |
1220 | -\item[FROM\_JFM (4)] Glues/kerns from JFM. | |
1221 | -\item[LINE\_END (5)] Kerns for ... | |
1222 | -\item[KANJI\_SKIP (6)] Glues for \textsf{kanjiskip}. | |
1223 | -\item[XKANJI\_SKIP (7)] Glues for \textsf{xkanjiskip}. | |
1224 | -\item[PROCESSED (8)] Nodes which is already processed by ... | |
1225 | -\item[IC\_PROCESSED (9)] Glues from an itaric correction, but also already processed. | |
1226 | -\item[BOXBDD (15)] Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph. | |
1553 | +\item[\textit{packed} (2)] | |
1554 | +\item[\textit{kinsoku} (3)] Penalties inserted for the word-wrapping process of Japanese characters (\emph{kinsoku}). | |
1555 | +\item[\textit{from\_jfm} (4)] Glues/kerns from JFM. | |
1556 | +\item[\textit{line\_end} (5)] Kerns for ... | |
1557 | +\item[\textit{kanji\_skip} (6)] Glues for \textsf{kanjiskip}. | |
1558 | +\item[\textit{xkanji\_skip} (7)] Glues for \textsf{xkanjiskip}. | |
1559 | +\item[\textit{processed} (8)] Nodes which is already processed by ... | |
1560 | +\item[\textit{ic\_processed} (9)] Glues from an itaric correction, but also already processed. | |
1561 | +\item[\textit{boxbdd} (15)] Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph. | |
1227 | 1562 | \end{description} |
1228 | 1563 | \attr{ltj@kcat$i$} Where $i$~is a natural number which is less than~7. |
1229 | 1564 | These 7~attributes store bit~vectors indicating which character block is regarded as a block of \textbf{JAchar}s. |
@@ -1332,8 +1667,7 @@ This problem is resolved by using | ||
1332 | 1667 | |
1333 | 1668 | \section{Linebreak after Japanese Character}\label{sec-lbreak} |
1334 | 1669 | \subsection{Reference: Behavior in \pTeX} |
1335 | -(NOT COMPLETED) | |
1336 | - | |
1670 | +%<*en> | |
1337 | 1671 | In~\pTeX, a linebreak after a Japanese character doesn't emit a space, |
1338 | 1672 | since words are not separated by spaces in Japanese writings. However, |
1339 | 1673 | this feature isn't fully implemented in \LuaTeX-ja due to the |
@@ -1355,8 +1689,36 @@ processor. State~$K$ is similar to state~$M$, and is entered after | ||
1355 | 1689 | Japanese characters. The diagram of state transitions are indicated in |
1356 | 1690 | Figure~\ref{fig-ptexipro}. Note that \pTeX\ doesn't leave state~$K$ |
1357 | 1691 | after `beginning/ending of a group' characters. |
1358 | -\begin{figure}[tb] | |
1359 | -\label{fig-ptexipro} | |
1692 | +%</en> | |
1693 | + | |
1694 | +%<*ja> | |
1695 | +欧文では文章の改行は単語間でしか行わない.そのため,\TeX では,(文字の直後の)改行は | |
1696 | +空白文字と同じ扱いとして扱われる.一方,和文ではほとんどどどこでも改行が可能なため, | |
1697 | +\pTeX では和文文字の直後の改行は単純に無視されるようになっている. | |
1698 | + | |
1699 | +このような動作は,\pTeX が\TeX からエンジンとして拡張されたことによって可能になったことである. | |
1700 | +\pTeX の入力処理部は,\TeX におけるそれと同じように,有限オートマトンとして記述することができ, | |
1701 | +以下に述べるような4状態を持っている. | |
1702 | + | |
1703 | +\begin{itemize} | |
1704 | +\item State~$N$: 行の開始. | |
1705 | +\item State~$S$: 空白読み飛ばし. | |
1706 | +\item State~$M$: 行中. | |
1707 | +\item State~$K$: 行中(和文文字の後). | |
1708 | +\end{itemize} | |
1709 | +また,状態遷移は,図\label{fig-ptexipro}のようになっており,図中の数字は | |
1710 | +カテゴリーコードを表している.最初の3状態は\TeX の入力処理部と同じであり, | |
1711 | +図中から状態$K$と「$j$」と書かれた矢印を取り除けば,\TeX の入力処理部と同 | |
1712 | +じものになる. | |
1713 | + | |
1714 | +この図から分かることは, | |
1715 | +\begin{quote} | |
1716 | +行が和文文字(とグループ境界文字)で終わっていれば,改行は無視される | |
1717 | +\end{quote} | |
1718 | +ということである. | |
1719 | +%</ja> | |
1720 | + | |
1721 | +\begin{figure}[!tb] | |
1360 | 1722 | \begin{gather*} |
1361 | 1723 | \def\sp{\text{\tt\char32}} |
1362 | 1724 | \xymatrix{&& |
@@ -1379,10 +1741,12 @@ after `beginning/ending of a group' characters. | ||
1379 | 1741 | \item Category codes 9~(ignored), 14~(comment)~and~15~(invalid) are omitted in above diagram. |
1380 | 1742 | \end{itemize} |
1381 | 1743 | \caption{State transitions of \pTeX's input processor.} |
1744 | +\label{fig-ptexipro} | |
1382 | 1745 | \end{figure} |
1383 | 1746 | |
1384 | 1747 | |
1385 | 1748 | \subsection{Behavior in \LuaTeX-ja} |
1749 | +%<*en> | |
1386 | 1750 | States in the input processoe of \LuaTeX\ is the same as that of \TeX, |
1387 | 1751 | and they can't be customized by any callbacks. Hence, we can only use |
1388 | 1752 | \verb+process_input_buffer+ and \verb+token_filter+ callbacks for to |
@@ -1394,11 +1758,11 @@ token \emph{in the input processor}. So we can use only the | ||
1394 | 1758 | \verb+process_input_buffer+ callback. This means that suppressing a |
1395 | 1759 | space must be done \emph{just before} an input line is read. |
1396 | 1760 | |
1397 | -Considering these situations, handling of a end-of-line in \LuaTeX-ja are as follows: | |
1761 | +Considering these situations, handling of an end-of-line in \LuaTeX-ja are as follows: | |
1398 | 1762 | \begin{quote} |
1399 | 1763 | A character U+FFFFF (its category code is set to 14~(comment) by |
1400 | -\LuaTeX-ja) is appended to an input line, before \LuaTeX\ actually | |
1401 | -process it, if and only if the following two conditions are satisfied: | |
1764 | +\LuaTeX-ja) is appended to an input line, \emph{before \LuaTeX\ actually | |
1765 | +process it}, if and only if the following two conditions are satisfied: | |
1402 | 1766 | \begin{enumerate} |
1403 | 1767 | \item The category code of the character $\langle${return}$\rangle$ |
1404 | 1768 | (whose character code is 13) is 5~(end-of-line). |
@@ -1408,11 +1772,158 @@ process it, if and only if the following two conditions are satisfied: | ||
1408 | 1772 | \bigl(\{\text{catcode}=1\}\cup\{\text{catcode}=2\}\bigr)^* |
1409 | 1773 | \] |
1410 | 1774 | \end{enumerate} |
1775 | +\end{quote} | |
1776 | + | |
1777 | +\paragraph{Remark} | |
1778 | +The following example shows the major difference from the behavior of \pTeX: | |
1779 | +\begin{LTXexample} | |
1780 | +\ltjsetparameter{autoxspacing=false} | |
1781 | +\ltjsetparameter{jacharrange={-6}}xあ | |
1782 | +y\ltjsetparameter{jacharrange={+6}}zあ | |
1783 | +u | |
1784 | +\end{LTXexample} | |
1785 | +\begin{itemize} | |
1786 | +\item There is no space between `x' and `y', since the line~2 ends with a \textbf{JAchar} `あ' | |
1787 | +(this `あ' considered as an \textbf{JAchar} at the ending of line~1). | |
1788 | +\item There is no space between `あ' (in the line~3) and `u', since the | |
1789 | + line~3 ends with an \textbf{ALchar} | |
1790 | +(the letter `あ' considered as an \textbf{ALchar} at the ending of line~2). | |
1791 | +\end{itemize} | |
1792 | +%</en> | |
1793 | + | |
1794 | +%<*ja> | |
1795 | +\LuaTeX の入力処理部は\TeX のそれと全く同じであり,callbackによりユーザが | |
1796 | +カスタマイズすることはできない.このため,改行抑制の目的でユーザが利用で | |
1797 | +きそうなcallbackとしては,\verb+process_input_buffer+や | |
1798 | +\verb+token_filter+に限られてしまう.しかし,\TeX の入力処理部をよく見る | |
1799 | +と,後者も役には経たないことが分かる:改行文字は,入力処理部によってトー | |
1800 | +クン化される時に,カテゴリーコード10の32番文字へと置き換えられてしまうた | |
1801 | +め,\verb+token_filter+で非標準なトークン読み出しを行おうとしても,空白文 | |
1802 | +字由来のトークンと,改行文字由来のトークンは区別できないのだ. | |
1803 | + | |
1804 | +すると,我々のとれる道は,\verb+process_input_buffer+を用いて | |
1805 | +\LuaTeX の入力処理部に引き渡される前に入力文字列を編集するというものしかない. | |
1806 | +以上を踏まえ,\LuaTeX-jaにおける「和文文字直後の改行抑制」の処理は,次のようになっている: | |
1411 | 1807 | |
1808 | +\begin{quote} | |
1809 | +各入力行に対し,\textbf{その入力行が読まれる前の内部状態で} | |
1810 | +以下の2条件が満たされている場合,\LuaTeX-jaはU+FFFFF番の文字 | |
1811 | +\footnote{この文字はコメント文字として扱われるように\LuaTeX-ja内部で設定をしている.} | |
1812 | +を末尾に追加する.よって,その場合に改行は空白とは見做されないこととなる. | |
1813 | +\begin{enumerate} | |
1814 | +\item 改行文字(文字コード13番)のカテゴリーコードが5~(end-of-line)である. | |
1815 | +\item 入力行は次の「正規表現」にマッチしている: | |
1816 | +\[ | |
1817 | + (\text{any char})^*(\textbf{JAchar}) | |
1818 | + \bigl(\{\text{catcode}=1\}\cup\{\text{catcode}=2\}\bigr)^* | |
1819 | +\] | |
1820 | +\end{enumerate} | |
1412 | 1821 | \end{quote} |
1413 | 1822 | |
1823 | +この仕様は,前節で述べた\pTeX の仕様にできるだけ近づけたものとなっている.最初の条件は, | |
1824 | +\texttt{verbatim}系環境などの日本語対応マクロを書かなくてすませるためのものである. | |
1825 | +しかしながら,完全に同じ挙動が実現できたわけではない. | |
1826 | +差異は,次の例が示すように,和文文字の範囲を変更した行の改行において見られる: | |
1827 | +\begin{LTXexample} | |
1828 | +\ltjsetparameter{autoxspacing=false} | |
1829 | +\ltjsetparameter{jacharrange={-6}}xあ | |
1830 | +y\ltjsetparameter{jacharrange={+6}}zあ | |
1831 | +u | |
1832 | +\end{LTXexample} | |
1833 | +もし\pTeX とまったく同じ挙動を示すならば,出力は | |
1834 | +「\hbox{\ltjsetparameter{autoxspacing=false}x yzあu}」となるべきである.しかし,実際には | |
1835 | +上のように異なる挙動となっている. | |
1836 | +\begin{itemize} | |
1837 | +\item 2行目は「あ」という和文文字で終わる(2行目を処理する前の時点では, | |
1838 | + 「あ」は和文文字扱いである)ため,直後の改行文字は無視される. | |
1839 | +\item 3行目は「あ」という欧文文字で終わる(2行目を処理する前の時点では, | |
1840 | + 「あ」は欧文文字扱いである)ため,直後の改行文字は空白に置き換わる. | |
1841 | +\end{itemize} | |
1842 | +このため,トラブルを避けるために,和文文字の範囲を\verb+\ltjsetparameter+で編集した場合, | |
1843 | +その行はそこで改行するようにした方がいいだろう. | |
1844 | +%</ja> | |
1845 | + | |
1846 | + | |
1414 | 1847 | \section{Insertion of JFM glues, \textsf{kanjiskip} and \textsf{xkanjiskip}} |
1415 | -This is the longest section of the document. | |
1848 | +\subsection{Overview} | |
1849 | +%<*en> | |
1850 | +NOT COMPLETED | |
1851 | +%</en> | |
1852 | + | |
1853 | +%<*ja> | |
1854 | +\LuaTeX-ja における和文処理グルーの挿入方法は,\pTeX のそれとは全く異なる. | |
1855 | +\pTeX では次のような仕様であった: | |
1856 | +\begin{itemize} | |
1857 | +\item JFMグルーの挿入は,和文文字を表すトークンを元に水平リストに(文字を表す)<char\_node>を | |
1858 | +追加する過程で行われる. | |
1859 | +\item \textsf{xkanjiskip}の挿入は,hboxへのパッケージングや行分割前に行われる. | |
1860 | +\item \textsf{kanjiskip}はノードとしては挿入されない.パッケージングや行分割の計算時に | |
1861 | +「和文文字を表す2つの<char\_node>の間には\textsf{kanjiskip}がある」ものとみなされる. | |
1862 | +\end{itemize} | |
1863 | +しかし,\LuaTeX-jaでは,hboxへのパッケージングや行分割前に全ての | |
1864 | +\textbf{JAglue},即ちJFMグルー・\textsf{xkanjiskip}・\textsf{kanjiskip}の | |
1865 | +3種類を一度に挿入することになっている.これは,\LuaTeX において欧文の合字・ | |
1866 | +カーニング処理がノードベースになったことに対応する変更である. | |
1867 | + | |
1868 | +\LuaTeX-jaにおける\textbf{JAglue}挿入処理では,下の図\ref{fig-clu}のよう | |
1869 | +に「塊」を単位にして行われる.大雑把にいうと,「塊」は文字とそれに付随す | |
1870 | +るノード達(アクセント位置補正用のkernや,イタリック補正)をまとめたもの | |
1871 | +であり,2つの塊の間には,ペナルティ,\verb+\vadjust+,whatsitなど,行組版 | |
1872 | +には関係しないものがある.そのため,…… | |
1873 | +%</ja> | |
1874 | + | |
1875 | +% \begin{figure}[!tb] | |
1876 | +% \unitlength=10mm | |
1877 | +% \end{figure} | |
1878 | + | |
1879 | +\subsection{Definition of a `cluster'} | |
1880 | + | |
1881 | +\begin{defn} | |
1882 | +A \emph{cluster} is a list of nodes in one of the following forms, with the \textit{id} of it: | |
1883 | +\begin{enumerate} | |
1884 | +\item Nodes whose value of\ \verb+\ltj@icflag+ is in $[3,15)$. These | |
1885 | + nodes come from a hbox which is already packaged, by unpackaging | |
1886 | + (\verb+\unhbox+). | |
1887 | + The \textit{id} is \textit{id\_pbox}. | |
1888 | +\item A inline math formula, including two \textit{math\_node}s at the boundary of it: | |
1889 | +HOGE | |
1890 | + The \textit{id} is \textit{id\_math}. | |
1891 | +\item A \textit{glyph\_node} with nodes which relate with it: | |
1892 | +HOGE | |
1893 | +The \textit{id} is \textit{id\_jglyph} or | |
1894 | +\textit{id\_glyph}, according to whether the \textit{glyph\_node} | |
1895 | +represents a Japanese character or not. | |
1896 | +\item An box-like node, that is, an hbox, an vbox and an rule (\verb+\vrule+). | |
1897 | +The \textit{id} is \textit{id\_hlist} if the node is an | |
1898 | + hbox which is not shifted vertically, or \textit{id\_box\_like} | |
1899 | + otherwise. | |
1900 | +\item A glue, a kern whose subtype is not 2~(\textit{accent}), and a discretionary break. | |
1901 | +The \textit{id} is \textit{id\_glue}, \textit{id\_kern} | |
1902 | + and \textit{id\_disc}, respectively. | |
1903 | +%Just a node which will \dots, \textit{i.e.}, a node which is \emph{not} one of the following: | |
1904 | +%\textit{ins\_node}, \textit{mark\_node}, \textit{adjust\_node}, \textit{whatsit\_node} | |
1905 | +%and \textit{penalty\_node}. | |
1906 | +\end{enumerate} | |
1907 | +We denote a cluster by \textit{Np}, \textit{Nq} and \textit{Nr}. | |
1908 | +\end{defn} | |
1909 | + | |
1910 | +Internally, a cluster is represented by a table $\textit{Np}$ with the following fields. | |
1416 | 1911 | |
1417 | -jfmglue.tex の内容をここに入れる | |
1912 | +\begin{description} | |
1913 | +\def\makelabel#1{\textbf{\textit{#1}}} | |
1914 | +\item[first, last] The first/last node of the cluster. | |
1915 | +\item[id] The \textit{id} in above definition. | |
1916 | +\item[nuc] | |
1917 | + | |
1918 | +% jachar | |
1919 | +\item[auto\_kspc, auto\_xspc] | |
1920 | +\item[xspc\_before, xspc\_after] | |
1921 | + | |
1922 | +% alchar, jachar | |
1923 | +\item[pre, post] | |
1924 | +\item[char] | |
1925 | +\item[class] | |
1926 | +\item[lend] | |
1927 | +\item[met, var] | |
1928 | +\end{description} | |
1418 | 1929 | \end{document} |
@@ -3,6 +3,6 @@ | ||
3 | 3 | \askforoverwritefalse |
4 | 4 | \generate{\file{man-ja.tex}{\from{manual.dtx}{ja}} |
5 | 5 | \file{man-en.tex}{\from{manual.dtx}{en}}} |
6 | -%\immediate\write18{lualatex man-ja} | |
6 | +\immediate\write18{lualatex man-ja} | |
7 | 7 | \immediate\write18{lualatex man-en} |
8 | 8 | \endbatchfile |
@@ -86,7 +86,7 @@ luatexja.jfont.define_jfm { | ||
86 | 86 | }, |
87 | 87 | |
88 | 88 | [99] = { -- box末尾 |
89 | - chars = {'boxbdd'}, | |
89 | + chars = {'boxbdd', 'parbdd'}, | |
90 | 90 | }, |
91 | 91 | |
92 | 92 | } |
\ No newline at end of file |
@@ -255,7 +255,6 @@ luatexja.jfont.define_jfm { | ||
255 | 255 | }, |
256 | 256 | |
257 | 257 | [99] = { -- box末尾 |
258 | - chars = {'boxbdd'}, | |
258 | + chars = {'boxbdd', 'parbdd'}, | |
259 | 259 | }, |
260 | - | |
261 | -} | |
\ No newline at end of file | ||
260 | +} |
@@ -1,6 +1,6 @@ | ||
1 | 1 | -- -*- coding: utf-8 -*- |
2 | 2 | -- jfm-ujis.lua: LuaTeX-ja 標準 JFM |
3 | --- besed on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX). | |
3 | +-- based on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX). | |
4 | 4 | |
5 | 5 | luatexja.jfont.define_jfm { |
6 | 6 | dir = 'yoko', |
@@ -133,7 +133,7 @@ luatexja.jfont.define_jfm { | ||
133 | 133 | }, |
134 | 134 | |
135 | 135 | [99] = { -- box末尾 |
136 | - chars = {'boxbdd'}, | |
136 | + chars = {'boxbdd', 'parbdd'}, | |
137 | 137 | }, |
138 | 138 | |
139 | 139 | } |
\ No newline at end of file |
@@ -52,7 +52,6 @@ | ||
52 | 52 | \@tempcnta\hour \multiply\@tempcnta 60\relax |
53 | 53 | \minute\time \advance\minute-\@tempcnta |
54 | 54 | \newif\if@stysize \@stysizefalse |
55 | -\newif\if@enablejfam \@enablejfamtrue | |
56 | 55 | \newif\if@mathrmmc \@mathrmmcfalse |
57 | 56 | \DeclareOption{a4paper}{\setcounter{@paper}{1}% |
58 | 57 | \setlength\paperheight {297mm}% |
@@ -140,7 +139,8 @@ | ||
140 | 139 | \if@compatibility |
141 | 140 | \@mathrmmctrue |
142 | 141 | \else |
143 | - \DeclareOption{disablejfam}{\@enablejfamfalse} | |
142 | + \DeclareOption{disablejfam}{% | |
143 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
144 | 144 | \DeclareOption{mathrmmc}{\@mathrmmctrue} |
145 | 145 | \fi |
146 | 146 | \DeclareOption{draft}{\setlength\overfullrule{5pt}} |
@@ -148,6 +148,15 @@ | ||
148 | 148 | \ExecuteOptions{a4paper,10pt,oneside,onecolumn,final} |
149 | 149 | \ProcessOptions\relax |
150 | 150 | \input{ltjsize1\@ptsize.clo} |
151 | +\directlua{luatexbase.add_to_callback('luatexja.load_jfm', | |
152 | + function (ji, jn) ji.chars['parbdd'] = 0; return ji end, | |
153 | + 'ltj.jclasses_load_jfm', 1)} | |
154 | +{\jfont\g=psft:Ryumin-Light:jfm=min } % loading jfm-min.lua | |
155 | +\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax | |
156 | +\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] psft:Ryumin-Light:jfm=min}{} | |
157 | +\DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] psft:GothicBBB-Medium:jfm=min;jfmvar=goth}{} | |
158 | +\ltjglobalsetparameter{differentjfm=both} | |
159 | +\directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')} | |
151 | 160 | \if@stysize |
152 | 161 | \setlength\columnsep{2\Cwd} |
153 | 162 | \else |
@@ -54,7 +54,6 @@ | ||
54 | 54 | \@tempcnta\hour \multiply\@tempcnta 60\relax |
55 | 55 | \minute\time \advance\minute-\@tempcnta |
56 | 56 | \newif\if@stysize \@stysizefalse |
57 | -\newif\if@enablejfam \@enablejfamtrue | |
58 | 57 | \newif\if@mathrmmc \@mathrmmcfalse |
59 | 58 | \DeclareOption{a4paper}{\setcounter{@paper}{1}% |
60 | 59 | \setlength\paperheight {297mm}% |
@@ -148,7 +147,8 @@ | ||
148 | 147 | \if@compatibility |
149 | 148 | \@mathrmmctrue |
150 | 149 | \else |
151 | - \DeclareOption{disablejfam}{\@enablejfamfalse} | |
150 | + \DeclareOption{disablejfam}{% | |
151 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
152 | 152 | \DeclareOption{mathrmmc}{\@mathrmmctrue} |
153 | 153 | \fi |
154 | 154 | \DeclareOption{draft}{\setlength\overfullrule{5pt}} |
@@ -156,6 +156,15 @@ | ||
156 | 156 | \ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright} |
157 | 157 | \ProcessOptions\relax |
158 | 158 | \input{ltjbk1\@ptsize.clo} |
159 | +\directlua{luatexbase.add_to_callback('luatexja.load_jfm', | |
160 | + function (ji, jn) ji.chars['parbdd'] = 0; return ji end, | |
161 | + 'ltj.jclasses_load_jfm', 1)} | |
162 | +{\jfont\g=psft:Ryumin-Light:jfm=min } % loading jfm-min.lua | |
163 | +\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax | |
164 | +\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] psft:Ryumin-Light:jfm=min}{} | |
165 | +\DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] psft:GothicBBB-Medium:jfm=min;jfmvar=goth}{} | |
166 | +\ltjglobalsetparameter{differentjfm=both} | |
167 | +\directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')} | |
159 | 168 | \if@stysize |
160 | 169 | \setlength\columnsep{2\Cwd} |
161 | 170 | \else |
@@ -8,9 +8,9 @@ | ||
8 | 8 | % This file is part of the pLaTeX2e system. |
9 | 9 | % ----------------------------------------- |
10 | 10 | % |
11 | -% \fi | |
11 | +% \fi | |
12 | 12 | % |
13 | -% \CheckSum{4465} | |
13 | +% \CheckSum{4475} | |
14 | 14 | %% \CharacterTable |
15 | 15 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
16 | 16 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
@@ -153,8 +153,11 @@ | ||
153 | 153 | % 全ての変更点を知りたい場合は、|jclasses.dtx| と |ltjclasses.dtx| で |diff| を |
154 | 154 | % とって下さい。 |
155 | 155 | % \begin{itemize} |
156 | -% \item |disablejfam| オプションが効かなくしてあります。互換性のためにオプション | |
157 | -% 自体は残してあります. | |
156 | +% \item |disablejfam| オプションを無効化。もし | |
157 | +% \begin{quotation} | |
158 | +% |! LaTeX Error: Too many math alphabets used in version ****.| | |
159 | +% \end{quotation} | |
160 | +% のエラーが起こった場合は、|lualatex-math| パッケージを読み込んでみて下さい。 | |
158 | 161 | % \item 出力 PDF の用紙サイズが自動的に設定されるようにしてあります。 |
159 | 162 | % \item \cs{if西暦}、\cs{西暦}、\cs{和暦}をそれぞれ\cs{ifSeireki}, \cs{Seireki}, |
160 | 163 | % \cs{Wareki} に変更してあります。これはデフォルトの漢字のカテゴリコードが12で |
@@ -250,13 +253,7 @@ | ||
250 | 253 | % \end{macrocode} |
251 | 254 | % \end{macro} |
252 | 255 | % |
253 | -% \begin{macro}{\if@enablejfam} | |
254 | -% \changes{v1.1b}{1997/01/28}{Add \cs{if@enablejfam}} | |
255 | -% 日本語ファミリを宣言するために用いるフラグです。 | |
256 | -% 互換性のために残してあるもので、実際には用いられません。 | |
257 | -% \begin{macrocode} | |
258 | -\newif\if@enablejfam \@enablejfamtrue | |
259 | -% \end{macrocode} | |
256 | +% \begin{macro}{\if@mathrmmc} | |
260 | 257 | % 和欧文両対応の数式文字コマンドを有効にするときに用いるフラグです。 |
261 | 258 | % マクロの展開順序が複雑になるのを避けるため、 |
262 | 259 | % デフォルトではfalseとしてあります。 |
@@ -454,7 +451,9 @@ | ||
454 | 451 | % p\TeX では数式ファミリの数が16個だったので日本語ファミリ宣言を抑制する |
455 | 452 | % |disablejfam| オプションが用意されていましたが、Lua\TeX では Omega 拡張が |
456 | 453 | % 取り込まれて数式ファミリは256個まで使用できるため、このオプションは必要ありません。 |
457 | -% しかし、互換性のために残しておきます。 | |
454 | +% ただし、\LaTeXe カーネルでは未だに数式ファミリの数は16個に制限されているので、 | |
455 | +% 実際に使用可能な数式ファミリの数を増やすためには |lualatex-math| パッケージを | |
456 | +% 読み込む必要があることに注意が必要です。 | |
458 | 457 | % |
459 | 458 | % |mathrmmc|オプションは、 |
460 | 459 | % |\mathrm|と|\mathbf|を和欧文両対応にするためのクラスオプションです。 |
@@ -463,7 +462,8 @@ | ||
463 | 462 | \if@compatibility |
464 | 463 | \@mathrmmctrue |
465 | 464 | \else |
466 | - \DeclareOption{disablejfam}{\@enablejfamfalse} | |
465 | + \DeclareOption{disablejfam}{% | |
466 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
467 | 467 | \DeclareOption{mathrmmc}{\@mathrmmctrue} |
468 | 468 | \fi |
469 | 469 | % \end{macrocode} |
@@ -510,6 +510,32 @@ | ||
510 | 510 | % |
511 | 511 | % \section{フォント} |
512 | 512 | % |
513 | +% Lua\LaTeX-jaの標準では、OTFパッケージ由来のメトリックが使われるようになっています。 | |
514 | +% 本クラスでは、「p\TeX の組版と互換性をできだけ持たせる」例を提示するため、 | |
515 | +% \begin{itemize} | |
516 | +% \item メトリックを\texttt{min10.tfm}ベースの\texttt{jfm-min.lua}に変更。 | |
517 | +% \item 明朝とゴシックは両方とも\texttt{jfm-min.lua}を用いるが、 | |
518 | +% 和文処理用グルー挿入時には「違うメトリックを使用」として思わせる。 | |
519 | +% \item p\TeX と同様に、「異なるメトリックの2つの和文文字」の間には、両者から定める | |
520 | +% グルーを両方挿入する。 | |
521 | +% \item calllback を利用し、標準で用いる\texttt{jfm-min.lua}を、段落始めの括弧が全角二分下がりになるように内部で変更している。 | |
522 | +% | |
523 | +% \end{itemize} | |
524 | +% | |
525 | +% \begin{macrocode} | |
526 | +%<*article|report|book> | |
527 | +\directlua{luatexbase.add_to_callback('luatexja.load_jfm', | |
528 | + function (ji, jn) ji.chars['parbdd'] = 0; return ji end, | |
529 | + 'ltj.jclasses_load_jfm', 1)} | |
530 | +{\jfont\g=psft:Ryumin-Light:jfm=min } % loading jfm-min.lua | |
531 | +\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax | |
532 | +\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] psft:Ryumin-Light:jfm=min}{} | |
533 | +\DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] psft:GothicBBB-Medium:jfm=min;jfmvar=goth}{} | |
534 | +\ltjglobalsetparameter{differentjfm=both} | |
535 | +\directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')} | |
536 | +%</article|report|book> | |
537 | +% \end{macrocode} | |
538 | +% | |
513 | 539 | % ここでは、\LaTeX{}のフォントサイズコマンドの定義をしています。 |
514 | 540 | % フォントサイズコマンドの定義は、次のコマンドを用います。 |
515 | 541 | % |
@@ -53,7 +53,6 @@ | ||
53 | 53 | \@tempcnta\hour \multiply\@tempcnta 60\relax |
54 | 54 | \minute\time \advance\minute-\@tempcnta |
55 | 55 | \newif\if@stysize \@stysizefalse |
56 | -\newif\if@enablejfam \@enablejfamtrue | |
57 | 56 | \newif\if@mathrmmc \@mathrmmcfalse |
58 | 57 | \DeclareOption{a4paper}{\setcounter{@paper}{1}% |
59 | 58 | \setlength\paperheight {297mm}% |
@@ -146,7 +145,8 @@ | ||
146 | 145 | \if@compatibility |
147 | 146 | \@mathrmmctrue |
148 | 147 | \else |
149 | - \DeclareOption{disablejfam}{\@enablejfamfalse} | |
148 | + \DeclareOption{disablejfam}{% | |
149 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
150 | 150 | \DeclareOption{mathrmmc}{\@mathrmmctrue} |
151 | 151 | \fi |
152 | 152 | \DeclareOption{draft}{\setlength\overfullrule{5pt}} |
@@ -154,6 +154,15 @@ | ||
154 | 154 | \ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany} |
155 | 155 | \ProcessOptions\relax |
156 | 156 | \input{ltjsize1\@ptsize.clo} |
157 | +\directlua{luatexbase.add_to_callback('luatexja.load_jfm', | |
158 | + function (ji, jn) ji.chars['parbdd'] = 0; return ji end, | |
159 | + 'ltj.jclasses_load_jfm', 1)} | |
160 | +{\jfont\g=psft:Ryumin-Light:jfm=min } % loading jfm-min.lua | |
161 | +\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax | |
162 | +\DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] psft:Ryumin-Light:jfm=min}{} | |
163 | +\DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] psft:GothicBBB-Medium:jfm=min;jfmvar=goth}{} | |
164 | +\ltjglobalsetparameter{differentjfm=both} | |
165 | +\directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')} | |
157 | 166 | \if@stysize |
158 | 167 | \setlength\columnsep{2\Cwd} |
159 | 168 | \else |
@@ -179,7 +179,8 @@ | ||
179 | 179 | &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup |
180 | 180 | \tabskip\z@skip\cr |
181 | 181 | }} |
182 | -\DeclareOption{disablejfam}{\@enablejfamfalse} | |
182 | +\DeclareOption{disablejfam}{% | |
183 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
183 | 184 | \newif\ifdraft |
184 | 185 | \DeclareOption{draft}{\drafttrue \setlength\overfullrule{5pt}} |
185 | 186 | \DeclareOption{final}{\draftfalse \setlength\overfullrule{0pt}} |
@@ -189,7 +190,10 @@ | ||
189 | 190 | \jisfontfalse |
190 | 191 | \newif\ifptexjis |
191 | 192 | \ptexjisfalse |
192 | -\DeclareOption{winjis}{}\DeclareOption{uplatex}{} % These 2 options are ignored. | |
193 | +\DeclareOption{winjis}{% | |
194 | + \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}} | |
195 | +\DeclareOption{uplatex}{% | |
196 | + \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}} | |
193 | 197 | \DeclareOption{mingoth}{\mingothtrue} |
194 | 198 | \DeclareOption{ptexjis}{\ptexjistrue} |
195 | 199 | \DeclareOption{jis}{\jisfonttrue} |
@@ -836,8 +840,8 @@ | ||
836 | 840 | \hskip -\@tempskipa |
837 | 841 | \else |
838 | 842 | \clubpenalty \@clubpenalty |
839 | - \everypar{\everyparhook}% | |
840 | - \fi\everyparhook}% | |
843 | + \everypar{}% | |
844 | + \fi}% | |
841 | 845 | \else |
842 | 846 | \par \nobreak |
843 | 847 | \vskip \@tempskipa |
@@ -1349,113 +1353,6 @@ | ||
1349 | 1353 | \parindent 1\zw |
1350 | 1354 | \noindent |
1351 | 1355 | \llap{\@makefnmark\hskip0.3\zw}#1} |
1352 | -\def\@inhibitglue{% | |
1353 | - \futurelet\@let@token\@@inhibitglue} | |
1354 | -\def\@@inhibitglue{% | |
1355 | - \ifx\@let@token「 | |
1356 | - \inhibitglue | |
1357 | - \else | |
1358 | - \ifx\@let@token( | |
1359 | - \inhibitglue | |
1360 | - \else | |
1361 | - \ifx\@let@token『 | |
1362 | - \inhibitglue | |
1363 | - \else | |
1364 | - \ifx\@let@token[ | |
1365 | - \inhibitglue | |
1366 | - \fi | |
1367 | - \fi | |
1368 | - \fi | |
1369 | - \fi} | |
1370 | -\let\everyparhook=\@inhibitglue | |
1371 | -\AtBeginDocument{\everypar{\everyparhook}} | |
1372 | -\def\@doendpe{% | |
1373 | - \@endpetrue | |
1374 | - \def\par{% | |
1375 | - \@restorepar\everypar{\everyparhook}\par\@endpefalse}% | |
1376 | - \everypar{{\setbox\z@\lastbox}\everypar{\everyparhook}\@endpefalse\everyparhook}} | |
1377 | -\def\@item[#1]{% | |
1378 | - \if@noparitem | |
1379 | - \@donoparitem | |
1380 | - \else | |
1381 | - \if@inlabel | |
1382 | - \indent \par | |
1383 | - \fi | |
1384 | - \ifhmode | |
1385 | - \unskip\unskip \par | |
1386 | - \fi | |
1387 | - \if@newlist | |
1388 | - \if@nobreak | |
1389 | - \@nbitem | |
1390 | - \else | |
1391 | - \addpenalty\@beginparpenalty | |
1392 | - \addvspace\@topsep | |
1393 | - \addvspace{-\parskip}% | |
1394 | - \fi | |
1395 | - \else | |
1396 | - \addpenalty\@itempenalty | |
1397 | - \addvspace\itemsep | |
1398 | - \fi | |
1399 | - \global\@inlabeltrue | |
1400 | - \fi | |
1401 | - \everypar{% | |
1402 | - \@minipagefalse | |
1403 | - \global\@newlistfalse | |
1404 | - \if@inlabel | |
1405 | - \global\@inlabelfalse | |
1406 | - {\setbox\z@\lastbox | |
1407 | - \ifvoid\z@ | |
1408 | - \kern-\itemindent | |
1409 | - \fi}% | |
1410 | - \box\@labels | |
1411 | - \penalty\z@ | |
1412 | - \fi | |
1413 | - \if@nobreak | |
1414 | - \@nobreakfalse | |
1415 | - \clubpenalty \@M | |
1416 | - \else | |
1417 | - \clubpenalty \@clubpenalty | |
1418 | - \everypar{\everyparhook}% | |
1419 | - \fi\everyparhook}% | |
1420 | - \if@noitemarg | |
1421 | - \@noitemargfalse | |
1422 | - \if@nmbrlist | |
1423 | - \refstepcounter\@listctr | |
1424 | - \fi | |
1425 | - \fi | |
1426 | - \sbox\@tempboxa{\makelabel{#1}}% | |
1427 | - \global\setbox\@labels\hbox{% | |
1428 | - \unhbox\@labels | |
1429 | - \hskip \itemindent | |
1430 | - \hskip -\labelwidth | |
1431 | - \hskip -\labelsep | |
1432 | - \ifdim \wd\@tempboxa >\labelwidth | |
1433 | - \box\@tempboxa | |
1434 | - \else | |
1435 | - \hbox to\labelwidth {\unhbox\@tempboxa}% | |
1436 | - \fi | |
1437 | - \hskip \labelsep}% | |
1438 | - \ignorespaces} | |
1439 | -\def\@afterheading{% | |
1440 | - \@nobreaktrue | |
1441 | - \everypar{% | |
1442 | - \if@nobreak | |
1443 | - \@nobreakfalse | |
1444 | - \clubpenalty \@M | |
1445 | - \if@afterindent \else | |
1446 | - {\setbox\z@\lastbox}% | |
1447 | - \fi | |
1448 | - \else | |
1449 | - \clubpenalty \@clubpenalty | |
1450 | - \everypar{\everyparhook}% | |
1451 | - \fi\everyparhook}} | |
1452 | -\def\@gnewline #1{% | |
1453 | - \ifvmode | |
1454 | - \@nolnerr | |
1455 | - \else | |
1456 | - \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null | |
1457 | - \inhibitglue \ignorespaces | |
1458 | - \fi} | |
1459 | 1356 | \def\Shou#1{\hbox{$\m@th$% |
1460 | 1357 | \csname S@\f@size\endcsname |
1461 | 1358 | \fontsize\sf@size\z@ |
@@ -183,7 +183,8 @@ | ||
183 | 183 | &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup |
184 | 184 | \tabskip\z@skip\cr |
185 | 185 | }} |
186 | -\DeclareOption{disablejfam}{\@enablejfamfalse} | |
186 | +\DeclareOption{disablejfam}{% | |
187 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
187 | 188 | \newif\ifdraft |
188 | 189 | \DeclareOption{draft}{\drafttrue \setlength\overfullrule{5pt}} |
189 | 190 | \DeclareOption{final}{\draftfalse \setlength\overfullrule{0pt}} |
@@ -193,7 +194,10 @@ | ||
193 | 194 | \jisfontfalse |
194 | 195 | \newif\ifptexjis |
195 | 196 | \ptexjisfalse |
196 | -\DeclareOption{winjis}{}\DeclareOption{uplatex}{} % These 2 options are ignored. | |
197 | +\DeclareOption{winjis}{% | |
198 | + \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}} | |
199 | +\DeclareOption{uplatex}{% | |
200 | + \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}} | |
197 | 201 | \DeclareOption{mingoth}{\mingothtrue} |
198 | 202 | \DeclareOption{ptexjis}{\ptexjistrue} |
199 | 203 | \DeclareOption{jis}{\jisfonttrue} |
@@ -842,8 +846,8 @@ | ||
842 | 846 | \hskip -\@tempskipa |
843 | 847 | \else |
844 | 848 | \clubpenalty \@clubpenalty |
845 | - \everypar{\everyparhook}% | |
846 | - \fi\everyparhook}% | |
849 | + \everypar{}% | |
850 | + \fi}% | |
847 | 851 | \else |
848 | 852 | \par \nobreak |
849 | 853 | \vskip \@tempskipa |
@@ -1424,113 +1428,6 @@ | ||
1424 | 1428 | \parindent 1\zw |
1425 | 1429 | \noindent |
1426 | 1430 | \llap{\@makefnmark\hskip0.3\zw}#1} |
1427 | -\def\@inhibitglue{% | |
1428 | - \futurelet\@let@token\@@inhibitglue} | |
1429 | -\def\@@inhibitglue{% | |
1430 | - \ifx\@let@token「 | |
1431 | - \inhibitglue | |
1432 | - \else | |
1433 | - \ifx\@let@token( | |
1434 | - \inhibitglue | |
1435 | - \else | |
1436 | - \ifx\@let@token『 | |
1437 | - \inhibitglue | |
1438 | - \else | |
1439 | - \ifx\@let@token[ | |
1440 | - \inhibitglue | |
1441 | - \fi | |
1442 | - \fi | |
1443 | - \fi | |
1444 | - \fi} | |
1445 | -\let\everyparhook=\@inhibitglue | |
1446 | -\AtBeginDocument{\everypar{\everyparhook}} | |
1447 | -\def\@doendpe{% | |
1448 | - \@endpetrue | |
1449 | - \def\par{% | |
1450 | - \@restorepar\everypar{\everyparhook}\par\@endpefalse}% | |
1451 | - \everypar{{\setbox\z@\lastbox}\everypar{\everyparhook}\@endpefalse\everyparhook}} | |
1452 | -\def\@item[#1]{% | |
1453 | - \if@noparitem | |
1454 | - \@donoparitem | |
1455 | - \else | |
1456 | - \if@inlabel | |
1457 | - \indent \par | |
1458 | - \fi | |
1459 | - \ifhmode | |
1460 | - \unskip\unskip \par | |
1461 | - \fi | |
1462 | - \if@newlist | |
1463 | - \if@nobreak | |
1464 | - \@nbitem | |
1465 | - \else | |
1466 | - \addpenalty\@beginparpenalty | |
1467 | - \addvspace\@topsep | |
1468 | - \addvspace{-\parskip}% | |
1469 | - \fi | |
1470 | - \else | |
1471 | - \addpenalty\@itempenalty | |
1472 | - \addvspace\itemsep | |
1473 | - \fi | |
1474 | - \global\@inlabeltrue | |
1475 | - \fi | |
1476 | - \everypar{% | |
1477 | - \@minipagefalse | |
1478 | - \global\@newlistfalse | |
1479 | - \if@inlabel | |
1480 | - \global\@inlabelfalse | |
1481 | - {\setbox\z@\lastbox | |
1482 | - \ifvoid\z@ | |
1483 | - \kern-\itemindent | |
1484 | - \fi}% | |
1485 | - \box\@labels | |
1486 | - \penalty\z@ | |
1487 | - \fi | |
1488 | - \if@nobreak | |
1489 | - \@nobreakfalse | |
1490 | - \clubpenalty \@M | |
1491 | - \else | |
1492 | - \clubpenalty \@clubpenalty | |
1493 | - \everypar{\everyparhook}% | |
1494 | - \fi\everyparhook}% | |
1495 | - \if@noitemarg | |
1496 | - \@noitemargfalse | |
1497 | - \if@nmbrlist | |
1498 | - \refstepcounter\@listctr | |
1499 | - \fi | |
1500 | - \fi | |
1501 | - \sbox\@tempboxa{\makelabel{#1}}% | |
1502 | - \global\setbox\@labels\hbox{% | |
1503 | - \unhbox\@labels | |
1504 | - \hskip \itemindent | |
1505 | - \hskip -\labelwidth | |
1506 | - \hskip -\labelsep | |
1507 | - \ifdim \wd\@tempboxa >\labelwidth | |
1508 | - \box\@tempboxa | |
1509 | - \else | |
1510 | - \hbox to\labelwidth {\unhbox\@tempboxa}% | |
1511 | - \fi | |
1512 | - \hskip \labelsep}% | |
1513 | - \ignorespaces} | |
1514 | -\def\@afterheading{% | |
1515 | - \@nobreaktrue | |
1516 | - \everypar{% | |
1517 | - \if@nobreak | |
1518 | - \@nobreakfalse | |
1519 | - \clubpenalty \@M | |
1520 | - \if@afterindent \else | |
1521 | - {\setbox\z@\lastbox}% | |
1522 | - \fi | |
1523 | - \else | |
1524 | - \clubpenalty \@clubpenalty | |
1525 | - \everypar{\everyparhook}% | |
1526 | - \fi\everyparhook}} | |
1527 | -\def\@gnewline #1{% | |
1528 | - \ifvmode | |
1529 | - \@nolnerr | |
1530 | - \else | |
1531 | - \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null | |
1532 | - \inhibitglue \ignorespaces | |
1533 | - \fi} | |
1534 | 1431 | \def\Shou#1{\hbox{$\m@th$% |
1535 | 1432 | \csname S@\f@size\endcsname |
1536 | 1433 | \fontsize\sf@size\z@ |
@@ -22,7 +22,7 @@ | ||
22 | 22 | % ----------------------------------------- |
23 | 23 | % |
24 | 24 | % \fi |
25 | -% \CheckSum{5224} | |
25 | +% \CheckSum{5037} | |
26 | 26 | %% \CharacterTable |
27 | 27 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
28 | 28 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
@@ -94,7 +94,7 @@ | ||
94 | 94 | % \end{tabular} |
95 | 95 | % \end{quote} |
96 | 96 | % |
97 | -% |ltjclasses| と大きく違うのは以下の点です。 | |
97 | +% |ltjclasses| と違うのは以下の点です。 | |
98 | 98 | % |
99 | 99 | % \paragraph{サイズオプションの扱いが違う} |
100 | 100 | % |
@@ -107,20 +107,23 @@ | ||
107 | 107 | % 43ポイント,12Q,14Qの指定を可能にしています。 |
108 | 108 | % |
109 | 109 | % \subsection{\texttt{jsclasses.dtx} からの主な変更点} |
110 | -% 全ての変更点を知りたい場合は、|jsclasses.dtx| と |ltjsclasses.dtx| で |diff| を | |
110 | +% 全ての変更点を知りたい場合は,|jsclasses.dtx| と |ltjsclasses.dtx| で |diff| を | |
111 | 111 | % とって下さい。 |
112 | -% なお,オプションで無効にしたものがいくつかありますが,互換性のために | |
113 | -% オプション自体は残してあります(つまり,削除されたオプションが指定されていても | |
114 | -% コンパイルは通る)。 | |
115 | 112 | % \begin{itemize} |
116 | -% \item フォントメトリック関係のオプション |winjis| は単に無視されます. | |
117 | -% \item 標準では|jfm-ujis.lua|(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します. | |
118 | -% \item up\TeX 関係のオプションを削除してあります。 | |
119 | -% \item |disablejfam| オプションが無効になっています。 | |
120 | -% ←本当にそれでいい? \LaTeX カーネルレベルではまだ16個のままのような気がします. | |
113 | +% \item フォントメトリック関係のオプション |winjis| は単に無視されます。 | |
114 | +% \item 標準では |jfm-ujis.lua|(Lua\TeX-ja標準のメトリック,OTFパッケージのものがベース)を使用します。 | |
115 | +% \item |uplatex| オプションを削除してあります。 | |
116 | +% \item |disablejfam| オプションが無効になっています。もし | |
117 | +% \begin{quotation} | |
118 | +% |! LaTeX Error: Too many math alphabets used in version ****.| | |
119 | +% \end{quotation} | |
120 | +% のエラーが起こった場合は,|lualatex-math| パッケージを読み込んでみて下さい。 | |
121 | 121 | % \item |papersize| オプションの指定に関わらず PDF のページサイズは適切に |
122 | 122 | % 設定されます。 |
123 | -% \item 「\texttt{amsmath} との衝突の回避」のコードは,上流で既に対処されている上に | |
123 | +% \item Lua\TeX-ja 同梱のメトリックを用いる限りは,段落の頭にグルーは挿入されません。 | |
124 | +% そのため,オリジナルの |jsclasses.dtx| 内にあったhack(|\everyparhook|)は不要になったので, | |
125 | +% 削除しました。 | |
126 | +% \item 「\texttt{amsmath} との衝突の回避」のコードは,上流で既に対処されているうえ, | |
124 | 127 | % これがあると |grfext.sty| を読み込んだ際にエラーを引き起こすので削除しました。 |
125 | 128 | % \item |\小|,|\上小|,|\if西暦|,|\西暦|,|\和暦|をそれぞれ |
126 | 129 | % |\Shou|, |\UeShou|, |\ifSeireki|, |\Seireki|, |\Wareki| に変更してあります。 |
@@ -479,11 +482,13 @@ | ||
479 | 482 | % |
480 | 483 | % p\TeX では数式中では16通りのフォントしか使えませんでしたが,Lua\TeX では |
481 | 484 | % Omega 拡張が取り込まれていて256通りのフォントが使えます。 |
482 | -% そのためこのオプションは無効にしてありますが,互換性のためにオプション自体は | |
483 | -% 残しておきます。 | |
485 | +% ただし,\LaTeXe カーネルでは未だに数式ファミリの数は16個に制限されているので, | |
486 | +% 実際に使用可能な数式ファミリの数を増やすためには |lualatex-math| パッケージを | |
487 | +% 読み込む必要があることに注意が必要です。 | |
484 | 488 | % |
485 | 489 | % \begin{macrocode} |
486 | -\DeclareOption{disablejfam}{\@enablejfamfalse} | |
490 | +\DeclareOption{disablejfam}{% | |
491 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
487 | 492 | % \end{macrocode} |
488 | 493 | % |
489 | 494 | % \paragraph{ドラフト} |
@@ -503,7 +508,7 @@ | ||
503 | 508 | % というオプションを指定します。 |
504 | 509 | % p\TeX でよく利用される \texttt{jis} フォントメトリックと互換のメトリックを使いたい場合は, |
505 | 510 | % \texttt{ptexjis} というオプションを指定します。 |
506 | -% \texttt{winjis} メトリックは用済みのため,\texttt{winjis} オプションは無視されます. | |
511 | +% \texttt{winjis} メトリックは用済みのため,\texttt{winjis} オプションは無視されます。 | |
507 | 512 | % |
508 | 513 | % \begin{macrocode} |
509 | 514 | \newif\ifmingoth |
@@ -512,7 +517,10 @@ | ||
512 | 517 | \jisfontfalse |
513 | 518 | \newif\ifptexjis |
514 | 519 | \ptexjisfalse |
515 | -\DeclareOption{winjis}{}\DeclareOption{uplatex}{} % These 2 options are ignored. | |
520 | +\DeclareOption{winjis}{% | |
521 | + \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}} | |
522 | +\DeclareOption{uplatex}{% | |
523 | + \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}} | |
516 | 524 | \DeclareOption{mingoth}{\mingothtrue} |
517 | 525 | \DeclareOption{ptexjis}{\ptexjistrue} |
518 | 526 | \DeclareOption{jis}{\jisfonttrue} |
@@ -705,9 +713,9 @@ | ||
705 | 713 | % \pTeX (アスキーが日本語化した\TeX )では,例えば従来のフォントメトリック |
706 | 714 | % \texttt{min10} やJISフォントメトリックでは「公称10ポイントの和文フォントは, |
707 | 715 | % 実際には9.62216ptで出力される(メトリック側で0.962216倍される)」という |
708 | -% 仕様になっています. | |
709 | -% 一方,Lua\TeX-jaの提供するメトリックでは,そのようなことはありません. | |
710 | -% 公称10ポイントの和文フォントは,10ポイントで出力されます. | |
716 | +% 仕様になっています。 | |
717 | +% 一方,Lua\TeX-jaの提供するメトリックでは,そのようなことはありません。 | |
718 | +% 公称10ポイントの和文フォントは,10ポイントで出力されます。 | |
711 | 719 | % |
712 | 720 | % この|ltjsclasses|でも,派生元の|jsclasses|と同じように, |
713 | 721 | % この公称10ポイントのフォントをここでは13級に縮小して |
@@ -803,9 +811,9 @@ | ||
803 | 811 | % \end{macrocode} |
804 | 812 | %% |
805 | 813 | % Lua\TeX-jaでは和文組版に伴うグルーはノードベースで挿入するようになり,また |
806 | -% 欧文・和文間のグルーとイタリック補正は干渉しないようになりました. | |
814 | +% 欧文・和文間のグルーとイタリック補正は干渉しないようになりました。 | |
807 | 815 | % まだ「和文の斜体」についてはLua\LaTeX カーネル側でまともな対応がされていませんが, |
808 | -% |jsclasses.dtx|で行われていた|\textmc|, |\textgt|の再定義は不要のように思われます. | |
816 | +% |jsclasses.dtx|で行われていた|\textmc|, |\textgt|の再定義は不要のように思われます。 | |
809 | 817 | % |
810 | 818 | % 新クラスでも数式内で日本語が使えるようにしました。 |
811 | 819 | % |
@@ -2387,7 +2395,6 @@ | ||
2387 | 2395 | \@tempskipa -\@tempskipa \@afterindentfalse |
2388 | 2396 | \fi |
2389 | 2397 | \if@nobreak |
2390 | -% \everypar{\everyparhook}% これは間違い | |
2391 | 2398 | \everypar{}% |
2392 | 2399 | \else |
2393 | 2400 | \addpenalty\@secpenalty |
@@ -2411,7 +2418,6 @@ | ||
2411 | 2418 | % |
2412 | 2419 | % |\@sect| と |\@xsect| は, |
2413 | 2420 | % 前のアキがちょうどゼロの場合にもうまくいくように,多少変えてあります。 |
2414 | -% |\everyparhook| も挿入しています。 | |
2415 | 2421 | % |
2416 | 2422 | % \begin{macrocode} |
2417 | 2423 | \def\@sect#1#2#3#4#5#6[#7]#8{% |
@@ -2455,6 +2461,8 @@ | ||
2455 | 2461 | % 二つ挿入した |\everyparhook| のうち後者が |\paragraph| 類の後で2回実行され, |
2456 | 2462 | % それ以降は前者が実行されます。 |
2457 | 2463 | % |
2464 | +% [2011-10-05] Lua\TeX-jaでは|\everyparhook|は不要なので削除。 | |
2465 | +% | |
2458 | 2466 | % \begin{macrocode} |
2459 | 2467 | \def\@xsect#1{% |
2460 | 2468 | % 見出しの後ろの空きを \@tempskipa にセット |
@@ -2474,8 +2482,8 @@ | ||
2474 | 2482 | \hskip -\@tempskipa |
2475 | 2483 | \else |
2476 | 2484 | \clubpenalty \@clubpenalty |
2477 | - \everypar{\everyparhook}% | |
2478 | - \fi\everyparhook}% | |
2485 | + \everypar{}% | |
2486 | + \fi}% | |
2479 | 2487 | \else |
2480 | 2488 | \par \nobreak |
2481 | 2489 | \vskip \@tempskipa |
@@ -4666,151 +4674,6 @@ | ||
4666 | 4674 | % \end{macrocode} |
4667 | 4675 | % \end{macro} |
4668 | 4676 | % |
4669 | -% \section{段落の頭へのグルー挿入禁止} | |
4670 | -% | |
4671 | -% 段落頭のかぎかっこなどを見かけ1字半下げから全角1字下げに直します。 | |
4672 | -% | |
4673 | -% \begin{macrocode} | |
4674 | -\def\@inhibitglue{% | |
4675 | - \futurelet\@let@token\@@inhibitglue} | |
4676 | -\def\@@inhibitglue{% | |
4677 | - \ifx\@let@token「 | |
4678 | - \inhibitglue | |
4679 | - \else | |
4680 | - \ifx\@let@token( | |
4681 | - \inhibitglue | |
4682 | - \else | |
4683 | - \ifx\@let@token『 | |
4684 | - \inhibitglue | |
4685 | - \else | |
4686 | - \ifx\@let@token[ | |
4687 | - \inhibitglue | |
4688 | - \fi | |
4689 | - \fi | |
4690 | - \fi | |
4691 | - \fi} | |
4692 | -\let\everyparhook=\@inhibitglue | |
4693 | -\AtBeginDocument{\everypar{\everyparhook}} | |
4694 | -% \end{macrocode} | |
4695 | -% | |
4696 | -% これだけではいけないようです。あちこちに |\everypar| を初期化するコマンドが | |
4697 | -% 隠されていました。 | |
4698 | -% | |
4699 | -% まず,環境の直後の段落です。 | |
4700 | -% | |
4701 | -% \begin{macrocode} | |
4702 | -\def\@doendpe{% | |
4703 | - \@endpetrue | |
4704 | - \def\par{% | |
4705 | - \@restorepar\everypar{\everyparhook}\par\@endpefalse}% | |
4706 | - \everypar{{\setbox\z@\lastbox}\everypar{\everyparhook}\@endpefalse\everyparhook}} | |
4707 | -% \end{macrocode} | |
4708 | -% | |
4709 | -% |\item| 命令の直後です。 | |
4710 | -% | |
4711 | -% \begin{macrocode} | |
4712 | -\def\@item[#1]{% | |
4713 | - \if@noparitem | |
4714 | - \@donoparitem | |
4715 | - \else | |
4716 | - \if@inlabel | |
4717 | - \indent \par | |
4718 | - \fi | |
4719 | - \ifhmode | |
4720 | - \unskip\unskip \par | |
4721 | - \fi | |
4722 | - \if@newlist | |
4723 | - \if@nobreak | |
4724 | - \@nbitem | |
4725 | - \else | |
4726 | - \addpenalty\@beginparpenalty | |
4727 | - \addvspace\@topsep | |
4728 | - \addvspace{-\parskip}% | |
4729 | - \fi | |
4730 | - \else | |
4731 | - \addpenalty\@itempenalty | |
4732 | - \addvspace\itemsep | |
4733 | - \fi | |
4734 | - \global\@inlabeltrue | |
4735 | - \fi | |
4736 | - \everypar{% | |
4737 | - \@minipagefalse | |
4738 | - \global\@newlistfalse | |
4739 | - \if@inlabel | |
4740 | - \global\@inlabelfalse | |
4741 | - {\setbox\z@\lastbox | |
4742 | - \ifvoid\z@ | |
4743 | - \kern-\itemindent | |
4744 | - \fi}% | |
4745 | - \box\@labels | |
4746 | - \penalty\z@ | |
4747 | - \fi | |
4748 | - \if@nobreak | |
4749 | - \@nobreakfalse | |
4750 | - \clubpenalty \@M | |
4751 | - \else | |
4752 | - \clubpenalty \@clubpenalty | |
4753 | - \everypar{\everyparhook}% | |
4754 | - \fi\everyparhook}% | |
4755 | - \if@noitemarg | |
4756 | - \@noitemargfalse | |
4757 | - \if@nmbrlist | |
4758 | - \refstepcounter\@listctr | |
4759 | - \fi | |
4760 | - \fi | |
4761 | - \sbox\@tempboxa{\makelabel{#1}}% | |
4762 | - \global\setbox\@labels\hbox{% | |
4763 | - \unhbox\@labels | |
4764 | - \hskip \itemindent | |
4765 | - \hskip -\labelwidth | |
4766 | - \hskip -\labelsep | |
4767 | - \ifdim \wd\@tempboxa >\labelwidth | |
4768 | - \box\@tempboxa | |
4769 | - \else | |
4770 | - \hbox to\labelwidth {\unhbox\@tempboxa}% | |
4771 | - \fi | |
4772 | - \hskip \labelsep}% | |
4773 | - \ignorespaces} | |
4774 | -% \end{macrocode} | |
4775 | -% | |
4776 | -% 二つ挿入した |\everyparhook| のうち後者が |\section| 類の直後に2回, | |
4777 | -% 前者が3回目以降に実行されます。 | |
4778 | -% | |
4779 | -% \begin{macrocode} | |
4780 | -\def\@afterheading{% | |
4781 | - \@nobreaktrue | |
4782 | - \everypar{% | |
4783 | - \if@nobreak | |
4784 | - \@nobreakfalse | |
4785 | - \clubpenalty \@M | |
4786 | - \if@afterindent \else | |
4787 | - {\setbox\z@\lastbox}% | |
4788 | - \fi | |
4789 | - \else | |
4790 | - \clubpenalty \@clubpenalty | |
4791 | - \everypar{\everyparhook}% | |
4792 | - \fi\everyparhook}} | |
4793 | -% \end{macrocode} | |
4794 | -% | |
4795 | -% |\@gnewline| についてはちょっと複雑な心境です。 | |
4796 | -% もともとのp\LaTeXe は段落の頭にグルーが入る方で統一されていました。 | |
4797 | -% しかし |\\| の直後にはグルーが入らず,不統一でした。 | |
4798 | -% そこで |\\| の直後にもグルーを入れるように直していただいた経緯があります。 | |
4799 | -% しかし,ここでは逆にグルーを入れない方で統一したいので, | |
4800 | -% また元に戻してしまいました。 | |
4801 | -% | |
4802 | -% しかし単に戻すだけでも駄目みたいなので,ここでも最後にグルーを消しておきます。 | |
4803 | -% | |
4804 | -% \begin{macrocode} | |
4805 | -\def\@gnewline #1{% | |
4806 | - \ifvmode | |
4807 | - \@nolnerr | |
4808 | - \else | |
4809 | - \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null | |
4810 | - \inhibitglue \ignorespaces | |
4811 | - \fi} | |
4812 | -% \end{macrocode} | |
4813 | -% | |
4814 | 4677 | % \section{いろいろなロゴ} |
4815 | 4678 | % |
4816 | 4679 | % \LaTeX 関連のロゴを作り直します。 |
@@ -179,7 +179,8 @@ | ||
179 | 179 | &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup |
180 | 180 | \tabskip\z@skip\cr |
181 | 181 | }} |
182 | -\DeclareOption{disablejfam}{\@enablejfamfalse} | |
182 | +\DeclareOption{disablejfam}{% | |
183 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
183 | 184 | \newif\ifdraft |
184 | 185 | \DeclareOption{draft}{\drafttrue \setlength\overfullrule{5pt}} |
185 | 186 | \DeclareOption{final}{\draftfalse \setlength\overfullrule{0pt}} |
@@ -189,7 +190,10 @@ | ||
189 | 190 | \jisfontfalse |
190 | 191 | \newif\ifptexjis |
191 | 192 | \ptexjisfalse |
192 | -\DeclareOption{winjis}{}\DeclareOption{uplatex}{} % These 2 options are ignored. | |
193 | +\DeclareOption{winjis}{% | |
194 | + \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}} | |
195 | +\DeclareOption{uplatex}{% | |
196 | + \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}} | |
193 | 197 | \DeclareOption{mingoth}{\mingothtrue} |
194 | 198 | \DeclareOption{ptexjis}{\ptexjistrue} |
195 | 199 | \DeclareOption{jis}{\jisfonttrue} |
@@ -820,8 +824,8 @@ | ||
820 | 824 | \hskip -\@tempskipa |
821 | 825 | \else |
822 | 826 | \clubpenalty \@clubpenalty |
823 | - \everypar{\everyparhook}% | |
824 | - \fi\everyparhook}% | |
827 | + \everypar{}% | |
828 | + \fi}% | |
825 | 829 | \else |
826 | 830 | \par \nobreak |
827 | 831 | \vskip \@tempskipa |
@@ -1336,113 +1340,6 @@ | ||
1336 | 1340 | \parindent 1\zw |
1337 | 1341 | \noindent |
1338 | 1342 | \llap{\@makefnmark\hskip0.3\zw}#1} |
1339 | -\def\@inhibitglue{% | |
1340 | - \futurelet\@let@token\@@inhibitglue} | |
1341 | -\def\@@inhibitglue{% | |
1342 | - \ifx\@let@token「 | |
1343 | - \inhibitglue | |
1344 | - \else | |
1345 | - \ifx\@let@token( | |
1346 | - \inhibitglue | |
1347 | - \else | |
1348 | - \ifx\@let@token『 | |
1349 | - \inhibitglue | |
1350 | - \else | |
1351 | - \ifx\@let@token[ | |
1352 | - \inhibitglue | |
1353 | - \fi | |
1354 | - \fi | |
1355 | - \fi | |
1356 | - \fi} | |
1357 | -\let\everyparhook=\@inhibitglue | |
1358 | -\AtBeginDocument{\everypar{\everyparhook}} | |
1359 | -\def\@doendpe{% | |
1360 | - \@endpetrue | |
1361 | - \def\par{% | |
1362 | - \@restorepar\everypar{\everyparhook}\par\@endpefalse}% | |
1363 | - \everypar{{\setbox\z@\lastbox}\everypar{\everyparhook}\@endpefalse\everyparhook}} | |
1364 | -\def\@item[#1]{% | |
1365 | - \if@noparitem | |
1366 | - \@donoparitem | |
1367 | - \else | |
1368 | - \if@inlabel | |
1369 | - \indent \par | |
1370 | - \fi | |
1371 | - \ifhmode | |
1372 | - \unskip\unskip \par | |
1373 | - \fi | |
1374 | - \if@newlist | |
1375 | - \if@nobreak | |
1376 | - \@nbitem | |
1377 | - \else | |
1378 | - \addpenalty\@beginparpenalty | |
1379 | - \addvspace\@topsep | |
1380 | - \addvspace{-\parskip}% | |
1381 | - \fi | |
1382 | - \else | |
1383 | - \addpenalty\@itempenalty | |
1384 | - \addvspace\itemsep | |
1385 | - \fi | |
1386 | - \global\@inlabeltrue | |
1387 | - \fi | |
1388 | - \everypar{% | |
1389 | - \@minipagefalse | |
1390 | - \global\@newlistfalse | |
1391 | - \if@inlabel | |
1392 | - \global\@inlabelfalse | |
1393 | - {\setbox\z@\lastbox | |
1394 | - \ifvoid\z@ | |
1395 | - \kern-\itemindent | |
1396 | - \fi}% | |
1397 | - \box\@labels | |
1398 | - \penalty\z@ | |
1399 | - \fi | |
1400 | - \if@nobreak | |
1401 | - \@nobreakfalse | |
1402 | - \clubpenalty \@M | |
1403 | - \else | |
1404 | - \clubpenalty \@clubpenalty | |
1405 | - \everypar{\everyparhook}% | |
1406 | - \fi\everyparhook}% | |
1407 | - \if@noitemarg | |
1408 | - \@noitemargfalse | |
1409 | - \if@nmbrlist | |
1410 | - \refstepcounter\@listctr | |
1411 | - \fi | |
1412 | - \fi | |
1413 | - \sbox\@tempboxa{\makelabel{#1}}% | |
1414 | - \global\setbox\@labels\hbox{% | |
1415 | - \unhbox\@labels | |
1416 | - \hskip \itemindent | |
1417 | - \hskip -\labelwidth | |
1418 | - \hskip -\labelsep | |
1419 | - \ifdim \wd\@tempboxa >\labelwidth | |
1420 | - \box\@tempboxa | |
1421 | - \else | |
1422 | - \hbox to\labelwidth {\unhbox\@tempboxa}% | |
1423 | - \fi | |
1424 | - \hskip \labelsep}% | |
1425 | - \ignorespaces} | |
1426 | -\def\@afterheading{% | |
1427 | - \@nobreaktrue | |
1428 | - \everypar{% | |
1429 | - \if@nobreak | |
1430 | - \@nobreakfalse | |
1431 | - \clubpenalty \@M | |
1432 | - \if@afterindent \else | |
1433 | - {\setbox\z@\lastbox}% | |
1434 | - \fi | |
1435 | - \else | |
1436 | - \clubpenalty \@clubpenalty | |
1437 | - \everypar{\everyparhook}% | |
1438 | - \fi\everyparhook}} | |
1439 | -\def\@gnewline #1{% | |
1440 | - \ifvmode | |
1441 | - \@nolnerr | |
1442 | - \else | |
1443 | - \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null | |
1444 | - \inhibitglue \ignorespaces | |
1445 | - \fi} | |
1446 | 1343 | \def\Shou#1{\hbox{$\m@th$% |
1447 | 1344 | \csname S@\f@size\endcsname |
1448 | 1345 | \fontsize\sf@size\z@ |
@@ -179,7 +179,8 @@ | ||
179 | 179 | &\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup |
180 | 180 | \tabskip\z@skip\cr |
181 | 181 | }} |
182 | -\DeclareOption{disablejfam}{\@enablejfamfalse} | |
182 | +\DeclareOption{disablejfam}{% | |
183 | + \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} | |
183 | 184 | \newif\ifdraft |
184 | 185 | \DeclareOption{draft}{\drafttrue \setlength\overfullrule{5pt}} |
185 | 186 | \DeclareOption{final}{\draftfalse \setlength\overfullrule{0pt}} |
@@ -189,7 +190,10 @@ | ||
189 | 190 | \jisfontfalse |
190 | 191 | \newif\ifptexjis |
191 | 192 | \ptexjisfalse |
192 | -\DeclareOption{winjis}{}\DeclareOption{uplatex}{} % These 2 options are ignored. | |
193 | +\DeclareOption{winjis}{% | |
194 | + \ClassWarningNoLine{\@currname}{The class option 'winjis' is obsolete}} | |
195 | +\DeclareOption{uplatex}{% | |
196 | + \ClassWarningNoLine{\@currname}{The class option 'uplatex' is obsolete}} | |
193 | 197 | \DeclareOption{mingoth}{\mingothtrue} |
194 | 198 | \DeclareOption{ptexjis}{\ptexjistrue} |
195 | 199 | \DeclareOption{jis}{\jisfonttrue} |
@@ -749,8 +753,8 @@ | ||
749 | 753 | \hskip -\@tempskipa |
750 | 754 | \else |
751 | 755 | \clubpenalty \@clubpenalty |
752 | - \everypar{\everyparhook}% | |
753 | - \fi\everyparhook}% | |
756 | + \everypar{}% | |
757 | + \fi}% | |
754 | 758 | \else |
755 | 759 | \par \nobreak |
756 | 760 | \vskip \@tempskipa |
@@ -1232,113 +1236,6 @@ | ||
1232 | 1236 | \parindent 1\zw |
1233 | 1237 | \noindent |
1234 | 1238 | \llap{\@makefnmark\hskip0.3\zw}#1} |
1235 | -\def\@inhibitglue{% | |
1236 | - \futurelet\@let@token\@@inhibitglue} | |
1237 | -\def\@@inhibitglue{% | |
1238 | - \ifx\@let@token「 | |
1239 | - \inhibitglue | |
1240 | - \else | |
1241 | - \ifx\@let@token( | |
1242 | - \inhibitglue | |
1243 | - \else | |
1244 | - \ifx\@let@token『 | |
1245 | - \inhibitglue | |
1246 | - \else | |
1247 | - \ifx\@let@token[ | |
1248 | - \inhibitglue | |
1249 | - \fi | |
1250 | - \fi | |
1251 | - \fi | |
1252 | - \fi} | |
1253 | -\let\everyparhook=\@inhibitglue | |
1254 | -\AtBeginDocument{\everypar{\everyparhook}} | |
1255 | -\def\@doendpe{% | |
1256 | - \@endpetrue | |
1257 | - \def\par{% | |
1258 | - \@restorepar\everypar{\everyparhook}\par\@endpefalse}% | |
1259 | - \everypar{{\setbox\z@\lastbox}\everypar{\everyparhook}\@endpefalse\everyparhook}} | |
1260 | -\def\@item[#1]{% | |
1261 | - \if@noparitem | |
1262 | - \@donoparitem | |
1263 | - \else | |
1264 | - \if@inlabel | |
1265 | - \indent \par | |
1266 | - \fi | |
1267 | - \ifhmode | |
1268 | - \unskip\unskip \par | |
1269 | - \fi | |
1270 | - \if@newlist | |
1271 | - \if@nobreak | |
1272 | - \@nbitem | |
1273 | - \else | |
1274 | - \addpenalty\@beginparpenalty | |
1275 | - \addvspace\@topsep | |
1276 | - \addvspace{-\parskip}% | |
1277 | - \fi | |
1278 | - \else | |
1279 | - \addpenalty\@itempenalty | |
1280 | - \addvspace\itemsep | |
1281 | - \fi | |
1282 | - \global\@inlabeltrue | |
1283 | - \fi | |
1284 | - \everypar{% | |
1285 | - \@minipagefalse | |
1286 | - \global\@newlistfalse | |
1287 | - \if@inlabel | |
1288 | - \global\@inlabelfalse | |
1289 | - {\setbox\z@\lastbox | |
1290 | - \ifvoid\z@ | |
1291 | - \kern-\itemindent | |
1292 | - \fi}% | |
1293 | - \box\@labels | |
1294 | - \penalty\z@ | |
1295 | - \fi | |
1296 | - \if@nobreak | |
1297 | - \@nobreakfalse | |
1298 | - \clubpenalty \@M | |
1299 | - \else | |
1300 | - \clubpenalty \@clubpenalty | |
1301 | - \everypar{\everyparhook}% | |
1302 | - \fi\everyparhook}% | |
1303 | - \if@noitemarg | |
1304 | - \@noitemargfalse | |
1305 | - \if@nmbrlist | |
1306 | - \refstepcounter\@listctr | |
1307 | - \fi | |
1308 | - \fi | |
1309 | - \sbox\@tempboxa{\makelabel{#1}}% | |
1310 | - \global\setbox\@labels\hbox{% | |
1311 | - \unhbox\@labels | |
1312 | - \hskip \itemindent | |
1313 | - \hskip -\labelwidth | |
1314 | - \hskip -\labelsep | |
1315 | - \ifdim \wd\@tempboxa >\labelwidth | |
1316 | - \box\@tempboxa | |
1317 | - \else | |
1318 | - \hbox to\labelwidth {\unhbox\@tempboxa}% | |
1319 | - \fi | |
1320 | - \hskip \labelsep}% | |
1321 | - \ignorespaces} | |
1322 | -\def\@afterheading{% | |
1323 | - \@nobreaktrue | |
1324 | - \everypar{% | |
1325 | - \if@nobreak | |
1326 | - \@nobreakfalse | |
1327 | - \clubpenalty \@M | |
1328 | - \if@afterindent \else | |
1329 | - {\setbox\z@\lastbox}% | |
1330 | - \fi | |
1331 | - \else | |
1332 | - \clubpenalty \@clubpenalty | |
1333 | - \everypar{\everyparhook}% | |
1334 | - \fi\everyparhook}} | |
1335 | -\def\@gnewline #1{% | |
1336 | - \ifvmode | |
1337 | - \@nolnerr | |
1338 | - \else | |
1339 | - \unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null | |
1340 | - \inhibitglue \ignorespaces | |
1341 | - \fi} | |
1342 | 1239 | \def\Shou#1{\hbox{$\m@th$% |
1343 | 1240 | \csname S@\f@size\endcsname |
1344 | 1241 | \fontsize\sf@size\z@ |
@@ -76,6 +76,7 @@ local ltjs_get_skip_table = ltjs.get_skip_table | ||
76 | 76 | local ltjf_font_metric_table = ltjf.font_metric_table |
77 | 77 | local ltjf_metrics = ltjf.metrics |
78 | 78 | local box_stack_level |
79 | +local par_indented -- is the paragraph indented? | |
79 | 80 | |
80 | 81 | -------------------- Helper functions |
81 | 82 |
@@ -646,13 +647,17 @@ end | ||
646 | 647 | |
647 | 648 | local function get_OA_skip() |
648 | 649 | if not ihb_flag then |
649 | - return new_jfm_glue(Np, find_char_class('jcharbdd',Np.met), Np.class) | |
650 | + local c | |
651 | + if Nq.id == id_math then c = -1 else c = 'jcharbdd' end | |
652 | + return new_jfm_glue(Np, find_char_class(c,Np.met), Np.class) | |
650 | 653 | else return nil |
651 | 654 | end |
652 | 655 | end |
653 | 656 | local function get_OB_skip() |
654 | 657 | if not ihb_flag then |
655 | - return new_jfm_glue(Nq, Nq.class, find_char_class('jcharbdd',Nq.met)) | |
658 | + local c | |
659 | + if Np.id == id_math then c = -1 else c = 'jcharbdd' end | |
660 | + return new_jfm_glue(Nq, Nq.class, find_char_class(c,Nq.met)) | |
656 | 661 | else return nil |
657 | 662 | end |
658 | 663 | end |
@@ -765,7 +770,12 @@ end | ||
765 | 770 | local function handle_list_head() |
766 | 771 | if Np.id == id_jglyph or (Np.id==id_pbox and Np.met) then |
767 | 772 | if not ihb_flag then |
768 | - local g = new_jfm_glue(Np, find_char_class('boxbdd',Np.met), Np.class) | |
773 | + local g | |
774 | + if par_indented then | |
775 | + g = new_jfm_glue(Np, find_char_class('parbdd',Np.met), Np.class) | |
776 | + else | |
777 | + g = new_jfm_glue(Np, find_char_class('boxbdd',Np.met), Np.class) | |
778 | + end | |
769 | 779 | if g then |
770 | 780 | set_attr(g, attr_icflag, BOXBDD) |
771 | 781 | if g.id==id_glue and #Bp==0 then |
@@ -781,6 +791,7 @@ end | ||
781 | 791 | -- initialize |
782 | 792 | local function init_var() |
783 | 793 | lp = head; Bp = {}; widow_Bp = {}; widow_Np = {first = nil} |
794 | + par_indented = false | |
784 | 795 | box_stack_level = ltjp.box_stack_level |
785 | 796 | kanji_skip=skip_table_to_spec('kanjiskip') |
786 | 797 | xkanji_skip=skip_table_to_spec('xkanjiskip') |
@@ -799,6 +810,7 @@ local function init_var() | ||
799 | 810 | -- hbox from \parindent is skipped. |
800 | 811 | while lp and ((lp.id==id_whatsit and lp.subtype~=sid_user) |
801 | 812 | or ((lp.id==id_hlist) and (lp.subtype==3))) do |
813 | + if (lp.id==id_hlist) and (lp.subtype==3) then par_indented = true end | |
802 | 814 | lp=node_next(lp) end |
803 | 815 | last=node.tail(head) |
804 | 816 | else |
@@ -29,6 +29,8 @@ local ITALIC = 1 | ||
29 | 29 | metrics={} -- this table stores all metric informations |
30 | 30 | font_metric_table={} -- [font number] -> jfm_name, jfm_var, size |
31 | 31 | |
32 | +luatexbase.create_callback("luatexja.load_jfm", "data", function (ft, jn) return ft end) | |
33 | + | |
32 | 34 | local jfm_file_name, jfm_var |
33 | 35 | local defjfm_res |
34 | 36 |
@@ -96,8 +98,9 @@ function define_jfm(t) | ||
96 | 98 | t[i] = nil |
97 | 99 | end |
98 | 100 | end |
101 | + t = luatexbase.call_callback("luatexja.load_jfm", t, jfm_file_name) | |
99 | 102 | t.size_cache = {} |
100 | - defjfm_res= t | |
103 | + defjfm_res = t | |
101 | 104 | end |
102 | 105 | |
103 | 106 | local function mult_table(old,scale) -- modified from table.fastcopy |
@@ -126,7 +129,7 @@ local function update_jfm_cache(j,sz) | ||
126 | 129 | metrics[j].size_cache[sz].zh = round(metrics[j].zh*sz) |
127 | 130 | end |
128 | 131 | |
129 | -luatexbase.create_callback("ltj.find_char_class", "data", | |
132 | +luatexbase.create_callback("luatexja.find_char_class", "data", | |
130 | 133 | function (arg, fmtable, char) |
131 | 134 | return 0 |
132 | 135 | end) |
@@ -135,7 +138,7 @@ function find_char_class(c,m) | ||
135 | 138 | -- c: character code, m: index in font_metric table |
136 | 139 | if not metrics[m.jfm] then return 0 end |
137 | 140 | return metrics[m.jfm].chars[c] or |
138 | - luatexbase.call_callback("ltj.find_char_class", 0, m, c) | |
141 | + luatexbase.call_callback("luatexja.find_char_class", 0, m, c) | |
139 | 142 | end |
140 | 143 | |
141 | 144 | local function load_jfont_metric() |
@@ -173,9 +176,9 @@ function jfontdefX(g) | ||
173 | 176 | tex.sprint(cat_lp, '\\expandafter\\font\\csname ' .. cstemp .. '\\endcsname') |
174 | 177 | end |
175 | 178 | |
176 | --- EXT | |
177 | -luatexbase.create_callback("ltj.define_jfont", "data", function (ft, fn) return ft end) | |
179 | +luatexbase.create_callback("luatexja.define_jfont", "data", function (ft, fn) return ft end) | |
178 | 180 | |
181 | +-- EXT | |
179 | 182 | function jfontdefY() -- for horizontal font |
180 | 183 | local j = load_jfont_metric() |
181 | 184 | local fn = font.id(cstemp) |
@@ -191,7 +194,7 @@ function jfontdefY() -- for horizontal font | ||
191 | 194 | end |
192 | 195 | update_jfm_cache(j, f.size) |
193 | 196 | local fmtable = { jfm = j, size = f.size, var = jfm_var } |
194 | - fmtable = luatexbase.call_callback("ltj.define_jfont", fmtable, fn) | |
197 | + fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn) | |
195 | 198 | font_metric_table[fn]=fmtable |
196 | 199 | tex.sprint(cat_lp, ltj.is_global .. '\\protected\\expandafter\\def\\csname ' |
197 | 200 | .. cstemp .. '\\endcsname{\\ltj@curjfnt=' .. fn .. '\\relax}') |
@@ -122,7 +122,7 @@ local function cid_to_char(fmtable, fn) | ||
122 | 122 | end |
123 | 123 | return fmtable |
124 | 124 | end |
125 | -luatexbase.add_to_callback("ltj.define_jfont", | |
125 | +luatexbase.add_to_callback("luatexja.define_jfont", | |
126 | 126 | cid_to_char, "ltj.otf.define_jfont", 1) |
127 | 127 | -- 既に読み込まれているフォントに対しても,同じことをやらないといけない |
128 | 128 | for fn, v in pairs(ltjf_font_metric_table) do |
@@ -137,7 +137,7 @@ local function cid_set_char_class(arg, fmtable, char) | ||
137 | 137 | else return 0 |
138 | 138 | end |
139 | 139 | end |
140 | -luatexbase.add_to_callback("ltj.find_char_class", | |
140 | +luatexbase.add_to_callback("luatexja.find_char_class", | |
141 | 141 | cid_set_char_class, "ltj.otf.find_char_class", 1) |
142 | 142 | |
143 | 143 | -------------------- all done |
@@ -12,7 +12,7 @@ luatexja.jfont.define_jfm { | ||
12 | 12 | chars = { 'あ' }, |
13 | 13 | align = 'left', left = 0.0, down = 0.0, |
14 | 14 | width = 1.0, height = 0.88, depth = 0.12, italic=0.0, |
15 | - glue = { [3] = { 1.41, 0, 0} }, | |
15 | + glue = { [3] = { 1.41, 0, 0}, [399] = {1.25, 0.43, 0.87} }, | |
16 | 16 | kern = { [8] = -1.41 , [2] = 2.0, [99] = 1.21 } |
17 | 17 | }, |
18 | 18 | [11] = { |
@@ -59,6 +59,12 @@ luatexja.jfont.define_jfm { | ||
59 | 59 | align = 'left', left = 0.0, down = 0.0, |
60 | 60 | width = 1.0, height = 0.88, depth = 0.12, italic=0.0 |
61 | 61 | }, |
62 | + [4] = { | |
63 | + chars = { 'エ' }, | |
64 | + align = 'left', left = 0.0, down = 0.0, | |
65 | + width = 1.0, height = 0.88, depth = 0.12, italic=0.0, | |
66 | + glue = { [199] = { 0.78, 0, 0} }, | |
67 | + }, | |
62 | 68 | [99] = { |
63 | 69 | chars = { 'jcharbdd' }, |
64 | 70 | glue = { [11] = { 1.41, 0, 0} }, |
@@ -68,6 +74,14 @@ luatexja.jfont.define_jfm { | ||
68 | 74 | chars = { 'boxbdd' }, |
69 | 75 | glue = { [51] = { 1.03, 0, 0} , [1] = { 0.94, 0.23, 0.45 }}, |
70 | 76 | }, |
77 | + [299] = { | |
78 | + chars = { 'parbdd' }, | |
79 | + glue = { [51] = { 0.68, 0.02, 0.04} }, | |
80 | + }, | |
81 | + [399] = { | |
82 | + chars = { -1 }, -- math | |
83 | + glue = { [0] = { 0.68, 0.02, 0.04} }, | |
84 | + }, | |
71 | 85 | [8] = { |
72 | 86 | chars = { 'lineend' }, |
73 | 87 | } |
@@ -13,8 +13,8 @@ luatexja.jfont.define_jfm { | ||
13 | 13 | |
14 | 14 | [1] = { -- 開き括弧類 |
15 | 15 | chars = { |
16 | - 0x2018, 0x201C, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016, | |
17 | - 0x3018, 0x301D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F | |
16 | + '‘', '“', '〈', '《', '「', '『', '【', '〔', '〖', | |
17 | + '〘', '〝', '(', '[', '{', '⦅' | |
18 | 18 | }, |
19 | 19 | align = 'right', left = 0.0, down = 0.0, |
20 | 20 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.16, |
@@ -25,8 +25,8 @@ luatexja.jfont.define_jfm { | ||
25 | 25 | |
26 | 26 | [2] = { -- 閉じ括弧類 |
27 | 27 | chars = { |
28 | - 0x2019, 0x201D, 0x3001, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, | |
29 | - 0x3017, 0x3019, 0x301F, 0xFF09, 0xFF0C, 0xFF3D, 0xFF5D, 0xFF60 | |
28 | + '’', '”', '、', '〉', '》', '」', '』', '】', '〕', | |
29 | + '〗', '〙', '〟', ')', ',', ']', '}', '⦆' | |
30 | 30 | }, |
31 | 31 | align = 'left', left = 0.0, down = 0.0, |
32 | 32 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.16, |
@@ -35,12 +35,13 @@ luatexja.jfont.define_jfm { | ||
35 | 35 | [1] = { 0.5 , 0.0, 0.5 }, |
36 | 36 | [3] = { 0.25, 0.0, 0.25 }, |
37 | 37 | [5] = { 0.5 , 0.0, 0.5 }, |
38 | + [6] = { 0.5 , 0.0, 0.5 }, | |
38 | 39 | [7] = { 0.5 , 0.0, 0.5 } |
39 | 40 | } |
40 | 41 | }, |
41 | 42 | |
42 | 43 | [3] = { -- 中点類 |
43 | - chars = {0x30FB, 0xFF1A, 0xFF1B}, | |
44 | + chars = {'・', ':', ';'}, | |
44 | 45 | align = 'middle', left = 0.0, down = 0.0, |
45 | 46 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.16, |
46 | 47 | glue = { |
@@ -50,12 +51,13 @@ luatexja.jfont.define_jfm { | ||
50 | 51 | [3] = { 0.5 , 0.0, 0.5 }, |
51 | 52 | [4] = { 0.25, 0.0, 0.25 }, |
52 | 53 | [5] = { 0.25, 0.0, 0.25 }, |
54 | + [6] = { 0.25, 0.0, 0.25 }, | |
53 | 55 | [7] = { 0.25, 0.0, 0.25 } |
54 | 56 | } |
55 | 57 | }, |
56 | 58 | |
57 | 59 | [4] = { -- 句点類 |
58 | - chars = {0x3002, 0xFF0E}, | |
60 | + chars = {'。', '.'}, | |
59 | 61 | align = 'left', left = 0.0, down = 0.0, |
60 | 62 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.16, |
61 | 63 | glue = { |
@@ -63,12 +65,13 @@ luatexja.jfont.define_jfm { | ||
63 | 65 | [1] = { 0.5 , 0.0, 0.0 }, |
64 | 66 | [3] = { 0.75, 0.0, 0.25 }, |
65 | 67 | [5] = { 0.5 , 0.0, 0.0 }, |
68 | + [6] = { 0.5 , 0.0, 0.0 }, | |
66 | 69 | [7] = { 0.5 , 0.0, 0.0 } |
67 | 70 | } |
68 | 71 | }, |
69 | 72 | |
70 | 73 | [5] = { -- ダッシュ |
71 | - chars = { 0x2015, 0x2025, 0x2026 }, | |
74 | + chars = { '―', '‥', '…' }, | |
72 | 75 | align = 'left', left = 0.0, down = 0.0, |
73 | 76 | width = 1.0, height = 0.88, depth = 0.12, italic=0.88*0.16, |
74 | 77 | glue = { |
@@ -80,19 +83,42 @@ luatexja.jfont.define_jfm { | ||
80 | 83 | } |
81 | 84 | }, |
82 | 85 | |
83 | - [6] = { -- box末尾 | |
84 | - chars = {'boxbdd'}, | |
86 | + [6] = { -- 感嘆符・疑問符 | |
87 | + chars = { '?', '!' }, | |
88 | + align = 'left', left = 0.0, down = 0.0, | |
89 | + width = 1.0, height = 0.88, depth = 0.12, italic=0.88*0.16, | |
90 | + glue = { | |
91 | + [0] = { 0.5 , 0.0, 0.5 }, | |
92 | + [1] = { 0.5 , 0.0, 0.5 }, | |
93 | + [3] = { 0.25, 0.0, 0.25 }, | |
94 | + [7] = { 0.5 , 0.0, 0.5 }, | |
95 | + }, | |
96 | + kern = { | |
97 | + [5] = 0.0 | |
98 | + } | |
85 | 99 | }, |
86 | 100 | |
87 | 101 | [7] = { -- 半角カナ |
88 | 102 | chars = { |
89 | - 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, 0xFF68, 0xFF69, | |
90 | - 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F, 0xFF70, 0xFF71, 0xFF72, | |
91 | - 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, | |
92 | - 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, | |
93 | - 0xFF85, 0xFF86, 0xFF87, 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, | |
94 | - 0xFF8E, 0xFF8F, 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, | |
95 | - 0xFF97, 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F | |
103 | + '。', '「', '」', '、', '・', 'ヲ', 'ァ', 'ィ', 'ゥ', | |
104 | + 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ', | |
105 | + 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', | |
106 | + 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', | |
107 | + 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', | |
108 | + 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', | |
109 | + 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン', '゙', '゚', | |
110 | + "AJ1-516", "AJ1-517", "AJ1-518", "AJ1-519", "AJ1-520", "AJ1-521", "AJ1-522", | |
111 | + "AJ1-523", "AJ1-524", "AJ1-525", "AJ1-526", "AJ1-527", "AJ1-528", "AJ1-529", | |
112 | + "AJ1-530", "AJ1-531", "AJ1-532", "AJ1-533", "AJ1-534", "AJ1-535", "AJ1-536", | |
113 | + "AJ1-537", "AJ1-538", "AJ1-539", "AJ1-540", "AJ1-541", "AJ1-542", "AJ1-543", | |
114 | + "AJ1-544", "AJ1-545", "AJ1-546", "AJ1-547", "AJ1-548", "AJ1-549", "AJ1-550", | |
115 | + "AJ1-551", "AJ1-552", "AJ1-553", "AJ1-554", "AJ1-555", "AJ1-556", "AJ1-557", | |
116 | + "AJ1-558", "AJ1-559", "AJ1-560", "AJ1-561", "AJ1-562", "AJ1-563", "AJ1-564", | |
117 | + "AJ1-565", "AJ1-566", "AJ1-567", "AJ1-568", "AJ1-569", "AJ1-570", "AJ1-571", | |
118 | + "AJ1-572", "AJ1-573", "AJ1-574", "AJ1-575", "AJ1-576", "AJ1-577", "AJ1-578", | |
119 | + "AJ1-579", "AJ1-580", "AJ1-581", "AJ1-582", "AJ1-583", "AJ1-584", "AJ1-585", | |
120 | + "AJ1-586", "AJ1-587", "AJ1-588", "AJ1-589", "AJ1-590", "AJ1-591", "AJ1-592", | |
121 | + "AJ1-593", "AJ1-594", "AJ1-595", "AJ1-596", "AJ1-597", "AJ1-598", | |
96 | 122 | }, |
97 | 123 | align = 'left', left = 0.0, down = 0.0, |
98 | 124 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.16, |
@@ -101,4 +127,9 @@ luatexja.jfont.define_jfm { | ||
101 | 127 | [3] = { 0.25, 0.0, 0.25 } |
102 | 128 | } |
103 | 129 | }, |
104 | -} | |
\ No newline at end of file | ||
130 | + | |
131 | + [99] = { -- box末尾 | |
132 | + chars = {'boxbdd', 'parbdd'}, | |
133 | + }, | |
134 | + | |
135 | +} |
@@ -13,8 +13,8 @@ luatexja.jfont.define_jfm { | ||
13 | 13 | |
14 | 14 | [1] = { -- 開き括弧類 |
15 | 15 | chars = { |
16 | - 0x2018, 0x201C, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3025, | |
17 | - 0x3018, 0x301D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F | |
16 | + '‘', '“', '〈', '《', '「', '『', '【', '〔', '〖', | |
17 | + '〘', '〝', '(', '[', '{', '⦅' | |
18 | 18 | }, |
19 | 19 | align = 'right', left = 0.0, down = 0.0, |
20 | 20 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.25, |
@@ -25,8 +25,8 @@ luatexja.jfont.define_jfm { | ||
25 | 25 | |
26 | 26 | [2] = { -- 閉じ括弧類 |
27 | 27 | chars = { |
28 | - 0x2019, 0x201D, 0x3001, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, | |
29 | - 0x3017, 0x3019, 0x301F, 0xFF09, 0xFF0C, 0xFF3D, 0xFF5D, 0xFF60 | |
28 | + '’', '”', '、', '〉', '》', '」', '』', '】', '〕', | |
29 | + '〗', '〙', '〟', ')', ',', ']', '}', '⦆' | |
30 | 30 | }, |
31 | 31 | align = 'left', left = 0.0, down = 0.0, |
32 | 32 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.25, |
@@ -35,12 +35,13 @@ luatexja.jfont.define_jfm { | ||
35 | 35 | [1] = { 0.5 , 0.0, 0.5 }, |
36 | 36 | [3] = { 0.25, 0.0, 0.25 }, |
37 | 37 | [5] = { 0.5 , 0.0, 0.5 }, |
38 | + [6] = { 0.5 , 0.0, 0.5 }, | |
38 | 39 | [7] = { 0.5 , 0.0, 0.5 } |
39 | 40 | } |
40 | 41 | }, |
41 | 42 | |
42 | 43 | [3] = { -- 中点類 |
43 | - chars = {0x30FB, 0xFF1A, 0xFF1B}, | |
44 | + chars = {'・', ':', ';'}, | |
44 | 45 | align = 'middle', left = 0.0, down = 0.0, |
45 | 46 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.25, |
46 | 47 | glue = { |
@@ -50,12 +51,13 @@ luatexja.jfont.define_jfm { | ||
50 | 51 | [3] = { 0.5 , 0.0, 0.5 }, |
51 | 52 | [4] = { 0.25, 0.0, 0.25 }, |
52 | 53 | [5] = { 0.25, 0.0, 0.25 }, |
54 | + [6] = { 0.25, 0.0, 0.25 }, | |
53 | 55 | [7] = { 0.25, 0.0, 0.25 } |
54 | 56 | } |
55 | 57 | }, |
56 | 58 | |
57 | 59 | [4] = { -- 句点類 |
58 | - chars = {0x3002, 0xFF0E}, | |
60 | + chars = {'。', '.'}, | |
59 | 61 | align = 'left', left = 0.0, down = 0.0, |
60 | 62 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.25, |
61 | 63 | glue = { |
@@ -63,12 +65,13 @@ luatexja.jfont.define_jfm { | ||
63 | 65 | [1] = { 0.5 , 0.0, 0.0 }, |
64 | 66 | [3] = { 0.75, 0.0, 0.25 }, |
65 | 67 | [5] = { 0.5 , 0.0, 0.0 }, |
68 | + [6] = { 0.5 , 0.0, 0.0 }, | |
66 | 69 | [7] = { 0.5 , 0.0, 0.0 } |
67 | 70 | } |
68 | 71 | }, |
69 | 72 | |
70 | 73 | [5] = { -- ダッシュ |
71 | - chars = { 0x2015, 0x2025, 0x2026 }, | |
74 | + chars = { '―', '‥', '…' }, | |
72 | 75 | align = 'left', left = 0.0, down = 0.0, |
73 | 76 | width = 1.0, height = 0.88, depth = 0.12, italic=0.88*0.25, |
74 | 77 | glue = { |
@@ -80,19 +83,42 @@ luatexja.jfont.define_jfm { | ||
80 | 83 | } |
81 | 84 | }, |
82 | 85 | |
83 | - [6] = { -- box末尾 | |
84 | - chars = {'boxbdd'}, | |
86 | + [6] = { -- 感嘆符・疑問符 | |
87 | + chars = { '?', '!' }, | |
88 | + align = 'left', left = 0.0, down = 0.0, | |
89 | + width = 1.0, height = 0.88, depth = 0.12, italic=0.88*0.25, | |
90 | + glue = { | |
91 | + [0] = { 0.5 , 0.0, 0.5 }, | |
92 | + [1] = { 0.5 , 0.0, 0.5 }, | |
93 | + [3] = { 0.25, 0.0, 0.25 }, | |
94 | + [7] = { 0.5 , 0.0, 0.5 }, | |
95 | + }, | |
96 | + kern = { | |
97 | + [5] = 0.0 | |
98 | + } | |
85 | 99 | }, |
86 | 100 | |
87 | 101 | [7] = { -- 半角カナ |
88 | 102 | chars = { |
89 | - 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, 0xFF68, 0xFF69, | |
90 | - 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F, 0xFF70, 0xFF71, 0xFF72, | |
91 | - 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, | |
92 | - 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, | |
93 | - 0xFF85, 0xFF86, 0xFF87, 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, | |
94 | - 0xFF8E, 0xFF8F, 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, | |
95 | - 0xFF97, 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F | |
103 | + '。', '「', '」', '、', '・', 'ヲ', 'ァ', 'ィ', 'ゥ', | |
104 | + 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ', | |
105 | + 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', | |
106 | + 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', | |
107 | + 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', | |
108 | + 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', | |
109 | + 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン', '゙', '゚', | |
110 | + "AJ1-516", "AJ1-517", "AJ1-518", "AJ1-519", "AJ1-520", "AJ1-521", "AJ1-522", | |
111 | + "AJ1-523", "AJ1-524", "AJ1-525", "AJ1-526", "AJ1-527", "AJ1-528", "AJ1-529", | |
112 | + "AJ1-530", "AJ1-531", "AJ1-532", "AJ1-533", "AJ1-534", "AJ1-535", "AJ1-536", | |
113 | + "AJ1-537", "AJ1-538", "AJ1-539", "AJ1-540", "AJ1-541", "AJ1-542", "AJ1-543", | |
114 | + "AJ1-544", "AJ1-545", "AJ1-546", "AJ1-547", "AJ1-548", "AJ1-549", "AJ1-550", | |
115 | + "AJ1-551", "AJ1-552", "AJ1-553", "AJ1-554", "AJ1-555", "AJ1-556", "AJ1-557", | |
116 | + "AJ1-558", "AJ1-559", "AJ1-560", "AJ1-561", "AJ1-562", "AJ1-563", "AJ1-564", | |
117 | + "AJ1-565", "AJ1-566", "AJ1-567", "AJ1-568", "AJ1-569", "AJ1-570", "AJ1-571", | |
118 | + "AJ1-572", "AJ1-573", "AJ1-574", "AJ1-575", "AJ1-576", "AJ1-577", "AJ1-578", | |
119 | + "AJ1-579", "AJ1-580", "AJ1-581", "AJ1-582", "AJ1-583", "AJ1-584", "AJ1-585", | |
120 | + "AJ1-586", "AJ1-587", "AJ1-588", "AJ1-589", "AJ1-590", "AJ1-591", "AJ1-592", | |
121 | + "AJ1-593", "AJ1-594", "AJ1-595", "AJ1-596", "AJ1-597", "AJ1-598", | |
96 | 122 | }, |
97 | 123 | align = 'left', left = 0.0, down = 0.0, |
98 | 124 | width = 0.5, height = 0.88, depth = 0.12, italic=0.88*0.25, |
@@ -101,4 +127,9 @@ luatexja.jfont.define_jfm { | ||
101 | 127 | [3] = { 0.25, 0.0, 0.25 } |
102 | 128 | } |
103 | 129 | }, |
104 | -} | |
\ No newline at end of file | ||
130 | + | |
131 | + [99] = { -- box末尾 | |
132 | + chars = {'boxbdd', 'parbdd'}, | |
133 | + }, | |
134 | + | |
135 | +} |
@@ -13,8 +13,8 @@ luatexja.jfont.define_jfm { | ||
13 | 13 | |
14 | 14 | [1] = { -- 開き括弧類 |
15 | 15 | chars = { |
16 | - 0x2018, 0x201C, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3025, | |
17 | - 0x3018, 0x301D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F | |
16 | + '‘', '“', '〈', '《', '「', '『', '【', '〔', '〖', | |
17 | + '〘', '〝', '(', '[', '{', '⦅' | |
18 | 18 | }, |
19 | 19 | align = 'right', left = 0.0, down = 0.0, |
20 | 20 | width = 0.5*1.5, height = 0.88, depth = 0.12, italic=0.0, |
@@ -25,8 +25,8 @@ luatexja.jfont.define_jfm { | ||
25 | 25 | |
26 | 26 | [2] = { -- 閉じ括弧類 |
27 | 27 | chars = { |
28 | - 0x2019, 0x201D, 0x3001, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, | |
29 | - 0x3017, 0x3019, 0x301F, 0xFF09, 0xFF0C, 0xFF3D, 0xFF5D, 0xFF60 | |
28 | + '’', '”', '、', '〉', '》', '」', '』', '】', '〕', | |
29 | + '〗', '〙', '〟', ')', ',', ']', '}', '⦆' | |
30 | 30 | }, |
31 | 31 | align = 'left', left = 0.0, down = 0.0, |
32 | 32 | width = 0.5*1.5, height = 0.88, depth = 0.12, italic=0.0, |
@@ -35,12 +35,13 @@ luatexja.jfont.define_jfm { | ||
35 | 35 | [1] = { 0.5*1.5 , 0.0, 0.5 }, |
36 | 36 | [3] = { 0.25*1.5, 0.0, 0.25 }, |
37 | 37 | [5] = { 0.5*1.5 , 0.0, 0.5 }, |
38 | + [6] = { 0.5*1.5 , 0.0, 0.5 }, | |
38 | 39 | [7] = { 0.5*1.5 , 0.0, 0.5 } |
39 | 40 | } |
40 | 41 | }, |
41 | 42 | |
42 | 43 | [3] = { -- 中点類 |
43 | - chars = {0x30FB, 0xFF1A, 0xFF1B}, | |
44 | + chars = {'・', ':', ';'}, | |
44 | 45 | align = 'middle', left = 0.0, down = 0.0, |
45 | 46 | width = 0.5*1.5, height = 0.88, depth = 0.12, italic=0.0, |
46 | 47 | glue = { |
@@ -50,12 +51,13 @@ luatexja.jfont.define_jfm { | ||
50 | 51 | [3] = { 0.5*1.5 , 0.0, 0.5 }, |
51 | 52 | [4] = { 0.25*1.5, 0.0, 0.25 }, |
52 | 53 | [5] = { 0.25*1.5, 0.0, 0.25 }, |
54 | + [6] = { 0.25*1.5, 0.0, 0.25 }, | |
53 | 55 | [7] = { 0.25*1.5, 0.0, 0.25 } |
54 | 56 | } |
55 | 57 | }, |
56 | 58 | |
57 | 59 | [4] = { -- 句点類 |
58 | - chars = {0x3002, 0xFF0E}, | |
60 | + chars = {'。', '.'}, | |
59 | 61 | align = 'left', left = 0.0, down = 0.0, |
60 | 62 | width = 0.5*1.5, height = 0.88, depth = 0.12, italic=0.0, |
61 | 63 | glue = { |
@@ -63,12 +65,13 @@ luatexja.jfont.define_jfm { | ||
63 | 65 | [1] = { 0.5*1.5 , 0.0, 0.0 }, |
64 | 66 | [3] = { 0.75*1.5, 0.0, 0.25 }, |
65 | 67 | [5] = { 0.5*1.5 , 0.0, 0.0 }, |
68 | + [6] = { 0.5*1.5 , 0.0, 0.0 }, | |
66 | 69 | [7] = { 0.5*1.5 , 0.0, 0.0 } |
67 | 70 | } |
68 | 71 | }, |
69 | 72 | |
70 | 73 | [5] = { -- ダッシュ |
71 | - chars = { 0x2015, 0x2025, 0x2026 }, | |
74 | + chars = { '―', '‥', '…' }, | |
72 | 75 | align = 'left', left = 0.0, down = 0.0, |
73 | 76 | width = 1.0*1.5, height = 0.88, depth = 0.12, italic=0.0, |
74 | 77 | glue = { |
@@ -80,19 +83,42 @@ luatexja.jfont.define_jfm { | ||
80 | 83 | } |
81 | 84 | }, |
82 | 85 | |
83 | - [6] = { -- box末尾 | |
84 | - chars = {'boxbdd'}, | |
86 | + [6] = { -- 感嘆符・疑問符 | |
87 | + chars = { '?', '!' }, | |
88 | + align = 'left', left = 0.0, down = 0.0, | |
89 | + width = 1.0, height = 0.88, depth = 0.12, italic=0.0, | |
90 | + glue = { | |
91 | + [0] = { 0.5*1.5 , 0.0, 0.5 }, | |
92 | + [1] = { 0.5*1.5 , 0.0, 0.5 }, | |
93 | + [3] = { 0.25*1.5, 0.0, 0.25 }, | |
94 | + [7] = { 0.5*1.5 , 0.0, 0.5 }, | |
95 | + }, | |
96 | + kern = { | |
97 | + [5] = 0.0 | |
98 | + } | |
85 | 99 | }, |
86 | 100 | |
87 | 101 | [7] = { -- 半角カナ |
88 | 102 | chars = { |
89 | - 0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67, 0xFF68, 0xFF69, | |
90 | - 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F, 0xFF70, 0xFF71, 0xFF72, | |
91 | - 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77, 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, | |
92 | - 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F, 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, | |
93 | - 0xFF85, 0xFF86, 0xFF87, 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, | |
94 | - 0xFF8E, 0xFF8F, 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, | |
95 | - 0xFF97, 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F | |
103 | + '。', '「', '」', '、', '・', 'ヲ', 'ァ', 'ィ', 'ゥ', | |
104 | + 'ェ', 'ォ', 'ャ', 'ュ', 'ョ', 'ッ', 'ー', 'ア', 'イ', | |
105 | + 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', | |
106 | + 'シ', 'ス', 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', | |
107 | + 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', | |
108 | + 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', | |
109 | + 'ラ', 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ン', '゙', '゚', | |
110 | + "AJ1-516", "AJ1-517", "AJ1-518", "AJ1-519", "AJ1-520", "AJ1-521", "AJ1-522", | |
111 | + "AJ1-523", "AJ1-524", "AJ1-525", "AJ1-526", "AJ1-527", "AJ1-528", "AJ1-529", | |
112 | + "AJ1-530", "AJ1-531", "AJ1-532", "AJ1-533", "AJ1-534", "AJ1-535", "AJ1-536", | |
113 | + "AJ1-537", "AJ1-538", "AJ1-539", "AJ1-540", "AJ1-541", "AJ1-542", "AJ1-543", | |
114 | + "AJ1-544", "AJ1-545", "AJ1-546", "AJ1-547", "AJ1-548", "AJ1-549", "AJ1-550", | |
115 | + "AJ1-551", "AJ1-552", "AJ1-553", "AJ1-554", "AJ1-555", "AJ1-556", "AJ1-557", | |
116 | + "AJ1-558", "AJ1-559", "AJ1-560", "AJ1-561", "AJ1-562", "AJ1-563", "AJ1-564", | |
117 | + "AJ1-565", "AJ1-566", "AJ1-567", "AJ1-568", "AJ1-569", "AJ1-570", "AJ1-571", | |
118 | + "AJ1-572", "AJ1-573", "AJ1-574", "AJ1-575", "AJ1-576", "AJ1-577", "AJ1-578", | |
119 | + "AJ1-579", "AJ1-580", "AJ1-581", "AJ1-582", "AJ1-583", "AJ1-584", "AJ1-585", | |
120 | + "AJ1-586", "AJ1-587", "AJ1-588", "AJ1-589", "AJ1-590", "AJ1-591", "AJ1-592", | |
121 | + "AJ1-593", "AJ1-594", "AJ1-595", "AJ1-596", "AJ1-597", "AJ1-598", | |
96 | 122 | }, |
97 | 123 | align = 'left', left = 0.0, down = 0.0, |
98 | 124 | width = 0.5*1.5, height = 0.88, depth = 0.12, italic=0.0, |
@@ -101,4 +127,9 @@ luatexja.jfont.define_jfm { | ||
101 | 127 | [3] = { 0.25*1.5, 0.0, 0.25 } |
102 | 128 | } |
103 | 129 | }, |
130 | + | |
131 | + [99] = { -- box末尾 | |
132 | + chars = {'boxbdd', 'parbdd'}, | |
133 | + }, | |
134 | + | |
104 | 135 | } |
\ No newline at end of file |
@@ -296,5 +296,20 @@ | ||
296 | 296 | \setbox0=\hbox{あ\hbox{(}あ\setbox3=\hbox{(}\unhbox3あ} |
297 | 297 | \dumplist0} |
298 | 298 | |
299 | +\vfill\eject | |
300 | +\noindent{\gt\bf paragraph, hbox and math boundary} | |
301 | + | |
302 | +\setbox1=\vbox{\parindent19.2pt \rmlh\hsize=100pt\parfillskip=30pt | |
303 | +かエ\par\global\setbox0=\lastbox} | |
304 | +\dumplist0 | |
305 | + | |
306 | +\setbox1=\vbox{\noindent\rmlh\hsize=100pt\parfillskip=30pt | |
307 | +かエ\par\global\setbox0=\lastbox} | |
308 | +\dumplist0 | |
309 | + | |
310 | +\setbox0=\hbox{\rmlh かエ} | |
311 | +\dumplist0 | |
299 | 312 | |
313 | +\setbox0=\hbox{\rmlh あ$a$さ$a$か} | |
314 | +\dumplist0 | |
300 | 315 | \end |
@@ -0,0 +1,26 @@ | ||
1 | +%#!lualatex | |
2 | +\documentclass{ltjarticle} | |
3 | +\begin{document} | |
4 | +\noindent 漢字漢字ちょっと\textgt{チェック} | |
5 | + | |
6 | +「漢字←全角二分下がり?\\ | |
7 | +「あいうえお」\textgt{「かきくけこ」}{\Large 「} | |
8 | + | |
9 | +次の例は「\texttt{min10}フォントについて」(乙部厳己)中のp.~8から拝借. | |
10 | + | |
11 | +\def\g#1#2#3{\leavevmode\vbox{\hsize=100pt% | |
12 | +\hrule height 1pt depth 0pt | |
13 | +\vskip#3pt\hbox{\jfont\e=file:#1:jfm=#2 at 20pt\e あいうえお}\vskip-#3pt | |
14 | +\hrule height 0pt depth 1pt}: #1, jfm=#2, yjabaselineshift=#3pt\par\bigskip} | |
15 | + | |
16 | +\g{KozGoPr6N-Medium.otf}{ujis}{0} | |
17 | +\g{KozGoPr6N-Medium.otf}{jis}{0.7563636} | |
18 | +\g{KozGoPr6N-Medium.otf}{jis}{0} | |
19 | +\g{ipaexg.ttf}{ujis}{0} | |
20 | +\g{ipaexg.ttf}{jis}{0.7563636} | |
21 | +\g{ipaexg.ttf}{jis}{0} | |
22 | +\g{hgrgm.ttc}{ujis}{0} | |
23 | +\g{hgrgm.ttc}{jis}{0} | |
24 | +\g{hgrgm.ttc}{jis}{0.7563636} | |
25 | + | |
26 | +\end{document} | |
\ No newline at end of file |