Woodblock emulation

Latex: Can do



The moral of the story, in the Tex/Latex/Xelatex world, is that it is solvable.

Given the traditional Chinese woodblock printing style, from top-down, right-to-left, the typesetting algorithm puzzle to solve is: given a string of characters, what is the formula for sequentially printing them Chinese-style into a w x h grid starting from the top left corner as column 1 row 1?

Answer: (w – c) * h + r

The symmetry group is almost quark-like if a third dimension were to be added.



Conjecture: Any (ordered) arrangement of locations, whether characters on a page, vertices in a crystal, or gluons in a glob, would have the same underlying mathematics.


The TBRL result, using the Chinese Wikipedia article on the star Achernar (水委一, shuǐ wěi yī) as an excerpt source (mid-March 2018 version; it has since been edited), is:


River End Prime is a …”

Obviously, the next step is that punctuation etc needs to be made auto-adjusting, but that is solvable too.

It’s all in the formula.







Mayan is doable in Latex

Typesetting Glyphs In Mayan

Mayan is doable, in Latex, using MayaPS.

Because Postscript is doing the glyph layout algorithm based on DVI output and bitmap fonts, the compilation sequence is multi-step:

  • latex filename (produces dvi file)
  • dvips filename (produces ps file)
  • pkfix filename.ps filenameo.ps (converts bitmap fonts)
  • ps2pdf filenameo (produces pdf file).




Example tex code:

\input mayaps
\input mpfmap
\input red89


\maya{213} + \maya{219} = \maya{213:219}

\maya{545} + \maya{546} = \maya{545:546}



\mayaRGB{0 0 0.8}c \mayaRGB{0.9 0.6 0}{orange}
\maya{451.452orange 026.(314/314)c (570/014‘r.267.024)c}

\maya{T520} \th \maya{T520} \maya{T520} \codex \maya{T520}

{ \ga \maya{T520} \maya{T520} } \maya{T520}
{ \codex \maya{T520} \maya{T520} } \maya{T520}
{ \th \maya{T520} \maya{T520} } \maya{T520}
 \par \noindent\mayaC{ % \mayaC = glyphs with captions
 451.452 026.314/(314) 111.274 047.276/010 913 810
 451.452 026.314/(314) 570/014.267.024 111.+176/111 913 810
 451.452 026.314/(314) 245.234 026.172/0 23 913 810}

\par xxx
\mayaGlyph{900r} \maya{072:107} versus \maya{072.107}


The writers of the package expect less than 100 users worldwide.

I’m perhaps more optimistic.


Using TeX for vertical typesetting

TeX is very good at horizontal typesetting, and can even do quite good vertical typesetting by the knack of using fonts with rotateable glyphs,  setting the page with its usual glue and stretchable spaces, then rotating the entire page 90 degrees.

Doing vertical typesetting by hand, so to speak, should also be possible.

Here follows an attempt:

Draw  a grid, then position the characters by trial-and-error adjustments:


with code like this:


\draw[step=\dunit, color=blue]{ (0,0) grid (8,12)};
\node at (8-0.40,12-0.40) {\huge\ver\char”5647};
\node at (8-0.40,11-0.20) {\huge\ver\char”5648};
\node at (8-0.40,10-0.05) {\color{red}\huge\ver\char”5F48};
\node at (8-0.40,9+0.15) {\huge\ver\char”5748};
\node at (8-0.40,8+0.35) {\huge\ver\char”5848};

When finished, draw the grid in white, say, to get:


It would be more convenient to have all the adjustments and positioning built-in, so to speak, and that can be done in the Tikz package by naming the text nodes methodically and then populating them (manually at first, later by a macro loop):


\node at (letters.center 14 12){\rotatebox[origin=c]{-90}{\huge\ver\char”300E}};
\node at (letters.center 14 11){\huge\ver 他};
\node at (letters.center 14 10){\huge\ver 们};
\node at (letters.center 14 9){\huge\ver 是};

