OSDN Git Service

small fix
[luatex-ja/luatexja.git] / test / test27-lineprofile.tex
1 \documentclass[10ptj]{ltjsarticle}
2 \usepackage[width=40\zw, lines=40,centering]{geometry}
3 \usepackage{amsmath,luacode,xcolor,luatexja-adjust}
4 \begin{document}
5 \def\R#1#2{\ltjenableadjust[profile=#1,linestep=#2]%
6 \noindent\fbox{\parbox{25\zw}{%
7 \baselineskip14pt\noindent
8 \setbox2=\vtop{\noindent\hsize20\zw\textcolor{cyan!30!white}{%
9  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
10  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
11  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
12  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
13  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
14  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
15  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
16  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
17  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
18  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
19  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
20  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
21  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
22  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
23  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
24  □□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■□□□□■
25  □□□□■□□□□■□□□□■□□□□■
26 }}\dp2=0pt\rlap{\copy2}\par\vspace*{-\baselineskip}
27 \textbf{profile: #1, linestep: #2}\par
28 \vrule height 2pt depth 0pt width 10\zw\\
29 \vrule height 2pt depth 0pt width 10\zw\\
30 \the\baselineskip あああああああああああああああ\\
31 あああああああああ$X_{X_{X_X}}$ああああああ\\
32 ああああああああああああああああああ\\
33 ……であるから$b=\dfrac1{X_2}$となる.\\
34 一方$\dfrac{A^A}{B_B}=21$なので……\\
35 ……であるから$b=\dfrac1{X_2}$となる.\\%\vadjust{あああああ$\dfrac34$}\\
36 一方$\dfrac{A^A}{B_B}=21$なので……
37
38 あいであるから$b=\dfrac1{X_2}$となる.新段落!\\
39 一方$\dfrac{A^A}{B_B}=21$なので……
40
41 \hbox{感じ感じ$\displaystyle\int$}
42 ほげであるから$b=\dfrac1{X_2}$となる.新段落!\\
43 一方$\dfrac{A^A}{B_B}=21$なので……
44
45 \hrule
46 かきであるから$b=\dfrac1{X_2}$となる.hrule無効\\
47 一方$\dfrac{A^A}{B_B}=21$なので……
48
49 \prevdepth0pt
50 うえであるから$b=\dfrac1{X_2}$prevdepth設定のため無効\\
51 一方$\dfrac{A^A}{B_B}=21$なので……
52 }}\newpage}
53
54
55 \R{false}{false}
56 \R{true}{false}
57 \R{false}{true}
58 \R{true}{true}
59
60 \ltjgetparameter{linestep_factor}
61
62 \ltjdisableadjust
63 \def\R#1#2{\ltjenableadjust[profile=#1,priority=#2]%
64 \noindent\fbox{\parbox[t]{20\zw}{%
65 \baselineskip14pt\noindent
66 \textbf{profile: #1, priority: #2}\par
67   \ltjsetparameter{xkanjiskip=.25\zw plus 20pt minus 20pt}
68   ああxあaaaあxあx\vrule height 30pt depth 30pt width 9.7\zw「\break
69   \vrule height 30pt depth 30pt width9.6\zw xあxあxあaaaああ「\break
70 }}}
71
72 \R{false}{false}%
73 \R{true}{false}\\
74 \R{false}{true}%
75 \R{true}{true}%
76
77 \ltjdisableadjust
78 \ltjenableadjust[profile]
79
80 \def\R#1{%
81   \fbox{\parbox[t]{130pt}{\lineskip1pt\textbf{#1pt (\texttt{lineskip}: \the\lineskip)}\\%
82     \noindent\vrule height 5pt depth 50pt width 45pt\kern30pt%
83     \vrule height 5pt depth 50pt width 30pt\\
84     \textcolor{red}{\kern\dimexpr45pt+#1pt\vrule height 50pt depth 5pt width20pt}%
85     \textcolor{blue}{\kern-40pt\vrule height 5pt depth 5pt width 60pt}%
86   }}\hskip0pt\ignorespaces
87 }
88
89 \newpage
90 \texttt{profile\_hgap\_factor=\ltjgetparameter{profile_hgap_factor}}\par
91 \noindent
92 \R{0}\R{0.5}\R{1}\R{2}\R{8}\R{9}\R{10}
93
94
95 \newpage
96 \ltjsetparameter{profile_hgap_factor=2}
97 \texttt{profile\_hgap\_factor=\ltjgetparameter{profile_hgap_factor}}\par
98 \noindent
99 \R{0}\R{0.5}\R{1}\R{2}\R{8}\R{9}\R{10}
100
101 \end{document}