OSDN Git Service

Fixed math.lua.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 19 Nov 2011 05:52:30 +0000 (14:52 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 22 Nov 2011 01:35:14 +0000 (10:35 +0900)
src/luatexja/math.lua
test/test07-math.pdf
test/test07-math.tex

index 6046a52..3354ddd 100644 (file)
@@ -60,6 +60,7 @@ local function conv_jchar_to_hbox(head, sty)
         p.sub = conv_jchar_to_hbox_A(p.sub, sty + 1)
         p.sup = conv_jchar_to_hbox_A(p.sup, sty + 1)
       elseif p.id == id_choice then
+        p.display = conv_jchar_to_hbox(p.display, 0)
         p.text = conv_jchar_to_hbox(p.text, 0)
         p.script = conv_jchar_to_hbox(p.script, 1)
         p.scriptscript = conv_jchar_to_hbox(p.scriptscript, 2)
@@ -125,4 +126,4 @@ luatexbase.add_to_callback('mlist_to_hlist',
       local head = conv_jchar_to_hbox(n, 0);
       head = node.mlist_to_hlist(head, display_type, penalties)
       return head
-   end,'ltj.mlist_to_hlist', 1)
\ No newline at end of file
+   end,'ltj.mlist_to_hlist', 1)
index dde7ccb..591588a 100644 (file)
Binary files a/test/test07-math.pdf and b/test/test07-math.pdf differ
index 55dc9be..9d176e0 100644 (file)
@@ -42,6 +42,10 @@ mathgt: $\mathrm{\mathmc{あa}}\mathmc{あb}\mathgt{あa}$
 
 \LaTeX では数式ファミリ番号は欧文と共用→$\the\jfam$
 
+\def\s{\mathchoice{Dあ}{Tあ}{Sあ}{SSあ}}
+\[
+\s {\textstyle \s} {\scriptstyle \s} {\scriptscriptstyle \s}
+\]
 
 \end{document}