## Woodblock emulation

Latex: Can do

Latex.

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:

\documentclass{article}
\input mayaps
\input mpfmap
\input red89

\begin{document}
\section{Mayan}
\mayaFont\codex=codex
\mayaFont\th=thompson
\mayaFont\ga=gates
%\mayaGlyphInLineC

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

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

\maya{023:023:415.130:176}

\maya{|(1A.[r]123):T1}

\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}

gates
{ \ga \maya{T520} \maya{T520} } \maya{T520}
\maya{(023.153.023):220}

codex
{ \codex \maya{T520} \maya{T520} } \maya{T520}
\maya{(023.153.023):220}

thompson
{ \th \maya{T520} \maya{T520} } \maya{T520}
\maya{(023.153.023):220}
\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}
\mayaGlyph{422.422}

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

\end{document}

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

I’m perhaps more optimistic.

## Vertical

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.

## Scambling

and switching on paragraph numbers

Legal writing (like judgments) has numbered paragraphs, for detailed pin-pointing of information, and the occasional (unnumbered) heading. Headings help a bit, especially in long judgments, but since they are an interpretation of the structure of the reasoning and not the interpretation of the structure, headings take on an ancillary role only, as an aid to navigation.

There are numerous ways to achieve numbered paragraphing: making the document one giant enumerated list, with each paragraph being an item in the list, is one way (simplistic, but workable).

Another way is to count the paragraphs.

Latex by default has numbered headings and unnumbered paragraphs. To re-style it into legal mode, a paragraph counter can be created, say something like \p, to keep it short to save typing:

%Numbered paragraphs
\newcounter{parno}[paragraph]%% numbered paragraph
\renewcommand{\theparno}{\arabic{parno}}
\newcommand{\p}{\stepcounter{parno}\noindent[\theparno]\ }
\setcounter{secnumdepth}{4}

This switches off paragraph first-line indenting, puts square brackets around the number, and adds a space after it.

To stop numbers like 1.1.1.1 appearing (paragraph numbers are the fourth level down), the paragraph number can be de-linked from the level numbering coming in from one level above:

%delink paragraph counter from being reset by subsubsection
\usepackage{chngcntr}
\counterwithout{paragraph}{subsubsection}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}

And headings (meaning sections, in the case of an article document-class) can have their numbering switched off by setting to nothing (being {}):

%remove (printing of) section numbering
\renewcommand\thesection{}

Got vertical text working: for Japanese (using the lualatex-ja package, compiled under lualatex, rather than xelatex), going right-to-left. And ruby-text (furigana):

Vertical also works for Chinese characters, of course.

And Mongolian or Manchu, under the mls package (which gives MonTeX), besides Cyrillic and Roman scripts, can do vertical too, left-to-right:

Painters have an exercise to stretch their skills: painting an egg on a piece of paper. Uses up a lot of titanium white. The legal equivalent , in comparative law/translation, would be trying to render the phrase ‘common law’, and its near-equivalent and simultaneous not-equivalent “droit commun”, from French into English.

Here is Carbasse (via a quote typeset in Latex, to capture the visuality of the original printing):

In French, the phrase “common law” has a shade of meaning and a perspective (and field of denotation) that it does not have in English, and “droit commun”, as a (knowing) near-miss gloss, does not exactly mean ‘common law’ (in connotation) like a literal translation of ‘droit commun’ would sound like it would give. The Paris perspective of London.

Almost the linguistic equivalent of an Escher knot.

And he [the Chief Justice] said, upon the observation upon 4 Mod. see the inconveniencies of these scambling reports, they will make us appear to posterity for a parcel of blockheads.

Once there was a law report of a case (Hodge v Clare), which seemed to be saying that pleading that a party was, in modern terms, ‘absent’, did not necessarily mean ‘absent outside of the jurisdiction’, like all other cases had confirmed up until that time.  But the law report itself was found at fault, because:

upon search of the roll in that case [the official parchment roll recording the case], there is a full averment, that the person, during whose absence, was in partibus transmarinis [in parts overseas], and no ground for the objection.

