% First of all input plain.tex
\input plain

\input jtexbase

\message{preloading japanese fonts, first Mincho,}
% Preload the fonts used by most users
\jfont\sevendm=dm7
%\jfont\eightdm=dm8
%\jfont\ninedm=dm9
\jfont\tendm=dm10
\jfont\twelvedm=dm12
\jfont\seventeendm=dm17
\message{then Gothic,}
%\jfont\sevendg=dg7
\jfont\tendg=dg10
\jfont\twelvedg=dg12
\jfont\seventeendg=dg17

% For upward compatibility
\let\jsml=\sevendm \let\jstd=\tendm \let\jbig=\twelvedm \let\jlrg=\seventeendm

\message{fonts used with japanese,}
\font\smallrm=cmr7 \font\smallit=cmti7
%\font\smallsl=cmsl7 % This font does not exists on standard distribution
\font\smallsl=cmsl8
\font\smallbf=cmbx7 \font\smalltt=cmtt8

\font\bigrm=cmr12 scaled\magstep1 \font\bigit=cmti12 scaled\magstep1
\font\bigsl=cmsl12 scaled\magstep1 \font\bigbf=cmbx12 scaled\magstep1
\font\bigtt=cmtt12 scaled\magstep1

\font\largerm=cmr10 scaled\magstep4 \font\largeit=cmtt10 scaled\magstep4
\font\largesl=cmsl10 scaled\magstep4 \font\largebf=cmbx10 scaled\magstep4
\font\largett=cmtt10 scaled\magstep4

\font\etlrm=cmr9 \font\etlit=cmti9
\font\etlsl=cmsl9 \font\etlbf=cmbx9
\font\etltt=cmtt9

\message{Standard style selectors,}
\def\smalljapanesefont{\baselineskip=12pt%
\def\:{\hskip0.89815pt plus0.43056pt minus0.28704pt}%
\def\<{\hskip1.34723pt plus0.64584pt minus0.43056pt}%
\def\rm{\fam0 \smallrm}%
\def\it{\fam\itfam\smallit}%
\def\sl{\fam\slfam\smallsl}%
\def\bf{\fam\bffam\smallbf}%
\def\tt{\fam\ttfam\smalltt}%
\rm\jsml}

\def\standardjapanesefont{\baselineskip=18pt%
\def\:{\hskip1.11111pt plus0.55556pt minus0.37778pt}%
\def\<{\hskip1.66667pt plus0.83333pt minus0.55556pt}%
\def\rm{\fam0 \tenrm}%
\def\it{\fam\itfam\tenit}%
\def\sl{\fam\slfam\tensl}%
\def\bf{\fam\bffam\tenbf}%
\def\tt{\fam\ttfam\tentt}%
\rm\jstd}

\def\bigjapanesefont{\baselineskip=24pt%
\def\:{\hskip1.30444pt plus0.65277pt minus0.43518pt}%
\def\<{\hskip1.95832pt plus0.97916pt minus0.65277pt}%
\def\rm{\fam0 \bigrm}%
\def\it{\fam\itfam\bigit}%
\def\sl{\fam\slfam\bigsl}%
\def\bf{\fam\bffam\bigbf}%
\def\tt{\fam\ttfam\bigtt}%
\rm\jbig}

\def\largejapanesefont{\baselineskip=36pt%
\def\:{\hskip2.30444pt plus1.15222pt minus0.76815pt}%
\def\<{\hskip3.45667pt plus1.72834pt minus1.15222pt}%
\def\rm{\fam0 \largerm}%
\def\it{\fam\itfam\largeit}%
\def\sl{\fam\slfam\largesl}%
\def\bf{\fam\bffam\largebf}%
\def\tt{\fam\ttfam\largett}%
\rm\jlrg}

\jstd % select standard japanese font as default

\input sitekcode

\def\JTeX{\leavevmode\lower.5ex\hbox{J}\kern-.18em\TeX}
\def\MuLTeX{M\kern-.1667em u\kern-.1667em\lower.5ex\hbox{L}\kern-.25em\TeX}

\def\fmtname{jplain}\def\fmtversion{\jbaseversion} % identifies this format

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%          COMPATIBILITY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\usesecondlevel#1 of #2#3#4 {%
\message{>>Obsolete: usesecondlevel.}%
\message{>>You don't have to declare use of second level kanji.}}

\def\usesecondlevels#1 of #2#3#4 #5 #6 {%
\message{>>Obsolete: usesecondlevels.}%
\message{>>You don't have to declare use of second level kanji.}}

\def\loadjfont#1=#2#3#4 {%
\message{>>Obsolete: loadjfont. Use jfont}\jfont#1=#2#3#4 }

\def\loadsfont#1=#2#3#4 #5 #6 {%
\message{>>Obsolete: loadsfont. Use jfont}\jfont#1=#2#3#4 #5 #6 }

\def\use #1 of #2#3#4 {\message{>>Obsolete: use.}}
\def\uses #1 of #2#3#4 #5 #6 {\message{>>Obsolete: uses.}}
