Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

On a related note to How do I make my document look like it was written by an Cthulhu worshipping madman?, I want to create a LaTeX command that blurs the text so it's unreadable.

Unfortunately, whatever I google to get ideas on how to do this, I find forum posts from everyone and his aunt having problems with the fonts being blurry. Nothing about how to get there...

share|improve this question
    
Extra points: make it unsearchable/uncopyable. –  Andrestand Sep 16 at 11:29

1 Answer 1

up vote 45 down vote accepted

Using a variation of the technique Dissecting paragraphs with \lastbox described in Section 5.9.6 of TeX by Topic, you can produce a blur effect; the idea is to use two copies for each line and typeset the line and its copies superimposed:

\documentclass{article}
\usepackage{lipsum}

\newbox\flinebox 
\newbox\slinebox
\newbox\mlinebox
\def\duplines{\setlength\parindent{0pt}
  \setbox\flinebox\lastbox
  \ifvoid\flinebox\relax
  \else
  \setbox\slinebox\hbox{\copy\flinebox}
  \setbox\mlinebox\hbox{\copy\flinebox}
  \unskip\unpenalty
  {\duplines}
  \box\flinebox\vspace*{-2.3ex}
  \box\mlinebox\vspace*{-2.3ex}
  \box\slinebox \fi
}

\newcommand\BlurText[1]{%
  \vbox{#1\par\duplines}}

\begin{document}

\BlurText{\lipsum[1]}

\end{document}

enter image description here

In a comment, doncherry suggested horizontally shifting the layers to decrease legibility; this can be done using this definition of \duplines:

\def\duplines{\setlength\parindent{0pt}
  \setbox\flinebox\lastbox
  \ifvoid\flinebox\relax
  \else
  \setbox\slinebox\hbox{\copy\flinebox}
  \setbox\mlinebox\hbox{\copy\flinebox}
  \unskip\unpenalty
  {\duplines}
  \box\flinebox\vspace*{-2.4ex}
  \makebox[\textwidth]{\hspace*{2pt}\box\mlinebox}\vspace*{-2.4ex}
  \makebox[\textwidth]{\hspace*{4pt}\box\slinebox}\fi
}

and defining \BlurText as before, here's the new result of \BlurText{\lipsum[1]}:

enter image description here

And a little modification using some color:

\usepackage{xcolor}

and in \duplines:

  {\color{black!50}\box\flinebox\vspace*{-2.4ex}
  \makebox[\textwidth]{\hspace*{2pt}\box\mlinebox}\vspace*{-2.4ex}
  \makebox[\textwidth]{\hspace*{4pt}\box\slinebox}}

enter image description here

share|improve this answer
4  
Note: Some packages use similar technique to get fake bold font. e.g. \pmb from amsbsy and \CJKbold from CJK. –  Leo Liu Nov 29 '11 at 18:35
25  
That should carry a health warning! –  Loop Space Nov 29 '11 at 18:39
17  
Any Cthulu worshiping madman would be proud of this document. –  doncherry Nov 29 '11 at 18:47
16  
I can still read this just fine, but I do worship Chutulu regularly.. –  N3buchadnezzar Nov 29 '11 at 20:26
13  
@Gonzalo: Is it possible to shift one or two layers of text horizontally as well? This might decrease legibility further. (What a thing to say in a TeX community ... :) –  doncherry Nov 29 '11 at 20:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.