# How to embed image in the whitespace between words

I would like to have an image 'embedded' in a page within my document, but done so with the whitespace between words.

Ultimately I would like to have a moving image if you flick through the pages.

I am surprised by the absolute nothing that I have come up with!! A solution involving a monochrome image would be ideal.

Just a little something for my avid fans 8)

• what do you mean by "done so with the whitespace between words" ? one\rlap{\includegraphics{picture}} two will typeset one two as normal with the image somewhere between the two words, is that what you mean? – David Carlisle May 12 '14 at 9:51
• Do you mean you want the whitespace to 'make a picture'? Or that you want to place a picture behind the page? Or something else? I don't see how the first could be possible. The second might be if you filled in the background behind the text of words to cover the picture, I guess. ... – cfr May 13 '14 at 2:42
• Let me check if I got you right. You want some way to specify an arbitrary B/W image (array of white and black pixels), and an arbitrary amount of text (for example, generated via lorem ipsum, or written by you), and an automatic algorithm which adjusts the spaces among the words of the text so that, when you look at the page (from far or squinting), you can see the image? You know that, if that were possible, it had to broke completely TeX's paragraph-formatting and line-breaking algorithm, dont you? – JLDiaz May 15 '14 at 7:43
• Not quite the inverse, as the text would still fill in the space. So as JLDiaz says, its a hidden image you can see if you squint at the page or look at sideways. Online forums will help you 'get rid of rivers of white-space'. What we want to do here is create rivers of white space that make an image 'hidden' on the page. This could also be done manually, if there was a way of overriding the automatic spacing on one page and adding spaces to generate the image. We want it obvious but not too obvious- there is a challenge amongst the labmates to add a 'hidden' penis to our theses. – SpmP May 16 '14 at 0:33
• @SpmP Thank you for the clarification. The key word was "rivers". You want the image to me formed by the rivers between normal words – Steven B. Segletes May 18 '14 at 0:28

Having taken a bit of Q&A to understand your intent, I post this "answer" both to clarify for other readers what I believe the intent of your question to be, plus to assert that I think it cannot be done with any success. In my MWE, I try to place a simple circle in the rivers of text. To help show that circle to the readers, I present again the result with the rivers of whitespace replaced with red dashes. So why don't I think it feasible?

1) In my MWE, the rivers are exaggerated with multiple spaces, yet still are virtually impossible to discern, even when highlighted with red dashes. To accomplish it without such flagrant exaggeration is infinitely more difficult;

2) While whitespace rivers can be a distraction, I've never heard it asserted that they could be the focus of one's observation;

3) the "pixel resolution" of whitespace is so coarse, that even over the course of full page, the resolution is not great enough to represent an image in the white space as anything other than an unresolved blob, in my opinion.

But by all means, someone please prove me wrong.

\documentclass{article}
\usepackage{verbatimbox}
\usepackage{xcolor}
\begin{document}
\let\svdash-
\catcode-=\active
\def\coloron{\def-{\textcolor{red}{\svdash}}}
\begin{verbnobox}[\rmfamily\coloron]
Here is our goal.  It is a test.  What
we are trying     to see is whether or
if an    image can arise   in
the    rivers of  this text.   That
is   to say,  can one see the    circle
that   is formed  in large    rivers of
my pic?    Maybe if you    squint, one
can just make        it out. Barely.
Then again, maybe not.
~
Below, the relevant rivers are replaced with dashes
~
Here is our goal.  It is a test.  What
we are trying-----to see is whether or
if an----image can arise---in
the----rivers of  this text.---That
is---to say,  can one see the----circle
that---is formed  in large----rivers of
my pic?----Maybe if you----squint, one
can just make--------it out. Barely.
Then again, maybe not.
\end{verbnobox}
\end{document}


If you really wanted to embed a hidden image, and I suggest a more mature message than that contemplated by your labmate "friends", there are much easier ways:

\documentclass{article}
\usepackage{stackengine,xcolor, graphicx}
\begin{document}
Where is the hidden image%
\stackinset{c}{-.2pt}{b}{.3pt}{\scalebox{0.02}{\textcolor{white}{Hi, mom}}}{?}
\end{document}


