OSDN Git Service

Fix #43130
[luatex-ja/luatexja.git] / test / test07-math-unicode.tex
1 %#!lualatex
2 \documentclass{article}
3 \usepackage[a4paper]{geometry}
4 \makeatletter
5
6 \usepackage{unicode-math}
7
8 \usepackage{luatexja-fontspec}
9 \setmainjfont{IPAGothic}
10 \setmathfont{XITSMath}
11
12 \ltj@alljachar %←全部の(>=U+0080な)文字を和文文字扱いに!
13 \setmainfont{TexGyreTermes}
14
15 \reDeclareMathAlphabet{\mathtestA}{\mathrm}{\mathmc}
16 \reDeclareMathAlphabet{\mathtestB}{\mathrm}{\mathtestb}
17 \reDeclareMathAlphabet{\mathtestC}{\mathtesta}{\mathmc}
18 \reDeclareMathAlphabet{\mathtestD}{\mathtesta}{\mathtestb}
19 \reDeclareMathAlphabet{\mathtestE}{\mathtestE}{\mathmc}
20 \begin{document}\makeatletter
21 \[
22  \frac1{1^2}+\frac1{2^2}+\cdots=
23 \sum_{n=1}^\infty \frac1{n^s}=\zeta(2)=\frac{\pi^2}{6}
24 =\frac16\cdot \pi\times\pi,\qquad a_1,\dots,a_n.
25 \]
26
27 $\hslash$
28
29 ○×○漢×漢\times え\ltjjachar`\“え\ltjalchar`\“え\textquotedblleft え“え←数式外では和文文字扱いのままになっている.
30
31 \kanjifamily{mc}\selectfont
32 $あいうえおabcde a^\mathrm{b}$
33
34 mathrm: $\mathrm{\alpha あいうえおabcde}^\mathrm{b}$
35
36 mathbf: $\mathbf{\alpha あいうえおabcde}$
37
38 mathmc: $\mathmc{\alpha あいうえおabcde}$
39
40 mathgt: $\mathgt{\alpha あいうえおabcde}$
41
42 \tt\meaning\mathtestA
43
44 \tt\meaning\mathtestB
45
46 \tt\meaning\mathtestC
47
48 \tt\meaning\mathtestD
49
50 \tt\meaning\mathtestE
51
52 \meaning\lfloor
53 \[
54 \lceil x\rceil + \lfloor x\rfloor +\hat a-\sqrt{a} - [\hbar]
55 \]
56 \end{document}