From: Reijer Grimbergen ETL GO JP> Date: 28 jul 1997 Subject: Re: Shogi Diagrams Kees Serier NET HCC NL> writes: > Yes, there is a Shogi font for (La)TeX! > It is accompinied by a LaTeX style (OhTeX.sty) for LaTeX 2, I don't know if > there is a newer version for LaTeX 2e. > Yes, it works great on Linux!!! > The diagrams are Japanes style; no a,b,c-i but Japanese 1-9. > I got these from Mr. Ken'ichi HANDA etl go jp> in 1993. There is indeed a newer version than this. The version I use is 2.1 and last updated in May 1995. I asked Handa-san about this and if it is not used for commercial purposes, you can make free use of it. Of course it comes without any warranty. Here is the OhTeX.sty file: ============================================================================== %%% -*- mode: LaTeX; fill-column: 78; tab-width: 4; -*- %%% OhTeX.sty -- Style file to print shogi board. %%% This file is part of OhTeX Ver.2.0 %%% Copyright (C) 1991, 1995 Electrotechnical Laboratory, JAPAN %%% Written by K. Handa etl go jp>, %%% F. Motoyoshi etl go jp>, and %%% H. Matsubara etl go jp> %%% %%% This software is distributed in the hope that it will be useful, %%% but WITHOUT ANY WARRANTY. %%% Permission is granted to any individual or institution to use, copy, %%% modify, or redistribute this software so long as it is not sold for %%% profit, provided that this notice and the original copyright notices %%% are retained. %%% %%% HISTORY %%% 91.10.9 Ver.0.9 (beta) %%% 95.3.8 Ver.2.0 %%% 95.5.8 Ver.2.1 (modified for NFSS) \typeout{OhTeX Ver.2.1 (95.5.8)} %%% Usage: \documentstyle[...,OhTeX]{...} % This file should be loaded after art10.sty, art12.sty, etc. % because \ixpt, \xpt ... are redefined in this file. \def\OhTeX{{\rm O\kern-.05em\lower.3ex\hbox{h}\kern-.2em\TeX }} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Japanese TeX or not? %%% If we are using Japanese TeX, we need special %%% treatment for KINSOKU characters. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifJTEX \newif\ifNTTJTEX \ifx\dg\undefined % \dg is a command of NTT jTeX \ifx\gt\undefined % \gt is a command of ASCII jTeX \JTEXfalse\NTTJTEXfalse \else \JTEXtrue\NTTJTEXfalse \fi \else \JTEXtrue\NTTJTEXtrue \fi \newif\ifAlphabetOrdinate \newif\ifChessStyle \def\AlphabetOrdinate{\AlphabetOrdinatetrue} \def\KanjiOrdinate{\AlphabetOrdinatefalse} \def\ChessStyle{\AlphabetOrdinatetrue\ChessStyletrue} \def\KanjiStyle{\AlphabetOrdinatefalse\ChessStylefalse} \let\ChesslikeStyle=\ChessStyle \def\ifChesslikeStyle{\ifChessStyle} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% FONT %%% For the moment, font for OhTeX is designed only for %%% 10pt (shogi10.mf). So we must use it for all sizes. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Although the original \magstep can only handle up to %% scale5, OhTeX uses up to scale7. So we redefined it %% here. \def\magstep#1{\ifcase#1 \@m\or 1200\or 1440\or 1728\or 2074\or 2488\or 2986 \or 3583\fi\relax} \@ifundefined{@ptscale}{ \typeout{Using NFSS ...} \new@fontshape{sh}{m}{n}{ <5>shogi10 at5pt <6>shogi10 at6pt <7>shogi10 at7pt <8>shogi10 at8pt <9>shogi10 at9pt <10>shogi10 <11>shogi10 at10.95pt <12>shogi10 at12pt <14>shogi10 at14.4pt <17>shogi10 at17.28pt <20>shogi10 at20.74pt <25>shogi10 at24.88pt <30>shogi10 at35.83pt}{} \def\shdefault{sh} \def\psh{\family\shdefault\selectfont} \def\shsize#1{\size{#1}{#1pt}\sh} }{ %% Font definitions from \fivsh to \thsxsh. \newfont{\fivsh}{shogi10 \@ptscale5} \newfont{\sixsh}{shogi10 \@ptscale6} \newfont{\sevsh}{shogi10 \@ptscale7} \newfont{\egtsh}{shogi10 \@ptscale8} \newfont{\ninsh}{shogi10 \@ptscale9} \newfont{\tensh}{shogi10} \newfont{\elvsh}{shogi10 \@halfmag} \newfont{\twlsh}{shogi10 \@magscale1} \newfont{\frtsh}{shogi10 \@magscale2} \newfont{\svtsh}{shogi10 \@magscale3} \newfont{\twtysh}{shogi10 \@magscale4} \newfont{\twfvsh}{shogi10 \@magscale5} \newfont{\thsxsh}{shogi10 \@magscale7} \@addfontinfo\@vpt{\def\psh{\fivsh}} \@addfontinfo\@vipt{\def\psh{\sixsh}} \@addfontinfo\@viipt{\def\psh{\sevsh}} \@addfontinfo\@viiipt{\def\psh{\egtsh}} \@addfontinfo\@ixpt{\def\psh{\ninsh}} \@addfontinfo\@xpt{\def\psh{\tensh}} \@addfontinfo\@xipt{\def\psh{\elvsh}} \@addfontinfo\@xiipt{\def\psh{\twlsh}} \@addfontinfo\@xivpt{\def\psh{\frtsh}} \@addfontinfo\@xviipt{\def\psh{\svtsh}} \@addfontinfo\@xxpt{\def\psh{\twtysh}} \@addfontinfo\@xxvpt{\def\psh{\twfvsh}} \def\xxxvipt{} \def\@xxxvipt{} \@addfontinfo\@xxxvipt{\def\psh{\thsxsh}} \def\shsize#1{\csname @\romannumeral#1pt\endcsname} } %% \sh is used to change the current font to shogi font. \def\sh{\protect\psh} %% The maximum size provided by the original LaTeX is %% \Huge. But OhTeX uses the larger one. \def\HUGE{\@setsize\HUGE{48pt}\xxxvipt\@xxxvipt} \let\giant=\HUGE % for backward compatibility %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Declaration of variables (counter and dimensions) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcount\x \newcount\y \newcount\z \newcount\w \newcount\h \newcount\cx \newcount\cxx \newcount\cy \newcount\cyy \newcount\ch \newcount\chh \newcount\cw \newcount\cww \newcount\cmochi \newcount\cmochii \newcount\cmochix \newcount\cmochiy \newcount\cmochixx \newcount\cmochiyy \newcount\cmochiybase \newcount\cmochiyybase \newdimen\thickaxis \newdimen\thinaxis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Definition of characters in shogi font %%% Convention of namings: %%% XXXX and xxxx are for normal characters. %%% Xxxx are for upside-down characters of the %%% corresponding XXXX or xxxx. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% \symbol{0} through \symbol{29} are for real KOMA shapes. %% \symbol{30} through \symbol{39} are for mask of the above. \def\mochi{\ifChessStyle\else{\sh\symbol{40}}\fi} \def\Mochi{\ifChessStyle\else{\sh\symbol{41}}\fi} \def\goma{\ifChessStyle\else{\sh\symbol{42}}\fi} \def\Goma{\ifChessStyle\else{\sh\symbol{43}}\fi} \def\na{\ifChessStyle\else{\sh\symbol{44}}\fi} \def\Na{\ifChessStyle\else{\sh\symbol{45}}\fi} \def\si{\ifChessStyle\else{\sh\symbol{46}}\fi} \def\Si{\ifChessStyle\else{\sh\symbol{47}}\fi} %% \symbol{48} through \symbol{67} are for arabic numbers. %% Example: \num2 => arabic number two %% \Num2 => upside down of arabic number two. \def\num#1{\w=#1\multiply\w by2 \advance\w by48 \mbox{\sh\char\w}} \def\Num#1{\w=#1\multiply\w by2 \advance\w by49 \mbox{\sh\char\w}} %% \symbol{68} through \symbol{77} are for chinese numbers. %% Example: \jnum2 => chinese number two \def\jnum#1{\w=#1% \ifAlphabetOrdinate \advance\w by 96\mbox{\tt\char\w}% \else \advance\w by 68\mbox{\sh\char\w}% \fi} %% \symbol{80} through \symbol{109} are for KOMA. \def\komasymbol#1{\ifChessStyle\w=80 \else\w=0 \fi \advance\w by #1\char\w} \def\OU{\mbox{\sh\komasymbol{80}}} \def\Ou{\mbox{\sh\komasymbol{81}}} \def\GY{\mbox{\sh\komasymbol{82}}} \def\Gy{\mbox{\sh\komasymbol{83}}} \def\HI{\mbox{\sh\komasymbol{84}}} \def\Hi{\mbox{\sh\komasymbol{85}}} \def\KA{\mbox{\sh\komasymbol{86}}} \def\Ka{\mbox{\sh\komasymbol{87}}} \def\KI{\mbox{\sh\komasymbol{88}}} \def\Ki{\mbox{\sh\komasymbol{89}}} \def\GI{\mbox{\sh\komasymbol{90}}} \def\Gi{\mbox{\sh\komasymbol{91}}} \def\KE{\mbox{\sh\komasymbol{92}}} \def\Ke{\mbox{\sh\komasymbol{93}}} \def\KY{\mbox{\sh\komasymbol{94}}} \def\Ky{\mbox{\sh\komasymbol{95}}} \def\FU{\mbox{\sh\komasymbol{96}}} \def\Fu{\mbox{\sh\komasymbol{97}}} \def\RY{\mbox{\sh\komasymbol{98}}} \def\Ry{\mbox{\sh\komasymbol{99}}} \def\UM{\mbox{\sh\komasymbol{100}}} \def\Um{\mbox{\sh\komasymbol{101}}} \def\NG{\mbox{\sh\komasymbol{102}}} \def\Ng{\mbox{\sh\komasymbol{103}}} \def\NK{\mbox{\sh\komasymbol{104}}} \def\Nk{\mbox{\sh\komasymbol{105}}} \def\NY{\mbox{\sh\komasymbol{106}}} \def\Ny{\mbox{\sh\komasymbol{107}}} \def\TO{\mbox{\sh\komasymbol{108}}} \def\To{\mbox{\sh\komasymbol{109}}} \def\OUx{{\sh\komasymbol{80}\tt x}} \def\GYx{{\sh\komasymbol{82}\tt x}} \def\HIx{{\sh\komasymbol{84}\tt x}} \def\KAx{{\sh\komasymbol{86}\tt x}} \def\KIx{{\sh\komasymbol{88}\tt x}} \def\GIx{{\sh\komasymbol{90}\tt x}} \def\KEx{{\sh\komasymbol{92}\tt x}} \def\KYx{{\sh\komasymbol{94}\tt x}} \def\FUx{{\sh\komasymbol{96}\tt x}} \def\RYx{{\sh\komasymbol{98}\tt x}} \def\UMx{{\sh\komasymbol{100}\tt x}} \def\NGx{{\sh\komasymbol{102}\tt x}} \def\NKx{{\sh\komasymbol{104}\tt x}} \def\NYx{{\sh\komasymbol{106}\tt x}} \def\TOx{{\sh\komasymbol{108}\tt x}} %% \symbol{110} throught \symbol{121} are used to denote KIFU. \def\migi{\mbox{\sh\symbol{110}}} \def\hidari{\mbox{\sh\symbol{111}}} \def\yoru{\mbox{\sh\symbol{112}}} \def\iku{\mbox{\sh\symbol{113}}} \def\choku{\mbox{\sh\symbol{114}}} \def\hiku{\mbox{\sh\symbol{115}}} \def\agaru{\mbox{\sh\symbol{116}}} \def\ai{\mbox{\sh\symbol{117}}} \def\da{\mbox{\sh\symbol{118}}} \def\fu{\mbox{\sh\symbol{119}}} \def\dou{\mbox{\sh\symbol{120}}} \def\nari{\mbox{\sh\symbol{121}}} %% \symbol{124} and \symbol{125} are used to denote SENTE. \def\sirokoma{\ifChessStyle\else\mbox{\sh\symbol{124}}\fi} \def\Sirokoma{\ifChessStyle\else\mbox{\sh\symbol{125}}\fi} %% \symbol{126} and \symbol{127} are used to denote GOTE. \def\kurokoma{\ifChessStyle\else\mbox{\sh\symbol{126}}\fi} \def\Kurokoma{\ifChessStyle\else\mbox{\sh\symbol{127}}\fi} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Macros to print KIFU ( $B4}Ih (B) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Example: \siro23{\KI} \kuro44{\HI\da} \def\kifuhead{\hspace*{2pt}} \def\kifutail{} \def\siro#1#2#3{\kifuhead\sirokoma\num{#1}\jnum{#2}{#3}\kifutail} \def\kuro#1#2#3{\kifuhead\kurokoma\num{#1}\jnum{#2}{#3}\kifutail} \def\Siro#1{\kifuhead\sirokoma{#1}\kifutail} \def\Kuro#1{\kifuhead\kurokoma{#1}\kifutail} \newcount\mvcount\mvcount=1 \def\mv{\@ifnextchar ,{\mvvv}{\mvv}} \def\mvv#1,{\global\mvcount=#1\mvvv,} \def\mvvv,{{\hspace{0.5em}\bf\the\mvcount.\kern0.2em}\global\advance\mvcount1\mvx} \def\mvx{\@ifnextchar ,{...\mvxxx\@gobble}{\mvxx}} \def\mvxx#1,{{\tt#1}\mvxxx} \def\mvxxx{\@ifnextchar .{\@gobble}{\mvxxxx}} \def\mvxxxx#1.{{\kern0.2em\tt#1}} \def\kifu{\@ifnextchar [{\@kifu}{\@kifu[1]}} \def\@kifu[#1]{\global\mvcount=#1\begin{tabular}{llllllll}} \def\endkifu{\end{tabular}} \let\score=\kifu \let\endscore=\endkifu %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Macros to print SHOGIBAN ( $B>-4}HW (B) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\shogiban#1{\shogibanmain{1}{9}{1}{9}{0}{0}{#1}} \def\Shogiban#1{\shogibanmain{1}{9}{1}{9}{1}{0}{#1}} \def\SHOGIBAN#1{\shogibanmain{1}{9}{1}{9}{2}{0}{#1}} \def\tsumeshogi#1#2#3#4#5{\shogibanmain{#1}{#2}{#3}{#4}{0}{1}{#5}} \def\Tsumeshogi#1#2#3#4#5{\shogibanmain{#1}{#2}{#3}{#4}{1}{1}{#5}} \def\TSUMESHOGI#1#2#3#4#5{\shogibanmain{#1}{#2}{#3}{#4}{2}{1}{#5}} \newcommand{\shogibanmain}[7]{ %% $B6Z (B#1 $B$+$i (B#2 $B!"CJ (B#3 $B$+$i (B#4 $B$N>-4}HW$r:n$k (B %% $B86E@ (B (0,0): $BKqL\#96e$N:82<:BI8 (B %% (\cx,\cy): $BKqL\ (B#2#4 $B$N:82<:BI8 (B, \cxx=\cx-10, \cyy=\cy-10 %% (\cw-\cx,\ch-\cy): $BKqL\ (B#1#3 $B$N1&>e:BI8 (B, \cww=\cw+20, \chh=\ch+20 %% \cmochi: $B<+J,$N;}6p?t (B \cmochii: $BAj. (B 1/ $BCf (B 2/ $BBg (B %% #6: 0/ $BA4HWLL (B 1/ $B5M$a>-4}HWLL (B %% #7: $B6p0LCV!";}$A6p (B \ifcase#5 % #5==0/ $B>. (B \unitlength=0.1mm \def\axissize{8} \def\mochigomasize{9} \def\komasize{12} \thinaxis=0.1mm \thickaxis=0.3mm \or % #5==1/ $BCf (B \unitlength=0.2mm \def\axissize{14} \def\mochigomasize{20} \def\komasize{25} \thinaxis=0.2mm \thickaxis=0.5mm \else % #5>=2/ $BBg (B \unitlength=0.3mm \def\axissize{17} \def\mochigomasize{25} \def\komasize{36} \thinaxis=0.3mm \thickaxis=0.8mm \fi \cx=9 \advance\cx by -#2 \multiply\cx by 50 \cxx=\cx \cy=9 \advance\cy by -#4 \multiply\cy by 50 \cyy=\cy \cw=#2 \advance\cw by -#1 \advance\cw by 1 \multiply\cw by 50 \cww=\cw \advance\cww by 100 \ifnum#6=0 \advance\cxx by -50\advance\cww by 50\fi \ch=#4 \advance\ch by -#3 \advance\ch by 1 \multiply\ch by 50 \chh=\ch \advance\chh by 50 \ifnum#1>1 \advance\cww by 10 \fi \ifnum#2=9 \ifnum#1>1 \advance\cxx by -50 \fi \else \advance\cww by 10 \advance\cxx by -10 \fi \ifnum#3>1 \advance\chh by 10 \fi \ifnum#4=9 \ifnum#3>1 \advance\chh by 40 \advance\cyy by -50 \fi \else \advance\chh by 10 \advance\cyy by -10 \fi \begin{picture}(\cww,\chh)(\cxx,\cyy) %% $BHWLLI=<( (B \x=\cx \y=\cy \w=\cw \h=\ch \ifnum#1>1 \advance\w by 10 \fi \ifnum#2<9 \advance\w by 10 \advance\x by -10 \fi \ifnum#3>1 \advance\h by 10 \fi \ifnum#4<9 \advance\h by 10 \advance\y by -10 \fi \z=#2 \advance\z by 2 {\loop\ifnum\z>#1 \linethickness{ \ifnum\z=11 \thickaxis\else\ifnum\z=2 \thickaxis\else\thinaxis\fi\fi} \put(\cx,\y){\line(0,1){\h}} \advance\cx by 50 \advance\z by -1 \repeat} \z=#4 \advance\z by 2 {\loop\ifnum\z>#3 \linethickness{ \ifnum\z=11 \thickaxis\else\ifnum\z=2 \thickaxis\else\thinaxis\fi\fi} \put(\x,\cy){\line(1,0){\w}} \advance\cy by 50 \advance\z by -1 \repeat} %% $B:BI8I=<( (B \shsize{\axissize} { \advance\cx by 25 \ifnum#4<9 \advance\cy by\ch \advance\cy by 15 \else\ifnum#3=1 \advance\cy by\ch \advance\cy by 15 \else \advance\cy by -30 \fi\fi \z=#2 \advance\z by 1 \loop\ifnum\z>#1 \advance\z by -1 \put(\cx,\cy){\makebox[0mm]{\num\z}} \advance\cx by 50 \repeat }{ \advance\cy by 15 \ifnum#2<9 \advance\cx by\cw \advance\cx by 30 \else\ifnum#1=1 \advance\cx by\cw \advance\cx by 30 \else \advance\cx by -25 \fi\fi \z=#4 \advance\z by 1 \loop\ifnum\z>#3 \advance\z by -1 \put(\cx,\cy){\makebox[0mm]{\jnum\z}} \advance\cy by 50 \repeat } %% $B!V;}6p!WI=<( (B \shsize{\mochigomasize} \cmochix=\cx \advance\cmochix by\cw \advance\cmochix by 40 \cmochixx=\cx \advance\cmochixx by -30 \ifnum#2<9 \advance\cmochix by 40 \else\ifnum#1=1 \advance\cmochix by 40 \else \advance\cmochixx by -40 \fi\fi \cmochiy=\cy \advance\cmochiy by\ch \ifnum\ch>400 \advance\cmochiy by -50 \fi \put(\cmochix,\cmochiy){\makebox[0mm]{\kurokoma}} \advance\cmochiy by -35 \put(\cmochix,\cmochiy){\makebox[0mm]{\mochi}} \advance\cmochiy by -35 \put(\cmochix,\cmochiy){\makebox[0mm]{\goma}} \advance\cmochiy by -50 \cmochiyy=\cy \advance\cmochiyy by 30 \ifnum#6=0 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Sirokoma}} \advance\cmochiyy by 35 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Mochi}} \advance\cmochiyy by 35 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Goma}} \advance\cmochiyy by 50 \fi \cmochiybase=\cmochiy \cmochiyybase=\cmochiyy \cmochi=0 \cmochii=0 %% $B6pG[CV$H;}$A6pI=<( (B #7 %% $B!V$J$7!WI=<( (B \shsize{\mochigomasize} \ifnum\cmochi=0 \put(\cmochix,\cmochiy){\makebox[0mm]{\na}} \advance\cmochiy by -40 \put(\cmochix,\cmochiy){\makebox[0mm]{\si}} \fi \ifnum#6=0\ifnum\cmochii=0 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Na}} \advance\cmochiyy by 40 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Si}} \fi\fi \end{picture}} \def\koma#1#2#3{ \shsize{\komasize} \x=9 \advance\x by -#1 \multiply\x by 50 \advance\x by 25 \y=9 \advance\y by -#2 \multiply\y by 50 \advance\y by 10 \put(\x,\y){\makebox[0mm]{#3}} } \def\mochigoma{\@ifnextchar [{\@mochigoma}{\@mochigoma[1]}} \def\@mochigoma[#1]#2{ \shsize{\komasize} { \def\Hi{\relax}\def\Ka{\relax}\def\Ki{\relax}\def\Gi{\relax} \def\Ke{\relax}\def\Ky{\relax}\def\Fu{\relax} \edef\tempa{#2} \global\z=1 \ifx\tempa\Hi\global\z=0 \else \ifx\tempa\Ka\global\z=0 \else \ifx\tempa\Ki\global\z=0 \else \ifx\tempa\Gi\global\z=0 \else \ifx\tempa\Ke\global\z=0 \else \ifx\tempa\Ky\global\z=0 \else \ifx\tempa\Fu\global\z=0 \fi\fi\fi\fi\fi\fi\fi } \ifnum\z=0\relax \advance\cmochii by 1 \w=\cy \advance\w by\ch \ifnum\cmochiyy>\w \cmochiyy=\cmochiyybase \advance\cmochixx by -50 \fi \put(\cmochixx,\cmochiyy){\makebox[0mm]{#2}} \ifnum#1>1 \advance\cmochiyy by 40 \shsize{\axissize} \ifnum#1>9{ \y=#1\advance\y-10\relax \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Num\y\Num1}}} \else{ \advance\cmochixx by 2 \put(\cmochixx,\cmochiyy){\makebox[0mm]{\Num#1}}} \fi \fi \advance\cmochiyy by 45 \else \advance\cmochi by 1 \ifnum\cmochiy<\cy \cmochiy=\cmochiybase \advance\cmochix by 50 \fi \put(\cmochix,\cmochiy){\makebox[0mm]{#2}} \ifnum#1>1 \advance\cmochiy by -30 \shsize{\axissize} \ifnum#1>9{ \y=#1\advance\y-10\relax \put(\cmochix,\cmochiy){\makebox[0mm]{\num1\num\y}}} \else \put(\cmochix,\cmochiy){\makebox[0mm]{\num#1}} \fi \fi \advance\cmochiy by -45 \fi } %% $BJ?