but a square grid, rather than a rectangular one, is assumed:


If each square is defined as a set of four sub-quadratures, and inter-column spacing were a parameter relative to font size, with subsequent headings, margin notes, and so on, much could be done.

The quest continues.


Little Lorem

Random characters from a specific script

Place-filling text (lorem ipsum) to give an idea of what a page layout would look like has a long pedigree and TeX can do it well.

Sometimes an idea of what characters in a specific script would look like is also needed.


Here’s some TeX code for that (it started off as displaying random Chinese characters [by egreg on stackexchange in 2011], but has been expanded to handle any Unicode block as requested):

%Random text by script


%\errorcontextlines 10000 %for getting fuller error messages










%-------------------------- customised section:

% Yi block



% Linear A block



% Linear B syllabary block



% Linear B ideograms block



% Vai block



% Miscsellaneous symbols, emoticons, etc blocks



% Tangut Components block



% Tangut block



% Bamum block



% Anatolian hieroglyphs block



% Egyptian hieroglyphs block



% CJK part block



% Phaistos Disc block



%Cuneiform block







% url= https://tex.stackexchange.com/questions/20409/how-to-create-a-table-of-random-characters-in-xetex

% question = How to create a table of random characters in XeTeX:

% "I want to create a table of 1000 characters picked randomly from the unicode block "unified CJK ideograms" (4E00-9FFF). Each cell should contain exactly one huge character, no character should appear twice."

% answer = answered Jun 10 '11 at 16:18 by egreg



\ifcsname CJK\the\cjkcharcnt\endcsname

\message{Recomputing (collision)}\let\next\cjkchar


\expandafter\let\csname CJK\the\cjkcharcnt\endcsname\empty

\ifshownumbers{\footnotesize(\number\cjkcharcnt) }\fi


\message{Recomputing (missing character)}\let\next\cjkchar






