As a follow-up to my comment, a follow-up that doesn’t fit into a comment, after experimenting and taking a closer and more caffeinated look at the documentation, I finally have the randomchars
function of chickenize
working. However, it seems less useful for present purposes than I expected. Here’s an example of usage:
\documentclass[12pt,a5paper]{book}
% Put chickenize after fontspec, not before, or compilation fails:
\usepackage{fontspec,chickenize,xcolor}
\directlua{luatexbase.add_to_callback("post_linebreak_filter",randomchars,"chickenize")}
\begin{document}
\chapter*{Down the Rabbit-Hole}
Alice was beginning to get very tired of sitting by her sister on the
bank, and of having nothing to do. Once or twice she had peeped into
the book her sister was reading, but it had no pictures or
conversations in it, “and what is the use of a book,” thought Alice,
“without pictures or conversations?”
So she was considering in her own mind (as well as she could, for the
day made her feel very sleepy and stupid), whether the pleasure of
making a daisy-chain would be worth the trouble of getting up and
picking the daisies, when suddenly \textit{a White Rabbit with
\textcolor{red!80}{pink eyes}} ran close by her.
There was nothing so \textsc{very} remarkable in that; nor did Alice
think it so \textsc{very} much out of the way to hear the Rabbit say
to itself, ‘Oh dear! Oh dear! I shall be late!’ (when she thought it
over afterwards, it occurred to her that she ought to have wondered at
this, but at the time it all seemed quite natural); but when the
Rabbit actually \textsc{took a watch out of its waistcoat-pocket,} and
looked at it, and then hurried on, Alice started to her feet, for it
flashed across her mind that she had never before seen a rabbit with
either a waistcoat-pocket, or a watch to take out of it, and burning
with curiosity, she ran across the field after it, and fortunately was
just in time to see it pop down a large rabbit-hole under the hedge.
\end{document}

Notice that the output respects \textit{...}
, \textbf{...}
, and \textcolor{...}
, but not \textsc{...}
. Also, the result is not justified and it contains many more capitals and symbols than would ordinarily appear in text. That makes it less helpful than I’d hoped for judging the shape and typographic color of a layout. Possibly someone who’s very much at home with lua
could creaate a similar function that draws its substitute characters from those most likely to appear in the language of the text?
\cite{<some key>}
, for example? Or\printbibliography
? What about\includegraphics{}
or diagrams? Moreover, replacing the text will also affect the line and page breaks. Even if you replace letter-by-letter, it will change the breaks because characters have different widths and gibberish words will not be hyphenated. It isn't clear what 'more-or-less the same format' means? How much of the more do you need and how much of the less?\section{...}
), and some others\includegraphics
do not have content or cannot be changed easily. at worst we can make that all command are left intact, and only top level text could be changed. Yes, hyphenation would not be the same but that is part of the "more or less".randomchars
function ofchickenize
, but I can’t get it working. Has anyone had luck with it?