Skip to content
Permalink
Browse files

jsclasses.dtx: 新元号対応

  • Loading branch information...
aminophen committed Apr 5, 2019
1 parent ea0f358 commit 0f26a89f552bc4b0272d2ee3c8d542ccb1b2a14a
Showing with 190 additions and 73 deletions.
  1. +1 −1 LICENSE
  2. +30 −11 jsarticle.cls
  3. +30 −11 jsbook.cls
  4. +39 −17 jsclasses.dtx
  5. +30 −11 jspf.cls
  6. +30 −11 jsreport.cls
  7. +30 −11 kiyou.cls
@@ -1,6 +1,6 @@
Copyright 1995-1999 ASCII MEDIA WORKS
Copyright 1999-2016 Haruhiko Okumura
Copyright 2016-2018 Japanese TeX Development Community
Copyright 2016-2019 Japanese TeX Development Community
All rights reserved.

Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
\fi
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsarticle}
[2018/12/11 jsclasses (okumura, texjporg)]
[2019/04/06 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jsarticle}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
@@ -1888,23 +1888,42 @@
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\pltx@today@year@#1{%
\ifnum\numexpr\year-#1=1 元\else
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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西暦
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi \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
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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
\pagenumbering{arabic}
@@ -25,7 +25,7 @@
\fi
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsbook}
[2018/12/11 jsclasses (okumura, texjporg)]
[2019/04/06 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jsbook}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
@@ -1979,23 +1979,42 @@
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\pltx@today@year@#1{%
\ifnum\numexpr\year-#1=1 元\else
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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西暦
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi \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
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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@report \pagestyle{plain} \else \pagestyle{headings} \fi
\pagenumbering{arabic}
@@ -15,7 +15,7 @@
%
% Copyright 1995-1999 ASCII Corporation.
% Copyright 1999-2016 Haruhiko Okumura
% Copyright 2016-2018 Japanese TeX Development Community
% Copyright 2016-2019 Japanese TeX Development Community
%
% \fi
%
@@ -31,7 +31,7 @@
%<*driver>
\ProvidesFile{jsclasses.dtx}
%</driver>
[2018/12/11 jsclasses (okumura, texjporg)]
[2019/04/06 jsclasses (okumura, texjporg)]
%<*driver>
\documentclass{jsarticle}
\usepackage{doc}
@@ -884,7 +884,7 @@
\fi
\ifnum\@ptsize=-1
\def\n@baseline{15}%
\fi
\fi
\fi
%<*kiyou>
\def\jsc@magscale{0.9769230}
@@ -893,7 +893,7 @@
\def\inv@mag{1.02354}
\jsc@mpt=1\p@
\jsc@mmm=1mm
\else
\else
\jsc@mpt=\jsc@magscale\p@
\jsc@mmm=\jsc@magscale mm
\def\inv@mag{1}
@@ -1340,10 +1340,10 @@
\xspcode`+=3
\xspcode`\%=3
% \end{macrocode}
%
%
% これ以外にT1エンコーディングで80〜ffの文字もすべて欧文文字ですので,
% 両側の和文文字との間にスペースが入らなければなりません。
%
%
% \begin{macrocode}
\xspcode`^^80=3
\xspcode`^^81=3
@@ -5866,7 +5866,10 @@
% \paragraph{今日の日付}
%
% \LaTeX で処理した日付を出力します。
% |jarticle| などと違って,標準を西暦にし,余分な空白が入らないように改良しました。
% ^^A |jarticle| などと違って,標準を西暦にし,
% ^^A 余分な空白が入らないように改良しました。
% ^^A -- 2018年7月以降は |jarticle| なども標準が西暦,
% ^^A -- 2019年4月以降は余分な空白が入らなくなっています。
% 和暦にするには |\和暦| と書いてください。
%
% \begin{macro}{\today}
@@ -5875,23 +5878,42 @@
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\pltx@today@year@#1{%
\ifnum\numexpr\year-#1=1 元\else
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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西暦
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi \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
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\kansuji\month
\kansuji\day
\else
\number\month\nobreak
\number\day\nobreak
\fi\fi}
% \end{macrocode}
% \end{macro}
%
@@ -25,7 +25,7 @@
\fi
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jspf}
[2018/12/11 jsclasses (okumura, texjporg)]
[2019/04/06 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jspf}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
@@ -1730,23 +1730,42 @@
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\pltx@today@year@#1{%
\ifnum\numexpr\year-#1=1 元\else
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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西暦
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi \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
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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}
\pagestyle{headings}
\pagenumbering{arabic}
@@ -25,7 +25,7 @@
\fi
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{jsreport}
[2018/12/11 jsclasses (okumura, texjporg)]
[2019/04/06 jsclasses (okumura, texjporg)]
\def\jsc@clsname{jsreport}
\newif\ifjsc@needsp@tch
\jsc@needsp@tchfalse
@@ -1973,23 +1973,42 @@
\def\西暦{\西暦true}
\def\和暦{\西暦false}
\newcount\heisei \heisei\year \advance\heisei-1988\relax
\def\pltx@today@year@#1{%
\ifnum\numexpr\year-#1=1 元\else
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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西暦
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi \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
\ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi
\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}
\pagestyle{plain}
\pagenumbering{arabic}

0 comments on commit 0f26a89

Please sign in to comment.
You can’t perform that action at this time.