Skip to content

Commit

Permalink
make jisfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Oct 5, 2020
1 parent 68c9de2 commit 708c502
Show file tree
Hide file tree
Showing 17 changed files with 321 additions and 201 deletions.
40 changes: 22 additions & 18 deletions jis/jsarticle.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,13 @@
%%
%% The original source files were:
%%
%% jsclasses.dtx (with options: `article')
%% jsclasses.dtx (with options: `class,article')
%%
%% IMPORTANT NOTICE:
%% Maintained on GitHub: https://github.com/texjporg/jsclasses
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from jsarticle.cls.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file jsclasses.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsarticle}
[2020/02/02 jsclasses (okumura, texjporg)]
[2020/10/05 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jsarticle}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
Expand Down Expand Up @@ -256,10 +244,11 @@
\fi
\ifpapersize
\iftombow
\AtBeginDvi{\special{papersize=\the\stockwidth,\the\stockheight}}
\edef\jsc@papersize@special{papersize=\the\stockwidth,\the\stockheight}
\else
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\edef\jsc@papersize@special{papersize=\the\paperwidth,\the\paperheight}
\fi
\AtBeginDvi{\special{\jsc@papersize@special}}
\fi
\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
\newdimen\jsc@mpt
Expand Down Expand Up @@ -460,6 +449,10 @@
\DeclareFontShape{\jsc@JTn}{gt}{m}{sl}{<->ssub*gt/m/n}{}
\DeclareFontShape{\jsc@JTn}{mc}{bx}{it}{<->ssub*gt/m/n}{}
\DeclareFontShape{\jsc@JTn}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
%% ad-hoc "relation font"
\@ifl@t@r\fmtversion{2020/10/01}
{\jsc@needsp@tchfalse}{\jsc@needsp@tchtrue}
\ifjsc@needsp@tch % --- for 2020-02-02 or older BEGIN
\ifx\@rmfamilyhook\@undefined % old
\DeclareRobustCommand\rmfamily
{\not@math@alphabet\rmfamily\mathrm
Expand Down Expand Up @@ -489,6 +482,14 @@
\g@addto@macro\@ttfamilyhook
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi
\else % --- for 2020-02-02 or older END & for 2020-10-01 BEGIN
\AddToHook{rmfamily}%
{\prepare@family@series@update@kanji{mc}\mcdefault}
\AddToHook{sffamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\AddToHook{ttfamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi % --- for 2020-10-01 END
\ifx\DeclareFixJFMCJKTextFontCommand\@undefined
\DeclareRobustCommand\textmc[1]{%
\relax\ifmmode \expandafter\nfss@text \fi{\mcfamily #1}}
Expand Down Expand Up @@ -697,6 +698,7 @@
\xspcode`^^fe=3
\xspcode`^^ff=3
\def\@{\spacefactor3000{}}
%% \@setfontsize with \parindent and \(x)kanjiskip settings
\def\@setfontsize#1#2#3{%
\ifx\protect\@typeset@protect
\let\@currsize#1%
Expand All @@ -714,7 +716,8 @@
\if@slide \xkanjiskip=0.1em \else
\xkanjiskip=0.25em plus 0.15em minus 0.06em
\fi
\fi}
\fi
}
\def\jsc@setfontsize#1#2#3{%
\@setfontsize#1{#2\jsc@mpt}{#3\jsc@mpt}}
\emergencystretch 3zw
Expand Down Expand Up @@ -745,6 +748,7 @@
\belowdisplayskip 9\jsc@mpt \@plus3\jsc@mpt \@minus4\jsc@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
%% initialize
\normalsize
\setbox0\hbox{\char\jis"3441}%
\setlength\Cht{\ht0}
Expand Down
40 changes: 22 additions & 18 deletions jis/jsbook.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,13 @@
%%
%% The original source files were:
%%
%% jsclasses.dtx (with options: `book')
%% jsclasses.dtx (with options: `class,book')
%%
%% IMPORTANT NOTICE:
%% Maintained on GitHub: https://github.com/texjporg/jsclasses
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from jsbook.cls.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file jsclasses.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsbook}
[2020/02/02 jsclasses (okumura, texjporg)]
[2020/10/05 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jsbook}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
Expand Down Expand Up @@ -261,10 +249,11 @@
\fi
\ifpapersize
\iftombow
\AtBeginDvi{\special{papersize=\the\stockwidth,\the\stockheight}}
\edef\jsc@papersize@special{papersize=\the\stockwidth,\the\stockheight}
\else
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\edef\jsc@papersize@special{papersize=\the\paperwidth,\the\paperheight}
\fi
\AtBeginDvi{\special{\jsc@papersize@special}}
\fi
\if@slide\def\n@baseline{13}\else\def\n@baseline{16}\fi
\newdimen\jsc@mpt
Expand Down Expand Up @@ -465,6 +454,10 @@
\DeclareFontShape{\jsc@JTn}{gt}{m}{sl}{<->ssub*gt/m/n}{}
\DeclareFontShape{\jsc@JTn}{mc}{bx}{it}{<->ssub*gt/m/n}{}
\DeclareFontShape{\jsc@JTn}{mc}{bx}{sl}{<->ssub*gt/m/n}{}
%% ad-hoc "relation font"
\@ifl@t@r\fmtversion{2020/10/01}
{\jsc@needsp@tchfalse}{\jsc@needsp@tchtrue}
\ifjsc@needsp@tch % --- for 2020-02-02 or older BEGIN
\ifx\@rmfamilyhook\@undefined % old
\DeclareRobustCommand\rmfamily
{\not@math@alphabet\rmfamily\mathrm
Expand Down Expand Up @@ -494,6 +487,14 @@
\g@addto@macro\@ttfamilyhook
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi
\else % --- for 2020-02-02 or older END & for 2020-10-01 BEGIN
\AddToHook{rmfamily}%
{\prepare@family@series@update@kanji{mc}\mcdefault}
\AddToHook{sffamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\AddToHook{ttfamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi % --- for 2020-10-01 END
\ifx\DeclareFixJFMCJKTextFontCommand\@undefined
\DeclareRobustCommand\textmc[1]{%
\relax\ifmmode \expandafter\nfss@text \fi{\mcfamily #1}}
Expand Down Expand Up @@ -702,6 +703,7 @@
\xspcode`^^fe=3
\xspcode`^^ff=3
\def\@{\spacefactor3000{}}
%% \@setfontsize with \parindent and \(x)kanjiskip settings
\def\@setfontsize#1#2#3{%
\ifx\protect\@typeset@protect
\let\@currsize#1%
Expand All @@ -719,7 +721,8 @@
\if@slide \xkanjiskip=0.1em \else
\xkanjiskip=0.25em plus 0.15em minus 0.06em
\fi
\fi}
\fi
}
\def\jsc@setfontsize#1#2#3{%
\@setfontsize#1{#2\jsc@mpt}{#3\jsc@mpt}}
\emergencystretch 3zw
Expand Down Expand Up @@ -750,6 +753,7 @@
\belowdisplayskip 9\jsc@mpt \@plus3\jsc@mpt \@minus4\jsc@mpt
\belowdisplayshortskip \belowdisplayskip
\let\@listi\@listI}
%% initialize
\normalsize
\setbox0\hbox{\char\jis"3441}%
\setlength\Cht{\ht0}
Expand Down
103 changes: 90 additions & 13 deletions jis/jsclasses.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% pLaTeX2$B&E?7%I%-%e%a%s%H%/%i%9!JF|K\8l(B TeX $B3+H/%3%_%e%K%F%#HG!K(B
% $B86:n<T!'1|B<@2I'(B <[email protected]>
%
% Copyright 1993-2019
% Copyright 1993-2020
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
Expand All @@ -23,10 +23,11 @@
%<report>\ProvidesClass{jsreport}
%<jspf>\ProvidesClass{jspf}
%<kiyou>\ProvidesClass{kiyou}
%<minijs>\ProvidesPackage{minijs}
%<*driver>
\ProvidesFile{jsclasses.dtx}
%</driver>
[2020/02/02 jsclasses (okumura, texjporg)]
[2020/10/05 jsclasses (okumura, texjporg)]
%<*driver>
\documentclass{jsarticle}
\usepackage{doc}
Expand Down Expand Up @@ -119,11 +120,26 @@
%
% $B0J2<$G$O<B:]$N%3!<%I$KB($7$F@bL@$7$^$9!#(B
%
% \texttt{minijs}$B$O!$(B\texttt{jsclasses}$B$K;w$?@_Dj$r9T$&%Q%C%1!<%8$G$9!#(B
%
% \begin{macrocode}
%<*minijs>
%% if jsclasses loaded, abort loading this package
\ifx\@jsc@uplatextrue\@undefined\else
\PackageInfo{minijs}{jsclasses does not need minijs, exiting}
\expandafter\endinput
\fi
%% "fake" jsarticle
\expandafter\def\csname [email protected]\endcsname{}
%</minijs>
% \end{macrocode}
%
% \begin{macro}{\jsc@clsname}
%
% $BJ8=q%/%i%9$NL>A0$G$9!#%(%i!<%a%C%;!<%8I=<($J$I$G;H$o$l$^$9!#(B
%
% \begin{macrocode}
%<*class>
%<article>\def\jsc@clsname{jsarticle}
%<book>\def\jsc@clsname{jsbook}
%<report>\def\jsc@clsname{jsreport}
Expand Down Expand Up @@ -741,6 +757,11 @@
% [2017-01-11] $B%H%s%\%*%W%7%g%s$,;XDj$5$l$F$$$k$H$-!V$@$1!W(B|\stockwidth|$B!$(B
% |\stockheight|$B$rDj5A$9$k$h$&$K$7$^$7$?!#(B
%
% [2020-10-04] \LaTeXe~2020-10-01$B$G%+!<%M%k$N(B |\shipout| $B%3!<%I$,3HD%$5$l(B
% |\AtBeginDvi| $B$N<B9T%?%$%_%s%0$,JQ2=$7$?$N$G!$$3$N;~E@$G(B
% $BH/9T$9$k(B |\special| $B$NCf?H$rE83+$7$F$*$/$h$&$K$7$^$7$?!#(B
% $B$3$&$7$J$$$H!$MQ;f%5%$%:@_Dj$r4V0c$C$F$7$^$$$^$9(B(Issue \#72)$B!#(B
%
% \begin{macrocode}
\iftombow
\newdimen\stockwidth \newdimen\stockheight
Expand All @@ -751,10 +772,11 @@
\fi
\ifpapersize
\iftombow
\AtBeginDvi{\special{papersize=\the\stockwidth,\the\stockheight}}
\edef\jsc@papersize@special{papersize=\the\stockwidth,\the\stockheight}
\else
\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\edef\jsc@papersize@special{papersize=\the\paperwidth,\the\paperheight}
\fi
\AtBeginDvi{\special{\jsc@papersize@special}}
\fi
% \end{macrocode}
%
Expand Down Expand Up @@ -1054,6 +1076,24 @@
% $9.62216\,\mathrm{pt} * 0.961 / 10\,\mathrm{pt} = 0.924690$ $B$G$9!#(B
%
% \begin{macrocode}
%</class>
%<*minijs>
%% min/goth -> jis/jisg (for pLaTeX only)
\ifx\ucs\@undefined
\@for\@tempa:=5,6,7,8,9,10,10.95,12,14.4,17.28,20.74,24.88\do{%
\expandafter\let\csname JY1/mc/m/n/\@tempa\endcsname\relax
\expandafter\let\csname JY1/gt/m/n/\@tempa\endcsname\relax
\expandafter\let\csname JT1/mc/m/n/\@tempa\endcsname\relax
\expandafter\let\csname JT1/gt/m/n/\@tempa\endcsname\relax
}
\def\Cjascale{0.924690}
\DeclareFontShape{JY1}{mc}{m}{n}{<-> s * [0.961] jis}{}
\DeclareFontShape{JY1}{gt}{m}{n}{<-> s * [0.961] jisg}{}
\DeclareFontShape{JT1}{mc}{m}{n}{<-> s * [0.961] tmin10}{}
\DeclareFontShape{JT1}{gt}{m}{n}{<-> s * [0.961] tgoth10}{}
\fi
%</minijs>
%<*class>
%<*!jspf>
\def\Cjascale{0.924690}
\ifmingoth
Expand Down Expand Up @@ -1165,7 +1205,22 @@
% $B=>Mh$N%3!<%I$b(B\LaTeXe~2019-10-01$B0JA0$N$?$a$K;D$7$F$"$j$^$9$,!$(B
% \texttt{mweights}$B%Q%C%1!<%8BP:v$b;\$7$^$7$?(B(forum:2763)$B!#(B
%
% [2020-10-04] \LaTeXe~2020-10-01$B$G$O(B |\AddToHook| $B$rMxMQ$7$^$9!#(B
%
% ^^A Note that |\AddToHook| is defined as follows:
% ^^A \begin{itemize}
% ^^A \item Format date 2020-02-02 or older: undefined
% ^^A \item Format date 2020-10-01 or newer: available
% ^^A \item ... under \texttt{latexrelease} rollback: defined but no-op
% ^^A \end{itemize}
%
% \begin{macrocode}
%</class>
%<*class|minijs>
%% ad-hoc "relation font"
\@ifl@t@r\fmtversion{2020/10/01}
{\jsc@needsp@tchfalse}{\jsc@needsp@tchtrue}
\ifjsc@needsp@tch % --- for 2020-02-02 or older BEGIN
\ifx\@rmfamilyhook\@undefined % old
\DeclareRobustCommand\rmfamily
{\not@math@alphabet\rmfamily\mathrm
Expand Down Expand Up @@ -1195,6 +1250,16 @@
\g@addto@macro\@ttfamilyhook
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi
\else % --- for 2020-02-02 or older END & for 2020-10-01 BEGIN
\AddToHook{rmfamily}%
{\prepare@family@series@update@kanji{mc}\mcdefault}
\AddToHook{sffamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\AddToHook{ttfamily}%
{\prepare@family@series@update@kanji{gt}\gtdefault}
\fi % --- for 2020-10-01 END
%</class|minijs>
%<*class>
% \end{macrocode}
%
% \begin{macro}{\textmc}
Expand Down Expand Up @@ -1562,25 +1627,31 @@
% [2008-02-18] |english| $B%*%W%7%g%s$G(B |\parindent| $B$r(B 1em $B$K$7$^$7$?!#(B
%
% \begin{macrocode}
%</class>
%<*class|minijs>
%% \@setfontsize with \parindent and \(x)kanjiskip settings
\def\@setfontsize#1#2#3{%
% \@nomath#1%
%<minijs> \@nomath#1%
\ifx\protect\@typeset@protect
\let\@currsize#1%
\fi
\fontsize{#2}{#3}\selectfont
\ifdim\parindent>\z@
\if@english
\parindent=1em
\else
%<class> \if@english
%<class> \parindent=1em
%<class> \else
\parindent=1zw
\fi
%<class> \fi
\fi
\kanjiskip=0zw plus .1zw minus .01zw
\ifdim\xkanjiskip>\z@
\if@slide \xkanjiskip=0.1em \else
%<class> \ifdim\xkanjiskip>\z@
%<class> \if@slide \xkanjiskip=0.1em \else
\xkanjiskip=0.25em plus 0.15em minus 0.06em
\fi
\fi}
%<class> \fi
%<class> \fi
}
%</class|minijs>
%<*class>
% \end{macrocode}
% \end{macro}
%
Expand Down Expand Up @@ -1689,7 +1760,12 @@
% $B$3$3$G<B:]$KI8=`%U%)%s%H%5%$%:$G=i4|2=$7$^$9!#(B
%
% \begin{macrocode}
%</class>
%<*class|minijs>
%% initialize
\normalsize
%</class|minijs>
%<*class>
% \end{macrocode}
%
% \end{macro}
Expand Down Expand Up @@ -6010,6 +6086,7 @@
\ignorespaces
\fi}
%</article|book|report>
%</class>
% \end{macrocode}
% \end{macro}
%
Expand Down
Loading

0 comments on commit 708c502

Please sign in to comment.