Hence Holt CJ’s observation about ‘these scambling reports’. – Slater v May, 2 Lord Raymond 1071.

Would we perhaps call it a ‘fake report’, nowadays?

With the colored letttrine Latex package, and a suitable font like EB Garamond, which has empty decorative initials (acting like a background) and separate foreground letters, interesting effects can be achieved:

Similar effects could be achieved with CSS in HTML, but printing commands can do optical effects like lensing, and it will probably be a while before such things are coded up as standard-issue into browsers.

Vita is indeed brevis, and art longa.

## Weeks and Days

Patterns in the water

(A) Weekdays and Year Cycles

Just like the way that the gears of an Enigma machine inter-mesh with each other to produce a set of combinations, the days of the week, combined with the days in the year, produce a cycle 10,227 days long (28 years) before the days of the week and the days of the month start repeating:  e.g., 25-August being a Friday, with 24-August being a Thursday, etc.

10227 = 7 x 1461 (1461 = 365.25 x 4)

Using slightly different cycles, we get:

10228 [-1]

25/08/2017 6          Friday
24/08/1989 5          Thursday
23/08/1961 4          Wednesday
22/08/1933 3          Tuesday
21/08/1905 2          Monday

10227 [0]

25/08/2017 6          Friday
25/08/1989 6          Friday
25/08/1961 6          Friday
25/08/1933 6          Friday
25/08/1905 6          Friday

10226  [+1]

25/08/2017 6          Friday
26/08/1989 7          Saturday
27/08/1961 1          Sunday
28/08/1933 2          Monday
29/08/1905 3          Tuesday

10225 [+2]

25/08/2017 6          Friday
27/08/1989 1          Sunday
29/08/1961 3          Tuesday
31/08/1933 5          Thursday
2/09/1905    7          Saturday

Note how the weekdays and day numbers go in step, and eventually ‘click’.

(B)

Numbers themselves form patterns. Here are some visual examples from the web of  Latex coding output: a helix based on square roots, and a set of curves, repeated and coloured. These sorts of things lead naturally to (Pascal) triangles and sieves (of Eratosthenes) and other things, like why 2 can be the only ever even prime number (in counting systems above base 2, anyway).

“root-helix” Latex code

the first mandala from “mandala” Latex code

(C)

The characters in a font are visual shapes, so they can be repeated, reflected, and reflected again, and patterns emerge.

Doing a basic experiment in Latex, if we take a character, say the Phaistos Disc dove (presented in left-to-right reading mode, the assigned Unicode code point is u000101EF) and a random letter (or better, ‘letter’), from say the Lao script  (character slot 120 in the “Noto Sans Lao” font from Google, a combination of two glyphs, u0E9A + u0ECD), combine them together,  and reflect, we get a motif for a book chapter or similar.

Fleurons can be tiled. Here are some examples running off code from an article by Wilson in the TeX User Group newsletter (TUGBoat), 2011.

(D)

Story structures also form patterns, with TV tropes being an ever-popular example, because sometimes they are so glaringly, but unintentionally, comical: the ‘syntax’ of a plot, or a set of scenes, appears too-obviously constrained. Fair enough, if the constraints are the laws of physics or what a stunt person can and cannot do (in those cases we can suspend disbelief and enjoy the show). In other cases, the background context influenced the ideas and choices, and it shows, like cave people with modern hairstyles, and even modern facial expressions and gestures. (Even a young Umberto Eco couldn’t help noticing how the Indians in Westerns were repeatedly constrained by the plot to present themselves as easy targets for showcasing the hero’s skill while standing on top of the runaway stagecoach, etc.)

(E)

All these things, gear-meshing, numerical version of the same, translating from one set of patterns to another, they all suggest the possibility of a notation algebra of some sort. One cat, called by different names in different languages, leads to the conjecture that the different words are equivalents of each other, and interchangeable: they are ‘the same’. That process breaks down and confusion arises when it comes to processes instead of things: the process of driving on the road in England is not the same as the process of driving on the road in a US state. The function or result is the same, getting from A to B (more or less), but the method is different, driving on the left instead of driving on the right, how to approach an intersection. Civil Law versus Common Law.

