## TeX Live and Fedora

I’ve been using TeX Live on Fedora for years, but today I encountered an odd error when trying to perform the usual sudo tlmgr update package. I tried an Internet search of the error message but it didn’t provide any helpful clues. I finally worked out what had happened and, since it’s possible someone else might stumble on the same thing, I thought it might be useful to post about it in case it helps others.

First a little background information to supply some context. I normally use dnf to install or update software on Fedora, but not when it comes to TeX because I have found in the past that the Linux distros tend to have outdated TeX packages. Instead, I install TeX Live from the DVD (which I automatically receive as a joint member of UK TUG and TUG) as I have an iffy broadband connection, and I also have to update the TeX Live distributions for other family members. It’s easy to slap the DVD in the drive and set the installer going regardless of whether the computer has Linux or Windows. On my own device, I keep the TeX Live installations from the previous couple of years as it’s useful to be able to switch to an older version when trying to investigate a bug that has appeared with a new TeX Live release. (I have a symbolic link /usr/local/texlive/default that points to the release I want to use. All I need to do is change the link to switch to a different release.)

I don’t like automatic updates (it can be confusing if an update occurs without my noticing and causes an unexpected conflict) so I just periodically run sudo tlmgr update --all but today this resulted in an unexpected error. (The message suggests it’s a warning but the process fails.)

*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.
*** WARNING ***: This is almost NEVER what you want to do.
*** WARNING ***: Try using dnf install/update instead.
*** WARNING ***: If performing this action is really what you want to do, pass the "ignore-warning" option.
*** WARNING ***: But please do not file any bugs with the OS Vendor.


As is often the case, the problem is obvious in hindsight but it flummoxed me for a while. Why was the TeX Live manager suddenly telling me to use dnf when I’d installed it from the DVD? It had worked fine the last time (not that long ago), so what had changed since then? A few days ago I’d upgraded to Fedora 31.

It turned out that I now have an extra TeX Live installation that I didn’t know about in /usr/share/texlive/ with its own tlmgr in /bin (which is a symbolic link to /usr/bin). To add to the confusion my normal user PATH has /usr/local/texlive/default/bin/x86_64-linux near the start of the list but the /etc/sudoers file had it at the end:

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/texlive/default/bin/x86_64-linux


This means that when I use TeX as a normal user it’s picking up the installation from the DVD, but with sudo it’s picking up the other installation, which requires dnf rather than tlmgr to update TeX packages. The question is, how did that other TeX Live installation suddenly appear?

Some years ago I installed texlive-dummy to satisfy dependencies in the event that I had to install software that required a TeX distribution. As far as I can tell, that texlive-dummy RPM no longer exists. My guess is that when I upgraded to Fedora 31, the upgrade process detected the TeX Live dependency, but texlive-dummy had disappeared, so it installed the complete TeX Live distribution instead. For now, I’ve simply edited the /etc/sudoers file so that /usr/local/texlive/default/bin/x86_64-linux is listed first in the path.

## Localisation

[Previously posted on Goodreads 2018-07-26.] The chances are that you’re reading this in a web browser. Perhaps it has a menu bar along the top with words like ‘Bookmarks’ or ‘History’, or perhaps it has a hamburger style menu that appears when you click on a button with three horizontal lines. However you interact with an application, the instructions are provided in words or pictures (or a combination). Commonly known icons, such as a floppy disk or printer, are easy to understand for those familiar with computers, but more complex actions, prompts, and warning or error messages need to be written in words.

For example, if you want to check your email, there might be a message that says ‘1 unread email(s)’ or ‘2 unread email(s)’. If the software is sophisticated, it might be able to say ‘1 unread email’ or ‘2 unread emails’. Naturally, you’ll want this kind of information to be in a language you can understand. Another user may be using the same application in, say, France or Germany, in which case they’ll probably want the messages in French or German.

An application that supports localisation is one that is designed to allow such textual information to be displayed in different languages, and (where necessary) to format certain elements, such as dates or currency, according to a particular region. This support is typically provided in a file that contains a list of all possible messages, each identified by a unique key. Adding a new language is simply a matter of finding someone who can translate those messages and creating a new file with the appropriate name.

The recommended way of identifying a particular language or region is with an ISO code. The ISO 639-1 two-letter code is the most commonly used code to identify root languages, such as ‘en’ for English, ‘fr’ for French and ‘de’ for German. (Languages can also be identified by three-letter codes or numeric codes.) The language code can be combined with an ISO 3166 country code. For example, ‘en-GB’ indicates British English (so a printer dialogue box might ask if you want the ‘colour’ setting), ‘en-US’ indicates US English (‘color’) and ‘fr-CA’ indicates French Canadian (‘couleur’).

