<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% This is PMJ.TEX ``Poor Man's Japanese'' for TeX
% placed in the public domain 12/3/1990 Thomas B. Ridgeway and the
% Humanities and Arts Computing Center
% 
% declare pmJ fonts     stand by . . . this may take a while
\font\jfaB=wjisa1
\font\jfaC=wjisa2
\font\jfaD=wjisa3
\font\jfaE=wjisa4
\font\jfaF=wjisa5
\font\jfaG=wjisa6
\font\jfaH=wjisa7
\font\jfaI=wjisa8
\font\jfaJ=wjisa9
\font\jfaa=wjisaa
\font\jfab=wjisab
\font\jfac=wjisac
\font\jfad=wjisad
\font\jfae=wjisae
\font\jfaf=wjisaf
\font\jfbA=wjisb0
\font\jfbB=wjisb1
\font\jfbC=wjisb2
\font\jfbD=wjisb3
\font\jfbE=wjisb4
\font\jfbF=wjisb5
\font\jfbG=wjisb6
\font\jfbH=wjisb7
\font\jfbI=wjisb8
\font\jfbJ=wjisb9
\font\jfba=wjisba
\font\jfbb=wjisbb
\font\jfbc=wjisbc
\font\jfbd=wjisbd
\font\jfbe=wjisbe
\font\jfbf=wjisbf
\font\jfcA=wjisc0
\font\jfcB=wjisc1
\font\jfcC=wjisc2
\font\jfcD=wjisc3
\font\jfcE=wjisc4
\font\jfcF=wjisc5
\font\jfcG=wjisc6
\font\jfcH=wjisc7
\font\jfcI=wjisc8
\font\jfcJ=wjisc9
\font\jfca=wjisca
\font\jfcb=wjiscb
\font\jfcc=wjiscc
\font\jfcd=wjiscd
\font\jfce=wjisce
\font\jfcf=wjiscf
\font\jfdA=wjisd0
\font\jfdB=wjisd1
\font\jfdC=wjisd2
\font\jfdD=wjisd3
\font\jfdE=wjisd4
\font\jfdF=wjisd5
\font\jfdG=wjisd6
\font\jfdH=wjisd7
\font\jfdI=wjisd8
\font\jfdJ=wjisd9
\font\jfda=wjisda
\font\jfdb=wjisdb
\font\jfdc=wjisdc
\font\jfdd=wjisdd
\font\jfde=wjisde
\font\jfdf=wjisdf
\font\jfeA=wjise0
\font\jfeB=wjise1
\font\jfeC=wjise2
\font\jfeD=wjise3
\font\jfeE=wjise4
\font\jfeF=wjise5
\font\jfeG=wjise6
\font\jfeH=wjise7
\font\jfeI=wjise8
\font\jfeJ=wjise9
\font\jfea=wjisea
\font\jfeb=wjiseb
\font\jfec=wjisec
\font\jfed=wjised
\font\jfee=wjisee
\font\jfef=wjisef
\font\jffA=wjisf0
\font\jffB=wjisf1
\font\jffC=wjisf2
\font\jffD=wjisf3
\font\jffE=wjisf4
%\font\jffF=wjisf5
%\font\jffG=wjisf6
%\font\jffH=wjisf7
%\font\jffI=wjisf8
%
% a flag to show whether 1st byte of 2-byte pair has been read
\newif\ifjisfontset
\jisfontsetfalse % no, it hasn't yet been read
% our fonts are portmanteaus containing two different sizes,
%     set up machinery for picking one or another size
\newif\ifbigJ
\bigJfalse % no, we are not printing big Japanese now
\def\jglue{\hskip0pt plus.5pt}
\newcount\Jchar
%
\def\jchar#1{\Jchar=#1\ifbigJ\advance\Jchar by -128\fi\char\the\Jchar}
% define a general macro for handling Japanese characters
\def\jischar#1#2{\ifjisfontset\jchar{#1}\restorefont\discretionary{}{}{}\jglue\jisfontsetfalse\else\jisfontsettrue\edef\restorefont{\the\font}#2\fi}
% define a special macro for those characters which can only be 2nd of 2 bytes
\def\jischr#1{\ifjisfontset\jchar{#1}\restorefont\jisfontsetfalse\else\message{!pmJ! character #1 out of context!}\fi}
% define macros for the individual characters
%   each character sets a) a current font, or b) its character in the current font
%   depending on ifjisfontset
% do Japanese within a local group so that other schemes for
%    using chars in range 128+ might be used elsewhere
%
\def\jisactive{%
\catcode`\^^a0=\active%
\catcode`\^^a1=\active%
\catcode`\^^a2=\active%
\catcode`\^^a3=\active%
\catcode`\^^a4=\active%
\catcode`\^^a5=\active%
\catcode`\^^a6=\active%
\catcode`\^^a7=\active%
\catcode`\^^a8=\active%
\catcode`\^^a9=\active%
\catcode`\^^aa=\active%
\catcode`\^^ab=\active%
\catcode`\^^ac=\active%
\catcode`\^^ad=\active%
\catcode`\^^ae=\active%
\catcode`\^^af=\active%
\catcode`\^^b0=\active%
\catcode`\^^b1=\active%
\catcode`\^^b2=\active%
\catcode`\^^b3=\active%
\catcode`\^^b4=\active%
\catcode`\^^b5=\active%
\catcode`\^^b6=\active%
\catcode`\^^b7=\active%
\catcode`\^^b8=\active%
\catcode`\^^b9=\active%
\catcode`\^^ba=\active%
\catcode`\^^bb=\active%
\catcode`\^^bc=\active%
\catcode`\^^bd=\active%
\catcode`\^^be=\active%
\catcode`\^^bf=\active%
\catcode`\^^c0=\active%
\catcode`\^^c1=\active%
\catcode`\^^c2=\active%
\catcode`\^^c3=\active%
\catcode`\^^c4=\active%
\catcode`\^^c5=\active%
\catcode`\^^c6=\active%
\catcode`\^^c7=\active%
\catcode`\^^c8=\active%
\catcode`\^^c9=\active%
\catcode`\^^ca=\active%
\catcode`\^^cb=\active%
\catcode`\^^cc=\active%
\catcode`\^^cd=\active%
\catcode`\^^ce=\active%
\catcode`\^^cf=\active%
\catcode`\^^d0=\active%
\catcode`\^^d1=\active%
\catcode`\^^d2=\active%
\catcode`\^^d3=\active%
\catcode`\^^d4=\active%
\catcode`\^^d5=\active%
\catcode`\^^d6=\active%
\catcode`\^^d7=\active%
\catcode`\^^d8=\active%
\catcode`\^^d9=\active%
\catcode`\^^da=\active%
\catcode`\^^db=\active%
\catcode`\^^dc=\active%
\catcode`\^^dd=\active%
\catcode`\^^de=\active%
\catcode`\^^df=\active%
\catcode`\^^e0=\active%
\catcode`\^^e1=\active%
\catcode`\^^e2=\active%
\catcode`\^^e3=\active%
\catcode`\^^e4=\active%
\catcode`\^^e5=\active%
\catcode`\^^e6=\active%
\catcode`\^^e7=\active%
\catcode`\^^e8=\active%
\catcode`\^^e9=\active%
\catcode`\^^ea=\active%
\catcode`\^^eb=\active%
\catcode`\^^ec=\active%
\catcode`\^^ed=\active%
\catcode`\^^ee=\active%
\catcode`\^^ef=\active%
\catcode`\^^f0=\active%
\catcode`\^^f1=\active%
\catcode`\^^f2=\active%
\catcode`\^^f3=\active%
\catcode`\^^f4=\active%
\catcode`\^^f5=\active%
\catcode`\^^f6=\active%
\catcode`\^^f7=\active%
\catcode`\^^f8=\active%
\catcode`\^^f9=\active%
\catcode`\^^fa=\active%
\catcode`\^^fb=\active%
\catcode`\^^fc=\active%
\catcode`\^^fd=\active%
\catcode`\^^fe=\active%
\catcode`\^^ff=\active%
}
\def\inactive{%
\catcode`\^^a0=12%
\catcode`\^^a1=12%
\catcode`\^^a2=12%
\catcode`\^^a3=12%
\catcode`\^^a4=12%
\catcode`\^^a5=12%
\catcode`\^^a6=12%
\catcode`\^^a7=12%
\catcode`\^^a8=12%
\catcode`\^^a9=12%
\catcode`\^^aa=12%
\catcode`\^^ab=12%
\catcode`\^^ac=12%
\catcode`\^^ad=12%
\catcode`\^^ae=12%
\catcode`\^^af=12%
\catcode`\^^b0=12%
\catcode`\^^b1=12%
\catcode`\^^b2=12%
\catcode`\^^b3=12%
\catcode`\^^b4=12%
\catcode`\^^b5=12%
\catcode`\^^b6=12%
\catcode`\^^b7=12%
\catcode`\^^b8=12%
\catcode`\^^b9=12%
\catcode`\^^ba=12%
\catcode`\^^bb=12%
\catcode`\^^bc=12%
\catcode`\^^bd=12%
\catcode`\^^be=12%
\catcode`\^^bf=12%
\catcode`\^^c0=12%
\catcode`\^^c1=12%
\catcode`\^^c2=12%
\catcode`\^^c3=12%
\catcode`\^^c4=12%
\catcode`\^^c5=12%
\catcode`\^^c6=12%
\catcode`\^^c7=12%
\catcode`\^^c8=12%
\catcode`\^^c9=12%
\catcode`\^^ca=12%
\catcode`\^^cb=12%
\catcode`\^^cc=12%
\catcode`\^^cd=12%
\catcode`\^^ce=12%
\catcode`\^^cf=12%
\catcode`\^^d0=12%
\catcode`\^^d1=12%
\catcode`\^^d2=12%
\catcode`\^^d3=12%
\catcode`\^^d4=12%
\catcode`\^^d5=12%
\catcode`\^^d6=12%
\catcode`\^^d7=12%
\catcode`\^^d8=12%
\catcode`\^^d9=12%
\catcode`\^^da=12%
\catcode`\^^db=12%
\catcode`\^^dc=12%
\catcode`\^^dd=12%
\catcode`\^^de=12%
\catcode`\^^df=12%
\catcode`\^^e0=12%
\catcode`\^^e1=12%
\catcode`\^^e2=12%
\catcode`\^^e3=12%
\catcode`\^^e4=12%
\catcode`\^^e5=12%
\catcode`\^^e6=12%
\catcode`\^^e7=12%
\catcode`\^^e8=12%
\catcode`\^^e9=12%
\catcode`\^^ea=12%
\catcode`\^^eb=12%
\catcode`\^^ec=12%
\catcode`\^^ed=12%
\catcode`\^^ee=12%
\catcode`\^^ef=12%
\catcode`\^^f0=12%
\catcode`\^^f1=12%
\catcode`\^^f2=12%
\catcode`\^^f3=12%
\catcode`\^^f4=12%
\catcode`\^^f5=12%
\catcode`\^^f6=12%
\catcode`\^^f7=12%
\catcode`\^^f8=12%
\catcode`\^^f9=12%
\catcode`\^^fa=12%
\catcode`\^^fb=12%
\catcode`\^^fc=12%
\catcode`\^^fd=12%
\catcode`\^^fe=12%
\catcode`\^^ff=12%
}
%
\def\endJapanese{\endgroup}
%
\jisactive %switch on characters so we can define the macros with them active
\def\beginJapanese{\begingroup\jisactive%
% make characters used in JIS encoding active so they can become macros
% always end the line after saying \beginJapanese
%    any characters on the same line will have already been read with
%    their non-Japanese meanings
\def^^a0{\jischar{160}{\jfaA}}%
\def^^a1{\jischar{161}{\jfaB}}%
\def^^a2{\jischar{162}{\jfaC}}%
\def^^a3{\jischar{163}{\jfaD}}%
\def^^a4{\jischar{164}{\jfaE}}%
\def^^a5{\jischar{165}{\jfaF}}%
\def^^a6{\jischar{166}{\jfaG}}%
\def^^a7{\jischar{167}{\jfaH}}%
\def^^a8{\jischar{168}{\jfaI}}%
\def^^a9{\jischar{169}{\jfaJ}}%
\def^^aa{\jischar{170}{\jfaa}}%
\def^^ab{\jischar{171}{\jfab}}%
\def^^ac{\jischar{172}{\jfac}}%
\def^^ad{\jischar{173}{\jfad}}%
\def^^ae{\jischar{174}{\jfae}}%
\def^^af{\jischar{175}{\jfaf}}%
\def^^b0{\jischar{176}{\jfbA}}%
\def^^b1{\jischar{177}{\jfbB}}%
\def^^b2{\jischar{178}{\jfbC}}%
\def^^b3{\jischar{179}{\jfbD}}%
\def^^b4{\jischar{180}{\jfbE}}%
\def^^b5{\jischar{181}{\jfbF}}%
\def^^b6{\jischar{182}{\jfbG}}%
\def^^b7{\jischar{183}{\jfbH}}%
\def^^b8{\jischar{184}{\jfbI}}%
\def^^b9{\jischar{185}{\jfbJ}}%
\def^^ba{\jischar{186}{\jfba}}%
\def^^bb{\jischar{187}{\jfbb}}%
\def^^bc{\jischar{188}{\jfbc}}%
\def^^bd{\jischar{189}{\jfbd}}%
\def^^be{\jischar{190}{\jfbe}}%
\def^^bf{\jischar{191}{\jfbf}}%
\def^^c0{\jischar{192}{\jfcA}}%
\def^^c1{\jischar{193}{\jfcB}}%
\def^^c2{\jischar{194}{\jfcC}}%
\def^^c3{\jischar{195}{\jfcD}}%
\def^^c4{\jischar{196}{\jfcE}}%
\def^^c5{\jischar{197}{\jfcF}}%
\def^^c6{\jischar{198}{\jfcG}}%
\def^^c7{\jischar{199}{\jfcH}}%
\def^^c8{\jischar{200}{\jfcI}}%
\def^^c9{\jischar{201}{\jfcJ}}%
\def^^ca{\jischar{202}{\jfca}}%
\def^^cb{\jischar{203}{\jfcb}}%
\def^^cc{\jischar{204}{\jfcc}}%
\def^^cd{\jischar{205}{\jfcd}}%
\def^^ce{\jischar{206}{\jfce}}%
\def^^cf{\jischar{207}{\jfcf}}%
\def^^d0{\jischar{208}{\jfdA}}%
\def^^d1{\jischar{209}{\jfdB}}%
\def^^d2{\jischar{210}{\jfdC}}%
\def^^d3{\jischar{211}{\jfdD}}%
\def^^d4{\jischar{212}{\jfdE}}%
\def^^d5{\jischar{213}{\jfdF}}%
\def^^d6{\jischar{214}{\jfdG}}%
\def^^d7{\jischar{215}{\jfdH}}%
\def^^d8{\jischar{216}{\jfdI}}%
\def^^d9{\jischar{217}{\jfdJ}}%
\def^^da{\jischar{218}{\jfda}}%
\def^^db{\jischar{219}{\jfdb}}%
\def^^dc{\jischar{220}{\jfdc}}%
\def^^dd{\jischar{221}{\jfdd}}%
\def^^de{\jischar{222}{\jfde}}%
\def^^df{\jischar{223}{\jfdf}}%
\def^^e0{\jischar{224}{\jfeA}}%
\def^^e1{\jischar{225}{\jfeB}}%
\def^^e2{\jischar{226}{\jfeC}}%
\def^^e3{\jischar{227}{\jfeD}}%
\def^^e4{\jischar{228}{\jfeE}}%
\def^^e5{\jischar{229}{\jfeF}}%
\def^^e6{\jischar{230}{\jfeG}}%
\def^^e7{\jischar{231}{\jfeH}}%
\def^^e8{\jischar{232}{\jfeI}}%
\def^^e9{\jischar{233}{\jfeJ}}%
\def^^ea{\jischar{234}{\jfea}}%
\def^^eb{\jischar{235}{\jfeb}}%
\def^^ec{\jischar{236}{\jfec}}%
\def^^ed{\jischar{237}{\jfed}}%
\def^^ee{\jischar{238}{\jfee}}%
\def^^ef{\jischar{239}{\jfef}}%
\def^^f0{\jischar{240}{\jffA}}%
\def^^f1{\jischar{241}{\jffB}}%
\def^^f2{\jischar{242}{\jffC}}%
\def^^f3{\jischar{243}{\jffD}}%
\def^^f4{\jischar{244}{\jffE}}%
\def^^f5{\jischr{245}}%
\def^^f6{\jischr{246}}%
\def^^f7{\jischr{247}}%
\def^^f8{\jischr{248}}%
\def^^f9{\jischr{249}}%
\def^^fa{\jischr{250}}%
\def^^fb{\jischr{251}}%
\def^^fc{\jischr{252}}%
\def^^fd{\jischr{253}}%
\def^^fe{\jischr{254}}%
\def^^ff{\jischr{255}}} % that was the end of the \def for \beginJapanese
% these below might be convenient to use for user-defined characters
%\def^^f5{\jischar{245}{\jffF}}%
%\def^^f6{\jischar{246}{\jffG}}%
%\def^^f7{\jischar{247}{\jffH}}%
%\def^^f9{\jischar{249}{\jffJ}}%
%\def^^fa{\jischar{250}{\jffa}}%
%\def^^fb{\jischar{251}{\jffb}}%
%\def^^fc{\jischar{252}{\jffc}}%
%\def^^fd{\jischar{253}{\jffd}}%
%\def^^fe{\jischar{254}{\jffe}}%
%\def^^ff{\jischar{255}{\jfff}}%
\inactive % switch the active characters back off until they are needed

</pre></body></html>