Hiragana practice grid

2008-08-19

Whilst looking for something else on my hard disk I found this ancient thing I did that might be of use to other people. It’s a design of practice paper for writing hiragana and katakana. So if you’re learning to write Japanese do print out lots.

kanagrid (PDF, 3807 octets)

Share and Enjoy!

Much to my amusement the “source” is a short PostScript program that I now find mysterious. Despite the comments:

%!
% Kanagrid v1
% Copyright 1998 drj - copying in whole permitted

% draws a box of the specified dimensions at 0,0
% bx by -
/box {
  0 0 moveto
  dup 0 exch rlineto
  exch 0 rlineto
  neg 0 exch rlineto
  closepath } def

% draws the interior divisions of a rectangle divided into n
% boxes, the boxes being arranged horizontally
% bx by n - bx by n
/oxgrid {
  1 1 2 index 1 sub
  { 3 index mul 1 index div
    0 moveto 0 2 index rlineto }
  for } def

% draws the interior divisions of a rectangle divided into n
% boxes, the boxes being arranged vertically
% bx by n - bx by n
/oygrid {
  1 1 2 index 1 sub
  { 2 index mul 1 index div
    0 exch moveto 2 index 0 rlineto }
  for } def

% draws the interior division of a rectangle divided
% horixontally and vertically into a grid of boxes.
% there are nx boxes horizontally, and ny vertically.
% at 0,0
% bx by nx ny -
/ogrid {
  4 1 roll oxgrid
  pop 3 -1 roll oygrid
  pop pop pop
} def

% draw a rectangle divided into nx boxes horizontally and
% ny vertically, at 0,0
% bx by nx ny -
/cgrid {
  3 index 3 index
  box ogrid
  stroke
} def

gsave

% put user space in mm
72 25.4 div
dup scale

% { nicked from 5.6.1 of PSRM2
/Helvetica findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding ISOLatin1Encoding def
  currentdict
end
/Helvetica-ISOLatin1 exch definefont pop
% }
/Helvetica-ISOLatin1
9 25.4 mul 72 div selectfont

40 36 translate
0 0 moveto (kanagrid - \251 1997 drj - copying in whole permitted) show

0.25 setlinewidth
0 4 translate
133 200 box
3 0 translate

0 1 9 {pop 10 200 1 20 cgrid 13 0 translate} for


grestore

showpage

2 Responses to “Hiragana practice grid”

  1. Nick Barnes Says:

    What’s mysterious about that?
    Needs “postscript” tag.

  2. drj11 Says:

    It seemed pretty mysterious yesterday, less so today. I guess it takes a while to page everything back in.

    It probably needs some DSC too.


Leave a comment