OSDN Git Service

Fixed lltjfont.sty and luatexja-core.sty for uninvited spaces
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 28 Aug 2011 08:04:20 +0000 (17:04 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 28 Aug 2011 08:04:20 +0000 (17:04 +0900)
src/lltjfont.sty
src/luatexja-core.sty
test/test07-math.pdf
test/test07-math.tex

index a4ad74c..1d36965 100644 (file)
 \newbox\tstrutbox
 \newbox\zstrutbox
 \def\strut{\relax
-  \ifydir
+%  \ifydir
     \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi
-  \else
-    \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi
-  \fi}
+%  \else
+%    \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi
+%  \fi}
+}
 \def\tstrut{\relax\hbox{\tate
    \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}}
 \def\zstrut{\relax\hbox{\tate
 \let\ltj@@al@getanddefine@fonts=\getanddefine@fonts
 \def\ltj@@ja@getanddefine@fonts#1#2{%
   \xdef\font@name{\csname \string#2/\tf@size\endcsname}%
-  \pickup@jfont \let\textfont@name\font@name
+  \pickup@jfont\let\textfont@name\font@name
   \xdef\font@name{\csname \string#2/\sf@size\endcsname}%
-  \pickup@jfont \let\scriptfont@name\font@name
+  \pickup@jfont\let\scriptfont@name\font@name
   \xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
   \pickup@jfont
   \edef\math@fonts{\math@fonts\ltjsetparameter{%
     jatextfont={#1,\textfont@name},%
     jascriptfont={#1,\scriptfont@name},%
-    jascriptscriptfont={#1,\font@name}}}
+    jascriptscriptfont={#1,\font@name}}}%
 }
 
 \def\getanddefine@fonts#1#2{%
   \ltj@tempcnta=#1 \ltj@@IsFontJapanese{\string#2}%
   \ifin@\ltj@@ja@getanddefine@fonts{#1}{#2}%
-  \else \ltj@@al@getanddefine@fonts{#1}{#2}%
-  \fi
+  \else \ltj@@al@getanddefine@fonts{#1}{#2}\fi
 }
 \def\use@mathgroup#1#2{\relax\ifmmode
   \math@bgroup
     \expandafter\ifx\csname M@\f@encoding\endcsname#1\else
-    #1\fi \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
+    #1\fi\ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
     \ifin@\jfam#2\relax\else\mathgroup#2\relax\fi
   \expandafter\math@egroup\fi}%
 
index 21bfe8a..81926ea 100644 (file)
   {\ltj@tempcntb=\ltj@curjfnt\ltj@curjfnt=-1 #2%
    \global\ltj@tempcnta=\ltj@curjfnt\global\ltj@curjfnt=\ltj@tempcntb}%
   \ifnum\ltj@tempcnta=-1
-    \@PackageError{luatexja-core}
+    \@PackageError{luatexja-core}%
     {\string#2 is not a control sequence that represents \MessageBreak
      a Japanese font}{}%
   \else
     \directlua{luatexja.stack.set_stack_font(ltj.isglobal, \asluastring{#3},
-    \ltj@safe@num@or\ltj@defnum{#1}, \the\ltj@tempcnta)}
+    \ltj@safe@num@or\ltj@defnum{#1}, \the\ltj@tempcnta)}%
   \fi}
 
 % yalbaselineshift = <dimen>
index 6190d1a..0ccf43f 100644 (file)
Binary files a/test/test07-math.pdf and b/test/test07-math.pdf differ
index 9c62440..5aae176 100644 (file)
@@ -36,8 +36,7 @@ mathgt: $\mathrm{\mathmc{あa}}\mathmc{あb}\mathgt{あa}$
 \item 欧文数式フォント選択命令は,欧文文字しか影響しない
 \end{itemize}
 
-\bf mathversion bold: {\mathversion{bold}$aあa\mathgt{あa}\vrule$\vrule}\vrule←
-この空白は何?\\
+\bf mathversion bold: {\mathversion{bold}$aあa\mathgt{あa}$}き\\
 二つ目の「あ」は\verb+\mathgt+下だが,明朝なのは本文書の設定通り.
 
 \LaTeX では数式ファミリ番号は欧文と共用→$\the\jfam$