• Even if it could be done, I think that it ought not be. However, if it could be, it would be so since it ought not be, I'm glad it can't. – cfr May 18 '14 at 1:26
• FAntastic! closest yet 8) Is there any way of automatically maintaining the right hand justification? Sorry for the late reply, been v sick 8( – SpmP May 20 '14 at 8:56
• @SpmP I am not sure I understand your question. What is being right-hand justified with respect to what? Are you talking about my first image, or my second? The first image, being a verbatim environment, cannot maintain justification. – Steven B. Segletes May 20 '14 at 9:52
• I am talking about your first page. I am talking about margin to margin text, which I gather is in contradiction to a verbatim environment. I did it maually and it worked to some extent. Ode to joy, lets hope it satisfies her and her labmates. (see my answer, sorry, couldnt post images as a comment) – SpmP May 20 '14 at 10:31

It can mostly be done 8) manually adjusting right margin is a PITA and not very accurate, so for educational purposes here is the finished ouptut which both proves and disproves that this can be done and that it works 8)

  \documentclass{article}
\usepackage{verbatimbox}
\usepackage{xcolor}
\begin{document}
\begin{verbnobox}[\rmfamily]
target  of  a given  family’s toxin.   Many type II  TAs  target  translational  machinery,
which  is  highly  conserved  across  all domains of life  (Poole  and  Logan 2005;  Noller
2004).  DNA synthesis machinery, DNA polymerases  and  primases  are  less  conserved
(Poole  and  Logan  2005;  Leipe, Aravind,  and  Koonin 1999;  Werner  and  Grohmann
2011;  Aravind and  Koonin 2001).  Amongst type I  TAs, SymE,  which targets  mRNA
(Kawano,  Aravind,  and Storz  2007),  would  provide  an  interesting comparison to the
membrane proteins investigated within this thesis.

Clea   rly, neither toxi   n norantitoxin target  accounts  for  all  differences within  TA
syste   ms, because families w   ith the same target often contain loci that differ inability
to c   onfer a PSK effect on a    plasmid  (Szekeres et  al . 2007;  Christensen,  Maenhaut
Mich   el, et al. 2004; De Bast,    Mine, and  Van  Melderen  2008;  Wilbaux et al.  2007;
Fiebig    et al. 2010). Similarly, ty   pe I  and  III  RMs  are not  as mobile and have not
been sho   wn to induce PSK (Nadere   r et al.  2002;  O’Sullivan  et al.  2000;  Mruk and
Kobayashi 2014),    but have the same tar   get (DNA) as  type  II  RMs.  Other  factors
are also important for    PSK, including the le   vels at  which  the  toxin  and  antitoxin
are expressed, and the rate    at which the toxin and    antitoxin are degraded in the cell
after plasmid loss (Chapter 5).

TA systems rely on differential d   ecay of  the  toxin  and ant   itoxin  to  induce  PSK
(Chapter 5). Type II  systems  are ti   ghtly  regulated  by  protein     antitoxins,   which
interact with the toxin and act as transcr   iptional  repressors,  sensitive    to changes  in
stoichiometry (Mruk and Kobayashi 2014;    J. Zhang,  Y.  Zhang, and M. In   ouye 2003;
Kedzierska,  Lian,  and F.  Hayes  2007;    Cataudella, Sneppen, et al. 2013; Cata   udella,
Trusina,  et  al.  2012; Afif  et al. 2001).    I used  equations  of  logarithmic decay    as a
starting point for analyzing the condit   ions necessary for type  II  TAs to exhibit P   SK.
In particular, I analyzed the pop   ulation of toxin and antitoxin in the cell necessary    for
PSK given their respective half   -lives ( Chapter  5 ). Antitoxins  with similar stabil   ities
as their associated toxins cannot    be  expressed  in  numbers  significantly  higher    than
the toxin,  or  there  will  not be su   fficient free  toxin  to create a  PSK effect    within a
given time period.  Given the  inherent    noise of ge   ne  expression (Rase   r and  O’Shea
2005; C. V. Rao, D. M. Wolf, and Arkin 2002),    system   s relying    on stable antitoxins
risk  plasmid  suicide from  excess toxin  in  the cell     prior to  loss. Thus, there  is likely
to be an evolutionary trend toward TA systems with high expression levels of very
\end{verbnobox}
\end{document}
`

• Much to my chagrin, I see that my hypothesis has been proven wrong. – Steven B. Segletes May 20 '14 at 10:35
• It does and it doesn't it was a lot of manual work (for which I am sure all will be happy), but as far as making a flip book (ie moving whitespace picture) that would be... well.. very very tedious indeed. – SpmP May 20 '14 at 10:41