OSDN Git Service

target release date: 2019-01-07 (documentation: WIP)
[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 \ltjdisableadjust
61 \def\R#1#2{\ltjenableadjust[profile=#1,priority=#2]%
62 \noindent\fbox{\parbox[t]{20\zw}{%
63 \baselineskip14pt\noindent
64 \textbf{profile: #1, priority: #2}\par
65   \ltjsetparameter{xkanjiskip=.25\zw plus 20pt minus 20pt}
66   ああxあaaaあxあx\vrule height 30pt depth 30pt width 9.7\zw「\break
67   \vrule height 30pt depth 30pt width9.7\zw xあxあxあaaaああ「\break
68 }}}
69
70 \R{false}{false}%
71 \R{true}{false}\\
72 \R{false}{true}%
73 \R{true}{true}%
74
75 \ltjdisableadjust
76 \ltjenableadjust[profile]
77
78 \def\R#1{%
79   \fbox{\parbox[t]{130pt}{\lineskip1pt\textbf{#1pt (\texttt{lineskip}: \the\lineskip)}\\%
80     \noindent\vrule height 5pt depth 50pt width 45pt\kern30pt%
81     \vrule height 5pt depth 50pt width 30pt\\
82     \textcolor{red}{\kern\dimexpr45pt+#1pt\vrule height 50pt depth 5pt width20pt}%
83     \textcolor{blue}{\kern-40pt\vrule height 5pt depth 5pt width 60pt}%
84   }}\hskip0pt\ignorespaces
85 }
86
87 \noindent
88 \R{0}
89 \R{0.5}
90 \R{1}
91 \R{9}
92 \R{10}
93
94 \ltjsetparameter{profile_hgap_factor=2}
95 \R{0}
96 \R{1.5}
97 \R{2}
98 \R{8}
99 \R{10}
100
101 \end{document}