On Friday 20th July 2018, Paulo Cereda presented the newly released version 4.0 of his arara tool at the TeX User Group (TUG) 2018 conference in Rio de Janeiro. For those of you who have read my LaTeX books, I mentioned arara in Using LaTeX to Write a PhD Thesis and provided further information in LaTeX for Administrative Work. This very useful tool for automating document builds has localisation support for English, German, Italian, Dutch, Brazilian Portuguese, and — Broad Norfolk.

Wait! What was that?

Broad Norfolk is the dialect spoken in the county of Norfolk in East Anglia. There’s a video of Paulo’s talk available. If you find it a bit too technical but are interested in the language support, skip to around time-frame 18:50. Below are some screenshots of arara in action. (It’s a command line application, so there’s no fancy point and click graphical interface.)

Here’s arara reporting a successful job (converting the file test.tex to test.pdf) with the language set to Broad Norfolk:

For those who can’t see the image, the transcript is as follows:

Hold yew hard, ole partner, I'm gornta hev a look at 'test.tex'
(thass 693 bytes big, that is, and that was last chearnged on
07/26/2018 12:09:08 in case yew dunt remember).

(PDFLaTeX) PDFLaTeX engine ..... THASS A MASTERLY JOB, MY BEWTY
(Bib2Gls) The Bib2Gls sof....... THASS A MASTERLY JOB, MY BEWTY
(PDFLaTeX) PDFLaTeX engine ..... THASS A MASTERLY JOB, MY BEWTY

Wuh that took 1.14 seconds but if thass a slight longer than you
expected, dunt yew go mobbing me abowt it cors that ent my fault.
My grandf'ar dint have none of these pearks. He had to use a pen
and a bit o' pearper, but thass bin nice mardling wi' yew. Dew
yew keep a troshin'!


For comparison, the default English setting produces:

For those who can’t see the image, the transcript is as follows:

