summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/randtext/randtext-doc.tex
blob: 384d7fac7dc752f345b3a156c74a70e3485d2e23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
\documentclass[pagesize=auto, parskip=half]{scrartcl}

\usepackage{fixltx2e}
\usepackage{etex}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{microtype}
\usepackage{hyperref}

\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
\makeatletter
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
\makeatother
\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}

\addtokomafont{title}{\rmfamily}

\title{The \pkg{randtext} package\thanks{This manual corresponds to \pkg{randtext.sty}, dated~2004/12/20.}}
\author{Charles Duan}
\date{2004/12/20}


\begin{document}

\maketitle

Provides one useful macro, \cmd{\randomize}\marg{text}. Result is a typeset box that
looks, on paper, like \meta{text}, but whose letters have in fact been placed in
random order so that they are not copiable from the file directly.

In other words, typing:
%
\begin{verbatim}
  This is a \randomize{random-text} test.
\end{verbatim}
%
would produce output that looks like:
%
\begin{quote}
  This is a random-text test.
\end{quote}
%
but if you tried to copy-paste it from the output file, you would probably get
%
\begin{quote}
  This is a mdoxt-etnra test.
\end{quote}
%
The function of this odd macro is to obfuscate e-mail addresses, say on a PDF
document put online, so that the human reader sees the address as expected,
but e-mail address harvesters and spambots cannot determine the address. Since
this macro is done entirely using \TeX\ typesetting commands, it requires no
external image generation or anything, and the typeset result is just as
high-quality as if no obfuscation had taken place.

This macro does take into account kerning between character pairs, but it does
not account for ligatures. To make appropriate ligatures, surround the
ligature characters with braces.

This package supersedes \pkg{switcheml.sty}, written by the same author. (That is
the reason that the internal macros begin with \verb+se@+.

Requires the file \texttt{random.tex}, by Donald Arseneau. I believe that this file
comes as part of a standard \TeX\ distribution.

\end{document}