Digesting multi-stranded narratives

Two-layered referencing


Robert Graves, in his Greek Myths, used a citation style where each component of the myth was sourced to a list of relevant ancient authors and works. That technique will work for any narrative in general where there are multiple reporters, and will highlight the variations and commonalities of the different strands of traditions.



In Latex/Xelatex, this can be done by using the bibliography package biblatex with the option style=numeric-verb, which numbers the references, and in footnotes, if there are a series of cites, puts each of the items into their own set of square brackets.

To key them in any order but have them display in numerical order in the footnote, the biblatex option sortcites=true is used.

Rather than actual footnotes, putting all the notes at the end of the text is done by using the endnotes package, \usepackage{endnotes}, and setting the footnote to be an endnote with:


Next comes setting the endnotes to normal size


and adjusting their margin

 \rightskip\z@ \leftskip\z@ %\parindent=1.8em


Now a shorthand command will come in handy to save typing in the full footnote and citation commands each time:


We type some text, with the references:

Item 1\fnc{a5,a3,a2}. Item 2\fnc{a1, a2}. Item 3\fnc{a5}. Item 4\fnc{a4}, Item 5\fnc{a4}, Item 6\fnc{a5,a4,a3,a2,a1}.

Print the endnotes with:


And print the bibliography with:


Job done.

Full code:


% the test bibliography:
author={An Author Name},
title={title 1},
titleaddon={[translation of title goes here]},
journaltitle={Example X},
title={title 2},
journaltitle={Example Y},
title={title 3},
journaltitle={Example Z},
title={title 4},
journaltitle={Example cat},
title={title 5},
journaltitle={Example fog},