\newcommand{\row}{\hbox to\hsize{%









%scriptname, fontname, startcharactervalue, stopcharactervalue






This is a sample of #1 (in \hl{\texttt{#2}} font): \par

{\huge \ver \row\row\row}





%\shownumberstrue % uncomment to show (decimal) numbers

\dosample{Yi}{Noto Sans Yi}{\yistartc}{\yistopc}

\dosample{Linear A}{Aegean}{\linastartc}{\linastopc}


\dosample{Icons etc}{Code2003}{\iconstartc}{\iconstopc}

\dosample{Tangut Components}{Tangut Yinchuan}{\tangutcomstartc}{\tangutcomstopc}

\dosample{Tangut}{Tangut Yinchuan}{\tangutstartc}{\tangutstopc}

\dosample{Bamum}{Noto Sans Bamum}{\bamumstartc}{\bamumstopc}

\dosample{Anatolian hieroglyphs}{Anatolian}{\anatolianstartc}{\anatolianstopc}

\dosample{Egyptian hierglyphs}{Aegyptus}{\egyptianstartc}{\egyptianstopc}

\dosample{CJK ideographs}{SimSun}{\cjkstartc}{\cjkstopc}

\dosample{Linear B syllabary}{Aegean}{\linbsstartc}{\linbsstopc}

\dosample{Linear B ideograms}{Aegean}{\linbistartc}{\linbistopc}

\dosample{Phaistos Disc}{Aegean}{\phaistosstartc}{\phaistosstopc}








% \row\row\row\row\row\row\row\row\row\row

% \row\row\row\row\row\row\row\row\row\row

% \row\row\row\row\row\row\row\row\row\row

% \row\row\row\row\row\row\row\row\row\row

% \row\row\row\row\row\row\row\row\row\row



wú and mu

无 and 無

Looking up 无 in a Japanese dictionary was never going to work, but it took a few moments to work that out.

无 (pronounced wú, meaning nothing) is a simplified Chinese character. The traditional form, 無, is in Japanese (and pronounced む mu). A good way to remember it is as a sheaf of wheat sitting on the fire, becoming nothing pretty quickly. It functions much like the Greek privative a-, like a general-purpose un– or non-.

Luckily, the free Unicode text editor app, BabelPad, can convert between Simplified and Traditional.

Problem solved.

Reading and Writing

Easy on the eye/hand

If there was a writing system, with all the letters (let’s assume an alphabetic system) similar to each other, the word shapes would be strenuous to discern from each other.



(A simplistic substitution-cipher for: ‘The cat sat on the mat and the quick brown fox jumps over the lazy dog.’, using various i and t glyphs, and one or two l’s, down at the Latin supplement end of things.)


Where the letter shapes are less similar, it becomes slightly easier to recognise word shapes:



(Same cipher, using random letters from random scripts.)


By comparison, cursive writing, Russian-style, in English:


and in Russian (from the beginning of the Wikipedia article on the solar system):




The conjecture arises that a similar shape-recognition process could be in play for concepts, where nearby concepts on the concept spectrum are interchangeable with each other.


Certainly, a linguistic similarity causes confusion: year versus light-year, Acacia versus Cassia, Lake Constance versus Lake Mungo, etc. And across languages, too, as the false-friends of the translator’s world testify.

Contrariwise, a linguistic difference should make it easy to classify two things as different when they are not (barring some familiarity with the subject matter and a binding classification scheme): up and down (quarks); duck and dodo (birds).

And a third variation tries to make two different things the same by calling them by the same (or similar) names.

Scriptwriters have an increasing tendency of late, presumably from copying each other, of having their characters say: “It’s only circumstantial”, meaning that the evidence at that stage of the plot development is not strong enough to present a case in court and so the hero has to do something more hero-y to obtain it.  In real life, anything that is not direct testimony (from a witness) and which proves another fact that goes to the charge is circumstantial evidence (evidence from the surrounding circumstances, such as the presence of DNA) and is often much stronger than direct evidence. Circumstantial evidence is entirely the opposite of ‘only circumstantial’.








Many Sheep

Agrarian contribution to law

Sheep are a part of legal history, and have influenced court procedure significantly, the reason being that sheep are finite in number, and, in the days before Marco Polo had brought back from the lands of the Khan an invention called “paper”, they (being the sheep) supplied the hide industry, which in turn supplied the writing industry (such as it was, back then), which in turn allowed Chancery clerks and other literates to endorse (‘write on the back of’) rolls of parchment, annotating them with details of law suits brought and decided in the King’s courts.
So space was limited.
On the question of whether a plea should fail for lack of sufficient particulars (say, of the sums owed), it was eventually decided (paper taking a while to reach the Records Office) that such a plea was good, because otherwise there would be a ‘stuffing of the Rolls’.

A likely story.

The nominate report:


(from GoogleBooks)


The English Reports:


Church v Brownewick (19 Car II, 1667) 1 Sid 334; 82 ER 1140; [1714] EngR 120


“Sometimes a plea is denied, as one seventeenth-century reporter who thinks he is writing in French, puts it: pur avoider le stuffing del rolls ove multiplicity del matter
— Charles Donahue, JR, “The hypostasis of a prophecy’: legal realism and legal history”, in Matthew Dyson and David Ibbetson (eds), Law and Legal Process: Substantive Law and Procedure in English Legal History (2013), [Cambridge University Press, 2013], pp1-16, p 15.



CommonLII: [1693] EngR 8

The Bishop of Exeter & AL’ v Sampson Hele [1693] EngR 8; [1693] Shower PC 88; 1 E.R. 61 (1 January 1693)


Of course, electric sheep have infinite backs:

This judgment is unavoidably lengthy and has taken some time to prepare because the Court has been required to answer hundreds of questions of law that have been stated in the various appeals as well as consider the applications for judicial review. The Court has received some 20,000 documents and hundreds of authorities and has had to consider over 3,000 pages of submissions.

Ortmann v United States of America   [2017] NZHC 189