[texhax] scrambled text

Paul Isambert zappathustra at free.fr
Sun Aug 26 14:55:49 CEST 2012


Reinhard Kotucha <reinhard.kotucha at web.de> a écrit:
> 
> On 2012-08-26 at 08:46:26 +0800, Daniel Greenhoe wrote:
> 
>  > Hi Paul,
>  > 
>  > Thank you for the source code. I use XeLaTeX and I tried your "Code
>  > 1". But it said that
>  >   \pdfuniformdeviate
>  > was undefined. Is \pdfuniformdeviate only defined in PDFTex? Is there
>  > some workaround for XeTeX?
> 
> XeTeX is based on Knuth's TeX and thus doesn't inherit pdfTeX
> extensions.    
> 
> Maybe you can use Donald Arseneau's random.tex package instead of
> \pdfuniformdeviate.

Indeed you can "\input random.tex" at the beginning of your document and
replace \extractletters in my original code with this new definition:

    \def\extractletters#1{%
      \def\rest{}%
      \ifnum\letters>1
        \setrannum{\random}{1}{\letters}%
        \advance\letters-1 \scratch=1
        \getletter#1\endofword%
      \else
        #1%
      \fi
      }

Best,
Paul



More information about the texhax mailing list