# How can I make a stroke order diagram for Chinese characters?

I would like to make a simple document explaining how to write certain Chinese characters. The standard method, which is used in many textbooks, is to first show the complete character and then a series of simpler ones adding one stroke at a time. In order to accomplish this, I need to be able to typeset only certain strokes from a given character. There is an article on typesetting rare characters, whose technique could be adapted but it would take a lot of work. I wonder if there is a simpler way which avoids entering each stroke manually.

-
I'm looking for raw data which I could process, I think I've found some. I've downloaded jar file from lri.fr/~dragice/strokefanning, renamed it to zip file, unzipped it and there is zdtStrokeData.txt file (~2 MB). Or, I've downloaded sourceforge.net/projects/zdt/files/zdt/zdt-1.0.2, installed it, I made a copy of net.sourceforge.zdt.strokeanimation_0.2.1.jar to a zip file, unzipped it and there is also zdtStrokeData.txt file in etc folder (~4 MB). I don't know how to process it, yet, but it might be a way. –  Malipivo May 18 at 10:50

I can speak for Japanese only, but it might help you to find the right track for Chinese if there is a similar project.

I had a privilege to exchange several emails with Ulrich Apel (the AAAA and Wadoku projects) and Timothy Eyre (the creator and maintainer of the Kanji Stroke Order Font). They are both nice and helpful guys.

How the font with stroke orders works in this particular case? You simply download the font from http://www.nihilist.org.uk/ (look up for the first link from top on the webpage) and unpack it in your working directory (and eventually install it). Use it with xelatex or lualatex as any other font. I enclose an example and a preview of several kanjis.

Update: I've found this font in fonts-kanjistrokeorders package in the Ubuntu repository.

%! {xe|lua}latex mal-kanji.tex
\documentclass[a4paper]{article}
\pagestyle{empty}\parindent=0pt
\usepackage{fontspec}
\begin{document}
\centering % Font is present in working directory...
\setmainfont[ExternalLocation]{KanjiStrokeOrders_v3.001.ttf}
Good day!\par おはようございます
\newpage
Fish!\par 魚
\end{document}


-

Not a (La)TeX solution, but the Commons Stroke Order Project "aims to create a complete set of high quality and free illustrations to clearly show the stroke orders of Han characters (hanzi, kanji, kana, hantu, and hanja)".

For example, the stroke order illustration of 山 is available at http://commons.wikimedia.org/wiki/File:山-bw.png , but you will perhaps need to write a quick script to get at the actual URL of the png directly.

There are a few varieties of illustrations possible, as well as Simplified, Traditional Chinese and Kanji variants available, so be sure to read the project description.

-