\def\ltj@pkgpatch#1{\ltj@AtBeginDocument{\@ifpackageloaded{#1}{\usepackage{lltjp-#1}}{}}}
-% similar to \ltj@pkgpatch, but this is used .sty which
-% can be reloaded inside the document by \input.
-\def\ltj@pkgpatchA#1{\ltj@AtBeginDocument{\@ifpackageloaded{#1}{\input{lltjp-#1.sty}}{}}}
-
\endlinechar=13
%%% patch for LaTeX
\usepackage{lltjdefs}
\usepackage{lltjcore}
+\RequirePackage{filehook}
+\def\ltj@pkgpatch@im#1{%
+ \@ifnextchar[{\ltj@pkgpatch@im@{#1}}{\ltj@pkgpatch@im@{#1}[lltjp-#1]}}%]
+\def\ltj@pkgpatch@im@#1[#2]{\AtEndOfPackageFile*{#1}{\input{#2.sty}}}
+
%%% default parameters
\directlua{
local s = kpse.find_file('ltj-kinsoku.lua', 'tex')
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
%%% patch for packages
-\ltj@pkgpatch{listings}
-\ltj@pkgpatch{xunicode}
-\ltj@pkgpatch{fontspec}
-\ltj@pkgpatch{footmisc}
+\ltj@pkgpatch@im{listings}
+\ltj@pkgpatch{xunicode} %% at \begin{document}
+\ltj@pkgpatch{fontspec} %% at \begin{document}
+\ltj@pkgpatch@im{fontspec}[lltjp-fontspec-immediate]
+\ltj@pkgpatch{footmisc} %% at \begin{document}
\ltj@pkgpatch{tascmac}
\ltj@AtBeginDocument{\@ifpackageloaded{ascmac}{%
\edef\ltj@asc@temp{\noexpand\catcode`\noexpand\@=\the\catcode`\@}%
\makeatletter\input{lltjp-tascmac.sty}%
\ltj@asc@temp\let\ltj@asc@temp=\relax
}{}}% ascmac
-\ltj@pkgpatch{stfloats}
-\ltj@pkgpatch{preview}
-\ltj@pkgpatch{array}
+\ltj@pkgpatch@im{stfloats}
+\ltj@pkgpatch{preview} %% at \begin{document}
+ % (preview package has delayed option)
+\ltj@pkgpatch{array} %% at \begin{document}
+\ltj@pkgpatch@im{unicode-math}
+\ltj@pkgpatch@im{siunitx}
\RequirePackage{lltjp-geometry}
-\RequirePackage{filehook}
-\AtEndOfPackageFile*{fontspec}{%
- \input{lltjp-fontspec-immediate.sty}
- % \RequirePackage だと fontspec にオプション指定したときにエラー出る
-}
-\AtEndOfPackageFile*{unicode-math}{%
- \input{lltjp-unicode-math-immediate.sty}
-}
-
-\@ifpackageloaded{siunitx}{%
- \chardef\ltj@patch@siunitx@execute\z@\input{lltjp-siunitx.sty}%
-}{%
- \AtBeginOfPackageFile*{siunitx}{\input{lltjp-siunitx.sty}}%
-}
-\AtEndOfPackageFile*{siunitx}{\csname __ltj_siunitx_patch:\endcsname}
%%------------------ all done
\ltj@latex@AtEnd
\__ltj_siunix_patch_inner:n { l__siunitx_#1_math }
\__ltj_siunix_patch_inner:n { l__siunitx_#1_text }
}
-\cs_new:Nn \__ltj_siunitx_patch: {
- \AtBeginDocument {
- \__ltj_siunix_patch_inner:n { c__siunitx_minus }
- \__ltj_siunix_patch_inner:n { c__siunitx_mu }
- \__ltj_siunix_patch_inner_math:n { angstrom }
- \__ltj_siunix_patch_inner_math:n { arcminute }
- \__ltj_siunix_patch_inner_math:n { arcsecond }
- \__ltj_siunix_patch_inner_math:n { ohm }
- }
+\AtBeginDocument {
+ \__ltj_siunix_patch_inner:n { c__siunitx_minus }
+ \__ltj_siunix_patch_inner:n { c__siunitx_mu }
+ \__ltj_siunix_patch_inner_math:n { angstrom }
+ \__ltj_siunix_patch_inner_math:n { arcminute }
+ \__ltj_siunix_patch_inner_math:n { arcsecond }
+ \__ltj_siunix_patch_inner_math:n { ohm }
}
-\ifdefined\ltj@patch@siunitx@executed\__ltj_siunitx_patch:\fi
-
\ExplSyntaxOff
\endinput
%#!lualatex
-\documentclass{ltjsarticle}
+\documentclass{article}
\usepackage[a4paper]{geometry}
-\makeatletter\ltj@alljachar %←全部の(>=U+0080な)文字を和文文字扱いに!
+\makeatletter
-\usepackage{luatexja-fontspec}
\usepackage{unicode-math}
-
-\setmathfont{XITSMath}
+\usepackage{luatexja-fontspec}
\setmainjfont{IPAGothic}
+\setmathfont{XITSMath}
+
+\ltj@alljachar %←全部の(>=U+0080な)文字を和文文字扱いに!
+\setmainfont{TexGyreTermes}
-\makeatletter
\reDeclareMathAlphabet{\mathtestA}{\mathrm}{\mathmc}
\reDeclareMathAlphabet{\mathtestB}{\mathrm}{\mathtestb}
\reDeclareMathAlphabet{\mathtestC}{\mathtesta}{\mathmc}
\reDeclareMathAlphabet{\mathtestD}{\mathtesta}{\mathtestb}
\reDeclareMathAlphabet{\mathtestE}{\mathtestE}{\mathmc}
\begin{document}\makeatletter
-
\[
\frac1{1^2}+\frac1{2^2}+\cdots=
\sum_{n=1}^\infty \frac1{n^s}=\zeta(2)=\frac{\pi^2}{6}
\tt\meaning\mathtestD
\tt\meaning\mathtestE
+
+\meaning\lfloor
+\[
+\lceil x\rceil + \lfloor x\rfloor +\hat a-\sqrt{a} - [\hbar]
+\]
\end{document}
\usepackage{luatexja}
-\usepackage{luatexja-fontspec,booktabs,array,lltjext}
+\usepackage{luatexja-fontspec}
+\usepackage{booktabs,array,lltjext}
\defaultfontfeatures{Numbers=OldStyle}
\setmainfont{TeXGyreTermes}
\setmainjfont[BoldFont=IPAexGothic]{IPAexMincho} % default: JFM=ujis
\setsansjfont{IPAexGothic}
-\newjfontfamily\ipajisninety[CJKShape=JIS1990]{IPAexMincho}
+\setjfontfamily\ipajisninety[CJKShape=JIS1990]{IPAexMincho}
\normalsize
\usepackage[margin=25mm,a4paper]{geometry}
\vbox{\hsize=7\zw\tate\parindent1\zw\R}}
\subsection{Kerning}
-{\jfontspec[NoEmbed]{Ryumin-Light}
-
+{\jfontspec{KozMinPr6N-Regular}
アノ ← Kerning=Off
\noindent{\addjfontfeatures{Kerning=On} アノ ← Kerning=On}
-}
+\par}
\subsection{unicode}
\newpage
\section{fontspecによる非埋め込みフォント}
-\newjfontfamily\test[BoldFont=GothicBBB-Medium, NoEmbed]{Ryumin-Light}
+\setjfontfamily\test[BoldFont=GothicBBB-Medium, NoEmbed]{Ryumin-Light}
%{\test
%\begin{tabular}<y>{ll>{\itshape}l>{\slshape}l}
%\end{tabular}}
\section{JFMの違い}
-\newjfontfamily\test[ TateFont=KozGoPr6N-Light ]{KozMinPr6N-Bold}
+\setjfontfamily\test[ TateFont=KozGoPr6N-Light ]{KozMinPr6N-Bold}
\def\yttest{\leavevmode%
\parbox<y>{20\zw}{%
\yttest
+\section{match}
+
+\normalfont
+\sffamily aiuあいう\rmfamily aiuあいう \ttfamily aiuあいう
+
\end{document}
\ No newline at end of file