Processing 'test.tex' (size: 693 bytes, last modified: 07/26/2018

(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(Bib2Gls) The Bib2Gls software .......................... SUCCESS
(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS

Total: 1.18 seconds


For a bit of variety, I then introduced an error that causes the second task (Bib2Gls) to fail. Here’s the Broad Norfolk response:

For those who can’t see the image, the transcript is as follows:

Hold yew hard, ole partner, I'm gornta hev a look at 'test.tex'
(thass 694 bytes big, that is, and that was last chearnged on
07/26/2018 12:23:42 in case yew dunt remember).

(PDFLaTeX) PDFLaTeX engine ..... THASS A MASTERLY JOB, MY BEWTY
(Bib2Gls) The Bib2Gls sof....... THAT ENT GORN RIGHT, OLE PARTNER

Wuh that took 0.91 seconds but if thass a slight longer than you
expected, dunt yew go mobbing me abowt it cors that ent my fault.
My grandf'ar dint have none of these pearks. He had to use a pen
and a bit o' pearper, but thass bin nice mardling wi' yew. Dew
yew keep a troshin'!


For comparison, the default English setting produces:

For those who can’t see the image, the transcript is as follows:

Processing 'test.tex' (size: 694 bytes, last modified: 07/26/2018

(PDFLaTeX) PDFLaTeX engine .............................. SUCCESS
(Bib2Gls) The Bib2Gls software .......................... FAILURE

Total: 0.91 seconds


Here’s the help message in Broad Norfolk:

For those who can’t see the image, the transcript is as follows:

arara 4.0 (revision 1)
Copyright (c) 2012-2018, Paulo Roberto Massa Cereda
Orl them rights are reserved, ole partner

usage: arara [file [--dry-run] [--log] [--verbose | --silent] [--timeout
N] [--max-loops N] [--language L] [ --preamble P ] [--header]
| --help | --version]
-h,--help          wuh, cor blast me, my bewty, but that'll tell
me to dew jist what I'm dewun rite now
-H,--header        wuh, my bewty, that'll only peek at directives
what are in the file header
-l,--log           that'll make a log file wi' orl my know dew
suffin go wrong
-L,--language      that'll tell me what language to mardle in
-m,--max-loops     wuh, yew dunt want me to run on forever, dew
you, so use this to say when you want me to
stop
-n,--dry-run       that'll look like I'm dewun suffin, but I ent
-p,--preamble      dew yew git hold o' that preamble from the
configuration file
-s,--silent        that'll make them system commands clam up and
not run on about what's dewin
-t,--timeout       wuh, yew dunt want them system commands to run
on forever dew suffin' go wrong, dew you, so
use this to set the execution timeout (thass in
milliseconds)
-V,--version       dew yew use this dew you want my know abowt
this version
-v,--verbose       thass dew you want ter system commands to hav'
a mardle wi'yew an'orl


For comparison, the default English setting produces:

For those who can’t see the image, the transcript is as follows:

arara 4.0 (revision 1)
Copyright (c) 2012-2018, Paulo Roberto Massa Cereda

usage: arara [file [--dry-run] [--log] [--verbose | --silent] [--timeout
N] [--max-loops N] [--language L] [ --preamble P ] [--header]
| --help | --version]
-h,--help          print the help message
-l,--log           generate a log output
-L,--language      set the application language
-m,--max-loops     set the maximum number of loops
-n,--dry-run       go through all the motions of running a
command, but with no actual calls
-p,--preamble      set the file preamble based on the
configuration file
-s,--silent        hide the command output
-t,--timeout       set the execution timeout (in milliseconds)
-V,--version       print the application version
-v,--verbose       print the command output


In case you’re wondering why Broad Norfolk was included, Paulo originally asked me if I could add a slang version of English as an Easter egg, but I decided to take advantage of this request and introduce Broad Norfolk to the international TeX community as it’s been sadly misrepresented in film and television, much to the annoyance of those who speak it. As far as we know, it’s the only application that includes Broad Norfolk localisation support. (If you know of any other, please say!)

Having decided to add Broad Norfolk, we needed to consider what code to use. The ISO 3166-1 set includes a sub-set of user-assigned codes provided for non-standard territories for in-house application use. These codes are AA, QM to QZ, XA to XZ, and ZZ. I chose ‘QN’ and decided it’s an abbreviation for Queen’s Norfolk, as the Queen has a home in Norfolk.

## Turbot the Witch

[Previously posted on Goodreads 2018-04-29.] I had an interesting encounter with a couple of children as I was heading back into the village after walking around the muddy footpaths and byways around the area. (This is not only setting the scenic background detail, but also noting that I might’ve had a slightly dishevelled and windswept appearance as a result.) In general, I find it a bit awkward when unknown children want to strike up a conversation as on the one hand I don’t want to encourage them to talk to strangers, but on the other hand I don’t want to appear rude, so when they called out a friendly greeting, I gave a friendly acknowledgement without breaking my stride, but the girl called me back.

‘Hello, whoever you are. Who are you?’ she asked.

‘I live in the village,’ I replied, non-committally. Since she seemed to require more detail, I added: ‘My son used to go to the village school.’

(I don’t think I ought to disclose names in a public post, so let’s just stick with So-and-so.)

‘No,’ I said. ‘My son’s grown up and has left school now.’

‘Are you So-and-so’s granny?’

‘No.’

So-and-so’s granny is 68.’

‘I’m not that old,’ I said. ‘I’m not even 50.’

‘Are you 49?’ the boy asked.

I could see that this was going to lead to a guessing game, and he was only two off, so I decided to just cut straight in there with the answer.

‘No, I’m 47.’

‘I hope you don’t mind me saying this,’ the boy said, in a very polite tone of voice, ‘but you look much older.’

‘Are you a witch?’ the girl asked.

‘No,’ I said, ‘but if I was a witch, I might not admit it.’

I’m not sure if they grasped the sub-text there: people aren’t always what they claim to be (or not be).

‘Do you know So-and-so?’ the girl asked, reverting the subject back to whoever he is, but apparently he’s a boy in their school.

‘No, I don’t know So-and-so, and I think you should be careful about talking to strangers.’

‘Are you a stranger? What’s your name?’

‘I have two names,’ I replied. ‘My real name is Nicola Cawley, but my writing name is Talbot.’

‘Turbot?’

‘No, Talbot.’

Clearly, they haven’t yet heard of a local village author of children’s stories that are charmingly illustrated by a talented artist from nearby Poringland.

‘If you’re a witch,’ the girl said, ‘you could turn me into a dog.’

‘Witches don’t exist,’ the boy said.

‘Well, either I’m not a witch or I don’t exist,’ I replied.

All those years studying mathematics haven’t been wasted. I can still apply logical reasoning in a conversation with kids. As I finally walked away, a voice called after me:

‘Goodbye, Whatever-your-name-is Turbot.’

So now I feel that Turbot the Witch has to appear in a story. Perhaps she should join Sir Quackalot, Dickie Duck, José Arara and friends. Sir Quackalot, for those of you who don’t know, started life in the TeX.SE chatroom in a little story containing TeX-related jokes to amuse my friend Paulo who likes ducks and is the creator of an application called arara, which means macaw in Portuguese. The story was called ‘Sir Quackalot and the Golden Arara.’ The image of Sir Quackalot on the left is created using the tikzducks package. The code is:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{tikzducks}

\begin{document}
\begin{tikzpicture}
\begin{scope}[rotate=-15,shift={(-0.5,0.2)}]
\draw[fill=black!40]
(1,0.5) -- (0.2,0.5) -- (0, 0.55) -- (0.2,0.6) -- (1, 0.6) -- cycle;
\end{scope}
\duck[cape=darkgray,shorthair=darkgray]
\begin{scope}[rotate=-20,shift={(.25,0.25)}]
\draw[fill=black!50]
(0,1) .. controls (0.05, 0.57) and (0.23, 0.23) .. (0.5, 0)
.. controls (0.77, 0.23) and (0.95, 0.57) .. (1, 1)
.. controls (0.83, 0.9) and (0.67, 0.9) .. (0.5, 1)
.. controls (0.33, 0.9) and (0.07, 0.9) .. cycle;
\node[orange,at={(0.5,0.5)}] {\bfseries\large Q};
\end{scope}
\end{tikzpicture}
\end{document}


Sir Quackalot next made an appearance in LaTeX for Administrative Work as the author of titles such as ‘The Adventures of Duck and Goose’, ‘The Return of Duck and Goose’ and ‘More Fun with Duck and Goose’ in one of the sample datasets that accompanies the textbook. The more adventurous reader can, in Exercise 12 (Chapter 4), try to programmatically fetch the titles from the database to typeset an invoice for José Arara’s book order.

The sample data also includes a list of people, such as Dickie Duck, Polly Parrot, Mabel Canary and (to test UTF-8 support) José Arara of São Paulo. At various times in the textbook, they are customers (as in the above invoice exercise), letter recipients (Chapter 3, typesetting correspondence), job applicants (Chapter 5, typesetting a CV), and members of the Secret Lab of Experimental Stuff (and their co-researchers in the Department of Stripy Confectioners) who have to write memos, press releases, and minutes. They also have to redact classified information, use hierarchical numbering in their terms and conditions, prepare presentations, a z-fold leaflet advertising their highly classified projects, and collaborate on documents.

Dickie Duck also moonlights as the author of ‘Oh No! The Chickens have Escaped!’ illustrated by José Arara, whose paintings bear an uncanny resemblance to digitally manipulated photos of my mum’s chickens. In Chapter 10, they have to create a postcard and design an advance information sheet to advertise the book.

Sir Quackalot reappears in my testidx package, which is designed for testing indexing applications with LaTeX. My original plan was to use dummy text, but I’ve grown bored of lorem ipsum and I wanted the first few paragraphs to be informative. I also needed the index to cover the full Basic Latin letter groups A, …, Z as well as some extended Latin characters commonly used in European languages, such as Ð (eth), Þ (thorn) and Ø. After five pages of filler text, I discovered that some of the letter groups were still missing, so I added the story of ‘Sir Quackalot and the Golden Arara’, which provided an extra page of text and conveniently helped with the rather sparse Q letter group. The code to produce the document is quite simple:

\documentclass{article}

\usepackage{imakeidx}
\usepackage{testidx}
\makeindex

\begin{document}
\testidx
\printindex
\end{document}


For those who don’t have a TeX distribution, here’s a PDF I made earlier. That example only has the Basic Latin groups. There’s a fancier example with hyperlinks, extended letter groups, digraphs (IJ, Ll, etc) and a trigraph (Dzs): source code and the final PDF created from it (using XeLaTeX and bib2gls).

So if you read my textbooks or manuals, watch out for a cameo from Turbot the Witch. What does she look like? I think tikzducks can supply the answer again:

\documentclass{article}

\usepackage{tikzducks}

\begin{document}
\begin{tikzpicture}
\duck[witch=black!70,longhair=brown!60!gray,jacket=black!70,magicwand]
\end{tikzpicture}