%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjskiyou}
- [2016/12/16 ltjsclasses ]
+ [2020/12/23 ltjsclasses ]
\def\jsc@clsname{ltjskiyou}
+\def\Cjascale{0.924715}
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
\DeclareOption{10.5ptj}{\def\jsc@magscale{1.139}}
\DeclareOption{11ptj}{\def\jsc@magscale{1.194}}
\DeclareOption{12ptj}{\def\jsc@magscale{1.302}}
-\newif\if@ltjs@mag@xreal
-\@ltjs@mag@xrealtrue
-\DeclareOption{nomag*}{\@ltjs@mag@xrealtrue}
-\DeclareOption{nomag}{\@ltjs@mag@xrealfalse}
-\DeclareOption{noxreal}{%
- \ClassWarningNoLine{\jsc@clsname}{%
- The class option `noxreal' is obsolete. \MessageBreak
- Please use the `nomag' option instead}%
- \@ltjs@mag@xrealfalse}
-\DeclareOption{real}{%
- \ClassWarningNoLine{\jsc@clsname}{%
- The class option `real' is obsolete. \MessageBreak
- Please use the `nomag' option instead}%
- \@ltjs@mag@xrealfalse}
+\newif\ifjsc@mag@xreal
+\jsc@mag@xrealtrue
+\DeclareOption{nomag*}{\jsc@mag@xrealtrue}
+\DeclareOption{nomag}{\jsc@mag@xrealfalse}
\DeclareOption{usemag}{%
\ClassWarningNoLine{\jsc@clsname}{%
This \jsc@clsname\space cls does not support `usemag'\MessageBreak
option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
- \@ltjs@mag@xrealtrue}
-
+ \jsc@mag@xrealtrue}
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
&\global\@eqcnt\thr@@ \hb@xt@\z@\bgroup\hss##\egroup
\tabskip\z@skip\cr
}}
-\DeclareOption{disablejfam}{%
- \ClassWarningNoLine{\jsc@clsname}{The class option 'disablejfam' is obsolete}}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\newif\ifmingoth
\newif\ifptexjis
\ptexjisfalse
\DeclareOption{winjis}{%
- \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `winjis' option}}
+ \ClassWarningNoLine{\jsc@clsname}{this class does not support `winjis' option}}
\DeclareOption{uplatex}{%
- \ClassErrorNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `uplatex' option}}
+ \ClassError{\jsc@clsname}{this class does not support `uplatex' option}}
\DeclareOption{autodetect-engine}{%
- \ClassWarningNoLine{\jsc@clsname}{The \jsc@clsname\space class does not support `autodetect-engine' option}}
+ \ClassWarningNoLine{\jsc@clsname}{this class does not support `autodetect-engine' option}}
\DeclareOption{mingoth}{\mingothtrue}
\DeclareOption{ptexjis}{\ptexjistrue}
\DeclareOption{jis}{\jisfonttrue}
\ifdim\jsc@mpt=1.0954\p@ \renewcommand{\@ptsize}{1}\else
\ifdim\jsc@mpt=1.2\p@ \renewcommand{\@ptsize}{2}\else
\renewcommand{\@ptsize}{-20}\fi\fi
-\if@ltjs@mag@xreal\RequirePackage{type1cm}
-\ifdim\jsc@mpt=\p@\else
+\ifjsc@mag@xreal
+\ifdim\jsc@mpt=\p@\jsc@mag@xrealfalse\else
\expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname TU/lmr/m/n/10\endcsname\relax
\expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
\newluafunction\ltjs@@magnify@font@calc
\begingroup\catcode`\%=12\relax
local getdimen, mpt=tex.getdimen, tex.getdimen('jsc@mpt')/65536
local t = lua.get_functions_table()
t[\the\ltjs@@magnify@font@calc] = function()
- tex.sprint(math.floor(0.5+mpt*getdimen('dimen@')))
+ tex.sprint(-2,math.floor(0.5+mpt*getdimen('dimen@')))
end
function luatexja.ltjs_unmagnify_fsize(a)
local s = luatexja.print_scaled(math.floor(0.5+a/mpt*65536))
- tex.sprint( (s:match('%.0$')) and s:sub(1,-3) or s )
+ tex.sprint(-2, (s:match('%.0$')) and s:sub(1,-3) or s )
end
}
\endgroup
\def\@tempa{#1}\def\@tempb{#2}%
\ifx\@tempb\@empty
\edef\@tempb{ scaled\directlua{%
- tex.sprint(math.floor(0.5+\jsc@magscale*1000))
+ tex.sprint(-2,math.floor(0.5+\jsc@magscale*1000))
}}%
\else
\dimen@\@tempb\relax
\def\jsc@smallskip{\vspace\jsc@smallskipamount}
\newskip\jsc@smallskipamount
\jsc@smallskipamount=3\jsc@mpt plus 1\jsc@mpt minus 1\jsc@mpt
-\newlength{\stockwidth}
-\newlength{\stockheight}
-\setlength{\stockwidth}{\paperwidth}
-\setlength{\stockheight}{\paperheight}
\iftombow
+ \newlength{\stockwidth}
+ \newlength{\stockheight}
+ \setlength{\stockwidth}{\paperwidth}
+ \setlength{\stockheight}{\paperheight}
\advance \stockwidth 2in
\advance \stockheight 2in
-\fi
-\ifdefined\pdfpagewidth
- \setlength{\pdfpagewidth}{\stockwidth}
- \setlength{\pdfpageheight}{\stockheight}
+ \ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\stockwidth}
+ \setlength{\pdfpageheight}{\stockheight}
+ \else
+ \setlength{\pagewidth}{\stockwidth}
+ \setlength{\pageheight}{\stockheight}
+ \fi
\else
- \setlength{\pagewidth}{\stockwidth}
- \setlength{\pageheight}{\stockheight}
+ \ifdefined\pdfpagewidth
+ \setlength{\pdfpagewidth}{\paperwidth}
+ \setlength{\pdfpageheight}{\paperheight}
+ \else
+ \setlength{\pagewidth}{\paperwidth}
+ \setlength{\pageheight}{\paperheight}
+ \fi
\fi
\expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
\ifmingoth
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=min}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=min}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [\Cjascale] \ltj@stdmcfont:jfm=min}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [\Cjascale] \ltj@stdgtfont:jfm=min}{}
\else
\ifptexjis
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=jis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=jis}{}
- \else
- \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujis}{}
- \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujis}{}
+ \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [\Cjascale] \ltj@stdmcfont:jfm=jis}{}
+ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [\Cjascale] \ltj@stdgtfont:jfm=jis}{}
\fi
\fi
-\DeclareFontShape{JT3}{mc}{m}{n}{<-> s * [0.924715] \ltj@stdmcfont:jfm=ujisv}{}
-\DeclareFontShape{JT3}{gt}{m}{n}{<-> s * [0.924715] \ltj@stdgtfont:jfm=ujisv}{}
\DeclareFontShape{JY3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JY3}{mc}{b}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JY3}{mc}{b}{n}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{it}{<->ssub*mc/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{sl}{<->ssub*mc/m/n}{}
\DeclareFontShape{JY3}{mc}{m}{sc}{<->ssub*mc/m/n}{}
\DeclareFontShape{JY3}{gt}{m}{sl}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{bx}{it}{<->ssub*gt/m/n}{}
\DeclareFontShape{JY3}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
-%% \DeclareFontShape{JT3}{mc}{m}{it}{<->ssub*mc/m/n}{}
-%% \DeclareFontShape{JT3}{mc}{m}{sl}{<->ssub*mc/m/n}{}
-%% \DeclareFontShape{JT3}{mc}{m}{sc}{<->ssub*mc/m/n}{}
-%% \DeclareFontShape{JT3}{gt}{m}{it}{<->ssub*gt/m/n}{}
-%% \DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{}
-%% \DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{}
-%% \DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JY3}{mc}{b}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JY3}{mc}{b}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{gt}{bx}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{b}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{b}{n}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{m}{it}{<->ssub*mc/m/n}{}
+\DeclareFontShape{JT3}{mc}{m}{sl}{<->ssub*mc/m/n}{}
+\DeclareFontShape{JT3}{mc}{m}{sc}{<->ssub*mc/m/n}{}
+\DeclareFontShape{JT3}{gt}{m}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{gt}{m}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{bx}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{b}{it}{<->ssub*gt/m/n}{}
+\DeclareFontShape{JT3}{mc}{b}{sl}{<->ssub*gt/m/n}{}
\renewcommand\jttdefault{\gtdefault}\@ltj@match@familytrue
%%
\AtBeginDocument{%
- \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
- \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}}%
+ \unless\ifltj@disablejfam
+ \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
+ \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
+ \fi
+}%
\ltjsetparameter{jaxspmode={`!,2}}
\ltjsetparameter{jaxspmode={`〒,1}}
\ltjsetparameter{alxspmode={`+,3}}
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
\mcfamily\selectfont\normalsize
-\setbox0\hbox{\char"3000}% 全角スペース
+\setbox0\hbox{漢}
\setlength\Cht{\ht0}
\setlength\Cdp{\dp0}
\setlength\Cwd{\wd0}
\setlength\Cvs{\baselineskip}
\setlength\Chs{\wd0}
+\setbox0=\box\voidb@x
\newcommand{\small}{%
\ltj@@ifnarrowbaselines
{\jsc@setfontsize\small{8.8888}{11}}%
\addtolength{\textheight}{\topskip}
\addtolength{\textheight}{0.1\jsc@mpt}
\def\flushbottom{%
- \def\@textbottom{\vskip \z@ \@plus.1\jsc@mpt}%
- \let\@texttop\relax}
+ \def\@textbottom{\vskip \z@ \@plus.1\jsc@mpt}%
+ \let\@texttop\relax}
\setlength\marginparsep{\columnsep}
\setlength\marginparpush{\baselineskip}
\setlength{\oddsidemargin}{\paperwidth}
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
\if@slide
{\vskip\if@twocolumn-5\jsc@mpt\else-6\jsc@mpt\fi
\maybeblue\hrule height0\jsc@mpt depth1\jsc@mpt
- \vskip\if@twocolumn 4\jsc@mpt\else 7\jsc@mpt\fi\relax}
+ \vskip\if@twocolumn 4\jsc@mpt\else 7\jsc@mpt\fi\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
\renewcommand{\theenumiii}{\@roman\c@enumiii}
\renewcommand{\theenumiv}{\@Alph\c@enumiv}
\newcommand{\labelenumi}{\theenumi.}
-\newcommand{\labelenumii}{\inhibitglue(\theenumii)\inhibitglue}
+\newcommand{\labelenumii}{\inhibitglue (\theenumii)\inhibitglue}
\newcommand{\labelenumiii}{\theenumiii.}
\newcommand{\labelenumiv}{\theenumiv.}
\renewcommand{\p@enumii}{\theenumi}
-\renewcommand{\p@enumiii}{\theenumi\inhibitglue(\theenumii)}
+\renewcommand{\p@enumiii}{\theenumi\inhibitglue (\theenumii)}
\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
- \setcounter{page}\@ne
+ \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
\@dottedtocline{5}{\@tempdima}{6\zw}}
\newdimen\@lnumwidth
\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}\hspace{0pt}}
+\def\jsTocLine{\leaders\hbox{%
+ $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill}
\def\@dottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
\vskip \z@ \@plus.2\jsc@mpt
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\@lnumwidth #3\relax
\advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
{#4}\nobreak
- \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
- mu$}\hfill \nobreak\hb@xt@\@pnumwidth{%
+ \jsTocLine \nobreak\hb@xt@\@pnumwidth{%
\hfil\normalfont \normalcolor #5}\par}\fi}
\newcommand{\listoffigures}{%
\section*{\listfigurename}%
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@parboxrestore
+ \def\@currentcounter{footnote}%
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark
}%
\color@begingroup
\@makefntext{%
\rule\z@\footnotesep\ignorespaces}%
- \futurelet\next\fo@t}
-\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
- \else \let\next\f@t\fi \next}
-\def\f@@t{\bgroup\aftergroup\@foot\let\next}
-\def\f@t#1{#1\@foot}
-\def\@foot{\@finalstrut\strutbox\color@endgroup\egroup}
+ \futurelet\jsc@next\jsc@fo@t}
+\def\jsc@fo@t{\ifcat\bgroup\noexpand\jsc@next \let\jsc@next\jsc@f@@t
+ \else \let\jsc@next\jsc@f@t\fi \jsc@next}
+\def\jsc@f@@t{\bgroup\aftergroup\jsc@@foot\let\jsc@next}
+\def\jsc@f@t#1{#1\jsc@@foot}
+\def\jsc@@foot{\@finalstrut\strutbox\color@endgroup\egroup}
\newcommand\@makefntext[1]{%
\advance\leftskip 3\zw
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
+\def\pltx@today@year@#1{%
+ \ifnum\numexpr\year-#1=1 元\else
+ \ifnum\ltjgetparameter{direction}=3
+ \kansuji\numexpr\year-#1\relax
+ \else
+ \number\numexpr\year-#1\relax\nobreak
+ \fi
+ \fi 年
+}
+\def\pltx@today@year{%
+ \ifnum\numexpr\year*10000+\month*100+\day<19890108
+ 昭和\pltx@today@year@{1925}%
+ \else\ifnum\numexpr\year*10000+\month*100+\day<20190501
+ 平成\pltx@today@year@{1988}%
+ \else
+ 令和\pltx@today@year@{2018}%
+ \fi\fi}
\def\today{%
\if@english
\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year
+ \else\if西暦
+ \ifnum\ltjgetparameter{direction}=3 \kansuji\year
+ \else\number\year\nobreak\fi 年
\else
- \if西暦
- \number\year 年
- \number\month 月
- \number\day 日
- \else
- 平成\number\heisei 年
- \number\month 月
- \number\day 日
- \fi
- \fi}
+ \pltx@today@year
+ \fi
+ \ifnum\ltjgetparameter{direction}=3
+ \kansuji\month 月
+ \kansuji\day 日
+ \else
+ \number\month\nobreak 月
+ \number\day\nobreak 日
+ \fi\fi}
\hyphenation{ado-be post-script ghost-script phe-nom-e-no-log-i-cal man-u-script}
-\if@slide \pagestyle{empty} \else \pagestyle{plain} \fi
+\pagestyle{plain}
\pagenumbering{arabic}
+\fnfixbottomtrue % 2017-02-19
+\IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{}
\if@twocolumn
\twocolumn
\sloppy