% biblatex for the bibliography
\usepackage[british]{datetime2} % for date formatting of \today
\usepackage[style=numeric-verb, sortcites=true, citereset=section, ibidtracker=true, indexing=cite, backend=biber, isbn=true, 

% use endnotes instead of footnotes

%reset footnote marker size: not needed now, because endnotes are being used instead

%set the endnotes to normal size, not footnote size:

%original command to position the endnotes with respect to the margin:
% \rightskip\z@ \leftskip\z@ \parindent=1.8em
% \leavevmode{\setbox\z@=\lastbox}\llap{\theenmark.\enskip}%

%don't need paragraph indent when setting the format for the endnotes, but the rest of the command shifts everything to the right by a bit, so that it lines up.
 \rightskip\z@ \leftskip\z@ %\parindent=1.8em

%footnotes are not being used, so setting footnotes to normal size font won't do anything:
\let\footnotesize\normalsize %footnote text

%short-version of the to-be-used-quite-often footnote~cite command pair; the cites command, because there could be multiple sources, and it handles one or more (comma separated):

%the data, meaning the text:
Item 1\fnc{a5,a3,a2}. Item 2\fnc{a1, a2}. Item 3\fnc{a5}. Item 4\fnc{a4}, Item 5\fnc{a4}, Item 6\fnc{a5,a4,a3,a2,a1}.

%print the endnotes:

%print the bibliography:

%typesetting run is: xelatex, biber, xelatex, xelatex.


Visualising networked relationships


With Latex (and Xelatex), networked relationships between entities, who talks to who(m), and so on, can be visualised. Some of the diagrams begin to take on the form and appearance of microscopic plankton, which suggests there will be whole ecosystems in social space (both human and electronic) to explore.

The picture is an example of an interaction net, and the programmatic definition comes from the tikz-inet package documentation (with .tex code via Overleaf, if I remember*).


*I feel a little bit like Humboldt on first looking into the sea.




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.








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



Egyptian Hieroglyphics

Assembling some text

Imagine the quadrangle entrance to the Department of Antiquities of a university displaying a sign like the following for their Ancient Egyptian course:


Some random glyphs, except for ‘abcd’ in the middle, and ‘MikTeX’ in the bottom right-hand corner.

Done with the ‘Noto Sans Egyptian Hieroglyphs’ font (free from Google, along with hundreds of other fonts) and, for Latex/Xetex: (a) the \pmglyph command from the hieroglf package, with the package lightly modified to add (for the moment, some) named aliases for the font glyphs (easier to do it this way, using Xetex and Unicode Truetype fonts, instead of special fonts with customised mappings), with the \pmglyph command able to do its own internal stacking and re-sizing of glyphs; (b) the \raisebox command, a built-in TeX command I think, for lifting a box of anything above (or pushing below) its usual position on the baseline, so as to arrange things in an aesthetically pleasing manner; (c) the \resizebox command from the graphicx package, to scale things up (and down, if needed), likewise for aesthetic reasons; (d) the \Shortstack command from the stackengine pckage, for stacking things on top of each other (as in this case; stackengine also has commands for stacking things under each other); and (e) the \color command from the xcolor package.

Unicode glyphs for Egyptian Hieroglyphs


\resizebox{!}{7em}{{\color{blue} \eh \HAxli }}
{\eh \huge \Shortstack[c]{{\HCxxiv} {\HAxii} {\HAi}}}
{\eh \Shortstack[c]{{\pmglyph{a}} {\raisebox{1.2em}{\pmglyph{c}}}}}
{\eh \Shortstack[c]{{\pmglyph{b}} {\raisebox{1.2em}{\pmglyph{d}}}}}
\resizebox{!}{4.8em}{{\color{blue} \eh \HAxlii }} {\pmglyph{m-i:k}{\pmglyph{t:e:k}}}

with \eh being defined via the fontspec package’s \newfontface command:

\newfontface\eh{Noto Sans Egyptian Hieroglyphs}


Typesetting Adventures


Typing characters that are not on the standard keyboard can be done if you are willing and able to: (a) create your own custom keyboard layouts; or (b) wait for someone else to (for a fee) upgrade and enhance their word processor program to cater for the new characters; or (c) use Latex (in particular, xelatex) and define your own mnemonic macros and then use them in your essay/report/thesis/paper.



And macros within macros, to your heart’s content.


Here’s an example tex document, showing how the image snippet at the start was created. (You’ll need Noto Sans Ugaritic font, or similar, to display the Ugaritic characters – they are in Unicode).










\newcommand\ugafontf{MPH 2B Damase}

\newcommand\ugafontg{Noto Sans Ugaritic}













































\newcommand\ugaritic[3]{% font size text

{#1 #2 #3}






































\ualpa \ %

\ubeta \ %

\ugamla \ %

\ukha \ %

\udelta \ %

\uho \ %

\uwo \ %

\uzeta \ %

\uhota \ %

\utet \ %

\uyod \ %

\ukaf \ %

\ushin \ %

\ulamda \ %

\umem \ %

\udhal \ %

\unun \ %

\uzu \ %

\usamka \ %

\uain \ %

\upu \ %

\usade \ %

\uqopa \ %

\urasha \ %

\uthanna \ %

\ughain \ %

\uto \ %

\ui \ %

\uu \ %

\ussu \ %

\uws \ %



\ugaritic{\ugh}{\large}{#1} (%

\textit{\utransltit{#1}}) %



\title{Ugaritic Script}


\date{11 November 2017: Saturday 11:30pm}





Ugaritic script, {\uga 𐎀𐎁𐎂𐎃𐎄𐎅𐎆𐎇𐎈𐎉𐎊𐎋𐎌𐎍𐎎𐎏}, is in Unicode. Fonts covering the Ugaritic Unicode range are: Aegean, Andagii, Code2003, FreeSans, K1FS (same shape and size as FreeSans), MPH 2B Damase, Noto Sans Ugaritic,and Quivira.

\par Using {\ugaritic{\ugb}{}{\UgariticName}} (\textit{\utransltit{\UgariticName}}) as sample text:


\par\noindent \ugaritic{\uga}{\utextsize}{\UgariticName} Aegean,

\par\noindent \ugaritic{\ugb}{\utextsize}{\UgariticName} Andagii,

\par\noindent \ugaritic{\ugc}{\utextsize}{\UgariticName} Code2003,

\par\noindent \ugaritic{\ugd}{\utextsize}{\UgariticName} FreeSans,

%\par\noindent \ugaritic{\uge}{\utextsize}{\UgariticName} K1FS,

\par\noindent \ugaritic{\ugf}{\utextsize}{\UgariticName} MPH 2B Damase,
\par\noindent \ugaritic{\ugg}{\utextsize}{\UgariticName} Noto Sans Ugaritic,
\par\noindent \ugaritic{\ugh}{\utextsize}{\UgariticName} and Quivira.

\section{The Alphabet}
\par \ugaritic{\ugf}{\large}{\ugalphabet}

\par \textit{\utransltit{\ugalphabet}}

\par \utexttrans{\UgariticName}

\par xxx xxx xxx


Note that the bulk code and long lists were copy-pasted from Excel, being created using the CONCATENATE function to build up strings from substrings. No use (mis)typing miles of coding if a click or two is available.