Importing a bunch of pages from old websites.
[website_subgeniuskitty.com] / data / development / misc / genkouyoushi_paper.md

Overview

As a professor of Japanese, my wife requires her students to use genkouyoushi paper on most written assignments. Although this can be purchased in Japanese bookstores (or online) and can be found freely on many websites as a PDF, the lack of control over size, spacing and color frustrated her. The following source code generates genkouyoushi paper via LaTeX and is easily customizable to match any layout the user may desire.

Files

Source Code

\documentclass{article}
\usepackage{tikz}
\usepackage{pdflscape}
\usepackage[top=1.6cm, bottom=1.6cm, left=1.6cm, right=1.6cm]{geometry}
\pagestyle{empty}
\newcommand\genkoyoshi[4]{% maxrow, maxcol, size, sep
  \def\maxrow{#1}%
  \def\maxcol{#2}%
  \def\size{#3}%
  \def\sep{#4}%
  \begin{tikzpicture}
    \pgfmathsetmacro{\inc}{\size+\sep}
    \foreach \col in {1,...,\maxcol}{
      \foreach \row in {1,...,\maxrow}{
        \draw ({(\col-1)*\inc pt},{\row*\size})
        rectangle ++ (\size,\size);
      }
      \draw ({(\col-1)*\inc-\sep},{\size})
      rectangle ++ (\sep,\maxrow*\size);
    }
  \end{tikzpicture}%
}
\begin{document}
\begin{landscape}
\genkoyoshi{20}{20}{9mm}{3mm}
\end{landscape}
\end{document}