A cour d’assise is (sort of) a Crown Court, in a sense (the purpose or result), and some legal dictionaries ‘translate’ the one term to the other; in another sense (how it does it), a cour d’assise  never will be interchangeable with a Crown Court: the procedures (like the engines of different types of cars, or like the road rules) work in their own ways.

So, for a translator, the question is: *What* is being translated?

Some sort of notational algebra is definitely being called for.

If a and b are words (the forms) in different languages (together with their underlying concepts, the content):

Things are mappable:

Processes are not:

(F)

Speaking of transformations, based on cobbling together some Web code and other suggestions, I’ve got a legally-useful Latex document template up and running: traditional numbered paragraphs, un-numbered headings. Citation is a bit fiddly at first glance and took a couple of attempts to set up the procedures correctly (but the complexity of the process matches the complexity of the required rules, OSCOLA in this case – a huge amount of work has gone into the OSCOLA bibliography style file).

First Latex compilation run: citation placeholders are inserted

Then biber runs across the citations, collating everything behind the scenes.

Second compilation run: references are inserted, re-pagination done, cross-references updated, etc

(The case of R v Hill, about the competency of a witness to testify, is available at CommonLII.)

I’m very impressed with Latex (and its Unicode incarnation, Xelatex).

Examples of transformations (from “transforms.tex”)

## LaTeX, treasure cave

Have discovered the joys of typesetting. Specifically, the XeLaTeX incarnation of LaTeX: it can understand Unicode, and can access any fonts installed on the system. Plus its code is expandable, and user-written packages extend its functionality and abilities.

Latex et al. (the tex part is from Greek τέχνη, techne, “art, skill, craft”, meaning both skill of mind and skill of hand) has maths typesetting at its core.

Using suitable packages if required (and there are thousands), you can do papers on more maths:

isotopes:

(and even, on the Arts Faculty side, )

Mazes:

Chess games (of course), step-by-step

.

There are a whole bunch of linguistics-related packages.

For syntax trees and glosses:

Glosses in other scripts:

Playful stuff:

and

And so on.

(As an aside, learning cuneiform must have taken ages at school, not to mention if you were Babylonian and had to go to Ancient Sumerian classes!)

There’s a package called manuscript, designed for emulating the old-style typewriter-written theses, which must have been written for LaTeX in the old days, I think. Now, with XeLaTeX, with its access to any and all installed fonts, one line of code (selecting a typewriter font) is all that is needed for emulating an old-style thesis.

Well, almost. Using the underline command, produces a nice, typeset line, which contrasts with the font (Urania Czech, in this case):

But with the old typewriters, you could backspace, and use the _ key (or the X key for typing errors, before liquid paper was invented):

And of course, some typewriter ribbons were red-and-black (never found out what the red ink was used for).

Lots of fun.

===

Addendum 27-Aug-2017: corrected spelling to: XeLaTeX.

## Font names containing apostrophes

Apostrophes (‘) in font names need special handling. (The trick is (a) to escape the apostrophe – with a backslash – in the CSS: Tycho’sElegy >> Tycho\'sElegy, and (b) enclose the CSS style string in double quotes, not single quotes: style="font-family:Tycho\'sElegy;font-size:24pt; “.)

Also, the font filename, the font preview window title text, the font name appearing in the font picker, and the font name known internally to the system(as per the name in the /fonts folder), can be all different.

Tycho’sElegy: The cat sat on the mat.

Tycho’sRecipe: The cat sat on the mat.

Love’sLabour: The cat sat on the mat.

WirWenzlaw Rough: The cat sat on the mat.

butterbrotpapier (from www.anke-art.de, via fontspace): The cat sat on the mat.

JaneAusten NoSecret: The cat sat on the mat.

Designs2 2: ABDEF

Ethernal PERSONAL USE: The cat sat on the mat.

Galderglynn Titling: The cat sat on the mat.

Profaisal: The cat sat on the mat.

CancellerescA: The cat sat on the mat.