OSDN Git Service

Fix #43130
[luatex-ja/luatexja.git] / test / test12-ltjtarticle.tex
index bb7739a..98c142c 100644 (file)
-%#!lualatex
-\documentclass{ltjtarticle}
-\usepackage[margin=20mm]{geometry}
-
-\makeatletter
-\newif\ifnot@advanceline
-\newskip\rensujiskip
-\rensujiskip=0.25\chs plus.25\zw minus.25\zw
-\DeclareRobustCommand\rensuji{%
-  \@ifstar{\not@advancelinetrue\@rensuji}{\@rensuji}}
-\def\@rensuji{\@ifnextchar[{\@@rensuji}{\@@rensuji[c]}}
-\def\@@rensuji[#1]#2{\ifydir\hbox{#2}\else
-  \hskip\rensujiskip
-  \ifvmode\leavevmode\fi
-  \ifnot@advanceline\not@advancelinefalse\else
-    \setbox\z@\hbox{\yoko#2}%
-    \@tempdima\ht\z@ \advance\@tempdima\dp\z@
-    \if #1c\relax\vrule\@width\z@ \@height.5\@tempdima \@depth.5\@tempdima
-    \else\if #1r\relax\vrule\@width\z@\@height\z@ \@depth\@tempdima
-    \else\vrule\@width\z@ \@height\@tempdima \@depth\z@
-    \fi\fi
-  \fi
-  \if #1c\relax\hbox to1zw{\yoko\hss#2\hss}%
-  \else\if #1r\relax\vbox{\hbox to1zw{\yoko\hss#2}}%
-  \else\vtop{\hbox to1zw{\yoko#2\hss}}%
-  \fi\fi
-  \hskip\rensujiskip
-\fi}
-\let\Rensuji\rensuji
-\let\prensuji\rensuji
-
+% %#!ptex2pdf -l test12-ltjtarticle.tex
+\let\ifydir=\iftrue
+\ifdefined\directlua
+  \documentclass{ltjtarticle}
+\else
+  \documentclass{tarticle}
+  \def\zw{zw}
+  \usepackage{lltjp-geometry}
+  \makeatletter
+  \renewcommand\@makefnmark{%
+    \ifydir \hbox{}\hbox{\@textsuperscript{\normalfont\@thefnmark}}\hbox{}%
+    \else\hbox{\yoko\@textsuperscript{\normalfont\@thefnmark}}\fi}
+  \makeatother
+\fi
+%\usepackage{sansmathfonts}
+\usepackage[no-math]{fontspec}
+\usepackage[b5j,lines=20, textwidth=30\zw]{geometry}
+\usepackage[kozuka-pr6n]{luatexja-preset}
+\addjfontfeatures{TateFeatures={Opacity=0.5, Color=red, JFM=tmin}}
+\title{ぴよ}
+\author{誰かhoge}
 \begin{document}
-酵素(こうそ)とは、生体で起こる化学反応に対して触媒として機能する分子である。酵素によって触媒される反応を“酵素的”反応という。
+\maketitle
+{\obeylines\texttt{%
+%baselineshift: \ltjgetparameter{talbaselineshift}
+topskip: \the\topskip
+maxdepth: \the\maxdepth
+textheight: \the\textheight
+baselineskip: \the\baselineskip}\par}
+
+酵素(こうそ)とは、生体で起こる化学反応に対して触媒として能機する分子である。酵素によって触媒される反応を“酵素的”反応という。
 
 酵素は生物が物質を消化する段階から吸収・輸送・代謝・排泄に至るまでのあらゆる過程に関与しており、生体が物質をj変化させて利用するのに欠かせない。したがって、酵素は生化学研究における一大分野であり、早い段階から研究対象になっている。
 
-多くの酵素は生体内で作り出されるタンパク質を基にして構成されている。したがって、生体内での生成や分布の特性、熱や pH によって変性して活性を失う(失活)といった特性などは、他のタンパク質と同様である。
+多くの酵素は生体内で作り出されるタンパク質を基にして構成されている。したがって、生体内での
+生成や分布の特性、熱や pH によって変性して活性を失う(失活)といった特性などは、他のタンパ
+ク質\marginpar{「あっ!」と驚く}と同様である。
 
 生体を機関に例えると、核酸塩基配列が表すゲノムが設計図に相当するのに対して、生体内における酵素は組立て工具に相当する。酵素の特徴である作用する物質(基質)をえり好みする性質(基質特異性)と目的の反応だけを進行させる性質(反応選択性)などによって、生命維持に必要なさまざまな化学変化を起こさせるのである。
 
 古来から人類は発酵という形で酵素を利用してきた。今日では、酵素の利用は食品製造だけにとどまらず、化学工業製品の製造や日用品の機能向上など、広い分野に応用されている。医療においても、酵素量を検査して診断したり、酵素作用を調節する治療薬を用いるなど、酵素が深く関っている。
 
+\begin{flushright}
+(Wikipedia日本語版の「酵素」より)
+\end{flushright}
+
+\def\R{01234567890123456789}
+\def\S{\R\R\R\R\R\R\R\R\R\R\R\R あ\footnote{脚注}\R\R\R\R\R\R\R\R\R\par}
+
+連数字のテスト\rensuji{42}\S\S
+\leavevmode \leaders\hbox{2}\hskip2pt
+
+あいうえおabc$-\vcenter{\noindent abc}$あいう$adxvsv\footnote{あいうえおabc}Ha$.
+
+\newpage
+
+\newpage
+\ExplSyntaxOn
+\cs_new:Nn \my_test_dir: {\texttt{
+  \platex_if_direction_yoko:T { Y }
+  \platex_if_direction_tate_nomath:T { T }
+  \platex_if_direction_dtou:T { D }
+  \platex_if_direction_utod:T { U }
+  \space
+  \platex_if_direction_tate:T { Tx }
+  \platex_if_direction_tate_math:T { Tm }
+}}
+\cs_new:Nn \my_test_box: {\texttt{
+  \platex_if_box_yoko:NT \l_tmpa_box { Y }
+  \platex_if_box_tate_nomath:NT \l_tmpa_box { T }
+  \platex_if_box_dtou:NT \l_tmpa_box { D }
+  \platex_if_box_utod:NT \l_tmpa_box { U }
+  \space
+  \platex_if_box_tate:NT \l_tmpa_box { Tx }
+  \platex_if_box_tate_math:NT \l_tmpa_box { Tm }
+}}
+
+\mode_leave_vertical:
+\hbox:n { \platex_direction_yoko: ABCあーいう \my_test_dir: }
+\hbox:n { \platex_direction_tate: ABCあーいう \my_test_dir: }
+\hbox:n { \platex_direction_dtou: ABCあーいう \my_test_dir: }
+
+\par
+\mode_leave_vertical:
+\hbox:n { \platex_direction_tate: $\hbox{PBCあーいう \my_test_dir:}$ }
+\hbox:n { \platex_direction_utod: ABCあーいう \my_test_dir: }
+
+\par
+1.~\hbox_set:Nn \l_tmpa_box { \platex_direction_yoko: ABCあーいう } \my_test_box:\par
+2.~\hbox_set:Nn \l_tmpa_box { \platex_direction_tate: ABCあーいう } \my_test_box:\par
+3.~\hbox_set:Nn \l_tmpa_box { \platex_direction_dtou: ABCあーいう } \my_test_box:\par
+4.~\hbox_set:Nn \l_tmpa_box { \platex_direction_utod: ABCあーいう } \my_test_box:\par
+5.~\hbox:n { \platex_direction_tate: $ \hbox_gset:Nn \l_tmpa_box { ABCあーいう } $ } \my_test_box:
+\ExplSyntaxOff
+
+
+\newpage
+\dtou
+あいうえお\footnote{あいうえおabc}あ
 
-\end{document}
\ No newline at end of file
+\end{document}