Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

flip cartoon in latex?

77 views
Skip to first unread message

Fred Nugen

unread,
Aug 30, 2007, 5:57:05 PM8/30/07
to
Hello,

I'm writing my thesis, which involves creation of a simulation
that outputs, among other things, animations. You know, the kind
of thing people throw in all their powerpoint presentations these
days. I'd like to include one of these animations in my thesis as
a flip cartoon--like a http://en.wikipedia.org/wiki/Flip_book,
except that the images will only take up a corner of the page.

Any ideas how to accomplish this?
I'm using LyX to produce latex.
But I'll take whatever ideas you have.


Problem Statement:

Suppose I have a collection of square images, 2" by 2", named
image-01.eps through image-30.eps. And I want one image to
appear in the top left corner of each ODD page (remember, the
thesis will be bound) starting from page 15. I want the text
to flow around it, and other figures to find other places to
live. The flip cartoon images
* MUST be in exactly the same place on every ODD page,
* MUST be in order, and not skip any pages,
* take precedence over positioning of other floats.
I am willing to place all other floats manually, if necessary.

Should I put them in the header? How do I manage to have the
text flow around it? Can I push it into the margin?

- Fred

Laurence Finston

unread,
Aug 30, 2007, 6:21:07 PM8/30/07
to
On 30 Aug., 23:57, Fred Nugen <a...@asdf.com> wrote:
> I'm writing my thesis, which involves creation of a simulation
> that outputs, among other things, animations.

My favorite subject!

> You know, the kind
> of thing people throw in all their powerpoint presentations these
> days. I'd like to include one of these animations in my thesis as

> a flip cartoon--like ahttp://en.wikipedia.org/wiki/Flip_book,


> except that the images will only take up a corner of the page.

Great idea!

> Any ideas how to accomplish this?
> I'm using LyX to produce latex.
> But I'll take whatever ideas you have.
>
> Problem Statement:
>
> Suppose I have a collection of square images, 2" by 2", named
> image-01.eps through image-30.eps. And I want one image to
> appear in the top left corner of each ODD page (remember, the
> thesis will be bound) starting from page 15. I want the text
> to flow around it, and other figures to find other places to
> live. The flip cartoon images
> * MUST be in exactly the same place on every ODD page,
> * MUST be in order, and not skip any pages,
> * take precedence over positioning of other floats.
> I am willing to place all other floats manually, if necessary.
>
> Should I put them in the header? How do I manage to have the
> text flow around it? Can I push it into the margin?

This problem shouldn't be too difficult to solve. I'm not a LaTeX
user, so it's possible that there's already a solution for this
problem in some LaTeX package or other. If not, I suggest using a
format based on plain TeX, perhaps with eplain, and adapting the
output routine (`\output'). This isn't as scary as it sounds. This
may not work if text is meant to flow around it, since the position of
the image should be fixed, whereas the text depends on TeX's line and
page-breaking algorithms.

I don't it should be necessary to use insertions for them. You
already know what they are, their size, and where they're supposed to
go.

It's not what you're planning to do, but you might care to take a look
at this:
http://www.gnu.org/software/3dldf/flipbook.html

Here's an animated GIF with the little animation:
http://www.animationcorner.com/studio/displayimage.php?album=lastupby&cat=0&pos=13


Laurence Finston

unread,
Aug 30, 2007, 6:40:11 PM8/30/07
to
On 31 Aug., 00:21, Laurence Finston <lfins...@gwdg.de> wrote:
> On 30 Aug., 23:57, Fred Nugen <a...@asdf.com> wrote:

Sorry, I wasn't very specific. I would suggest not having the text
flow around it. I've seen other books using this technique (mostly
books about animation), and they don't have it. It makes the task
that much more difficult. You can easily put it in the margin. The
output routine makes boxes and fits them together. `\plainoutput' is
quite simple and easily modifiable. If you want a couple of examples,
I could dig them out for you, but Knuth has a whole chapter on the
subject in _The TeXbook_. It should be possible to use a `\count' to
access your images sequentially, based on the page number, or some
other number. Just increment them in the output routine.

Laurence

Kjell Magne Fauske

unread,
Aug 31, 2007, 2:24:26 AM8/31/07
to
On Aug 30, 11:57 pm, Fred Nugen <a...@asdf.com> wrote:
> Hello,
>
> I'm writing my thesis, which involves creation of a simulation
> that outputs, among other things, animations. You know, the kind
> of thing people throw in all their powerpoint presentations these
> days. I'd like to include one of these animations in my thesis as
> a flip cartoon--like ahttp://en.wikipedia.org/wiki/Flip_book,

> except that the images will only take up a corner of the page.
>
> Any ideas how to accomplish this?
> I'm using LyX to produce latex.
> But I'll take whatever ideas you have.
>
> Problem Statement:
>
> Suppose I have a collection of square images, 2" by 2", named
> image-01.eps through image-30.eps. And I want one image to
> appear in the top left corner of each ODD page (remember, the
> thesis will be bound) starting from page 15. I want the text
> to flow around it, and other figures to find other places to
> live. The flip cartoon images
> * MUST be in exactly the same place on every ODD page,
> * MUST be in order, and not skip any pages,
> * take precedence over positioning of other floats.
> I am willing to place all other floats manually, if necessary.
>
> Should I put them in the header? How do I manage to have the
> text flow around it? Can I push it into the margin?
>
> - Fred

The documentation for the fancyhdr[1] package, section 20, has an
example on how to create a flipbook movie:

---
\rfoot{\setlength{\unitlength}{1mm}
\begin{picture}(0,0)
\put(5,0){\includegraphics{pic\thepage.ps}}
\end{picture}}
---

Maybe you can use this approach.

- Kjell Magne Fauske

[1] http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html

Juan Antonio Navarro

unread,
Aug 31, 2007, 3:21:05 AM8/31/07
to
On Aug 30, 10:57 pm, Fred Nugen <a...@asdf.com> wrote:
> Hello,
>
> I'm writing my thesis, which involves creation of a simulation
> that outputs, among other things, animations. You know, the kind
> of thing people throw in all their powerpoint presentations these
> days. I'd like to include one of these animations in my thesis as
> a flip cartoon--like ahttp://en.wikipedia.org/wiki/Flip_book,

> except that the images will only take up a corner of the page.

I'm so jealous. I wish I had a good excuse to have a flip book in my
thesis.

William F. Adams

unread,
Aug 31, 2007, 8:55:12 AM8/31/07
to
On Aug 30, 5:57 pm, Fred Nugen <a...@asdf.com> wrote:
> Hello,
>
> I'm writing my thesis, which involves creation of a simulation
> that outputs, among other things, animations. You know, the kind
> of thing people throw in all their powerpoint presentations these
> days. I'd like to include one of these animations in my thesis as
> a flip cartoon--like ahttp://en.wikipedia.org/wiki/Flip_book,

> except that the images will only take up a corner of the page.
>
> Any ideas how to accomplish this?
> I'm using LyX to produce latex.
> But I'll take whatever ideas you have.
>
> Problem Statement:
>
> Suppose I have a collection of square images, 2" by 2", named
> image-01.eps through image-30.eps. And I want one image to
> appear in the top left corner of each ODD page (remember, the
> thesis will be bound) starting from page 15. I want the text
> to flow around it, and other figures to find other places to
> live. The flip cartoon images
> * MUST be in exactly the same place on every ODD page,
> * MUST be in order, and not skip any pages,
> * take precedence over positioning of other floats.
> I am willing to place all other floats manually, if necessary.
>
> Should I put them in the header? How do I manage to have the
> text flow around it? Can I push it into the margin?

I did this in my TUG2003 presentation:

http://www.tug.org/TUGboat/Articles/tb24-2/tb77adams.pdf

by hand, inserting the figures as appropriate to make it work.

Laurence's idea of actually putting them in the margin
programmatically is much more practicable though and is what I'd
suggest doing.

William


Laurence Finston

unread,
Aug 31, 2007, 5:03:41 PM8/31/07
to
On 31 Aug., 00:40, Laurence Finston <lfins...@gwdg.de> wrote:
> On 31 Aug., 00:21, Laurence Finston <lfins...@gwdg.de> wrote:
>
> > On 30 Aug., 23:57, Fred Nugen <a...@asdf.com> wrote:
>
> I would suggest not having the text
> flow around it.

Again, I wasn't specific. You can get text to flow around an image by
using `\hangindent' and `\hangafter', or more generally, using `
\parshape'. There is a way of getting "holes" in text, but it's
trickier. Knuth wrote an article about it which was reprinted in the
volume _Digital Typography_. It was called "Problem for a Sunday
Afternoon", or something similar. Can't remember how it worked, but
it was complicated.

The problem with `\parshape' is that you would need to know which
lines need to be shortened and you can't know this if you're letting
TeX break the lines and pages. You could get it to work by breaking
the pages and the lines on the part of the page where the image goes
by hand. You would need at least one pass to figure out where this
should be. For more than a few pages, I think this would be too much
work with too little benefit (if any). However, that's how it could
be done. I don't think there's a clever way of doing it, but someone
may well prove me wrong.

Laurence

Jellby

unread,
Sep 2, 2007, 5:45:34 AM9/2/07
to
Among other things, Fred Nugen saw fit to write:

> I'm writing my thesis, which involves creation of a simulation
> that outputs, among other things, animations. You know, the kind
> of thing people throw in all their powerpoint presentations these
> days. I'd like to include one of these animations in my thesis as
> a flip cartoon--like a http://en.wikipedia.org/wiki/Flip_book,
> except that the images will only take up a corner of the page.

Just a word of warning. The printing process might not be very accurate and
you might end up with the frames sort of jumping around during the
"animation", which is not very nice.

I would consider providing movies in a CD (on of those small ones) instead.

--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com

Laurence Finston

unread,
Sep 2, 2007, 7:18:19 AM9/2/07
to
On 2 Sep., 11:45, Jellby <m...@privacy.net> wrote:

> Just a word of warning. The printing process might not be very accurate and
> you might end up with the frames sort of jumping around during the
> "animation", which is not very nice.
>
> I would consider providing movies in a CD (on of those small ones) instead.

While you are right, I wouldn't worry about it too much. On a good
printer, it should be a millimeter or so at most. The eye and brain
will compensate for slight errors in registration. It's somewhat akin
to people wanting to be fooled by a magic trick. Animators flip
stacks of animation drawings by hand, and one gets a good sense of the
movement even though one can hardly say that there's any registration
at all.

If you want to test, it you could print out one of the PDF files I
have on the GNU 3DLDF website and see if it looks all right. You
might not want to print out all of the pages of one of the long ones.
If you feel ambitious, you could make the image smaller and put it in
the lower right-hand margin.

Here's an example:
http://www.gnu.org/software/3dldf/graphics/braik_03.pdf

Here's the web page with the 3DLDF and TeX code, and the PostScript
version of the output:
http://www.gnu.org/software/3dldf/conicsct.html#Braikenridge

If you hunt around the other web pages, there are some more files with
motion sequences.

You'll see that I use a frame for the registration. If you use
MetaPost, I strongly recommend doing this, otherwise it will either
not work at all, or you'll have jitter. You can draw the frame in the
background color; it needn't be visible, it just needs to exist.

Laurence


Laurence

Fred Nugen

unread,
Sep 4, 2007, 3:10:37 PM9/4/07
to
I agree with both of you. I'm just going to try it, using
one of the methods suggested above. The biggest question I
have is how to get it approved by the thesis layout standards
committee. And if it flops, I guess you can call me a "flip-flop"!

Thanks for the suggestions.
- Fred

Fred Nugen

unread,
Sep 4, 2007, 3:19:25 PM9/4/07
to
I like your idea of modifying the \output routine.
That's really what is going on here. I may need to
do this if I'm not allowed to put anything in the
margin. (The fancyhdr solution below works as
advertised.)

But I can't bring myself to use \parshape.
\parshaping more than one page makes me cry.

- Fred

Fred Nugen

unread,
Sep 4, 2007, 3:30:06 PM9/4/07
to
Thank you, this works as advertised, even in LyX!

I think it will be my initial solution. It does not
allow the text to flow around the image (which is
in the footer), but maneuvering the margins and
keeping the image small should suffice.

- Fred


For other LyX users' reference:

This

\usepackage{fancyhdr}
\pagestyle{fancy}

goes under Document -> Settings... -> LaTeX Preamble
and the \rfoot code below goes in the document,
where the flipbook should start, in an ERT box.

Fred Nugen

unread,
Sep 4, 2007, 3:39:10 PM9/4/07
to
Wow, that is a fantastic article!
Computerizing a handwritten font well
is very hard to do.

- Fred

Fred Nugen

unread,
Sep 4, 2007, 3:37:20 PM9/4/07
to
> I'm so jealous. I wish I had a good excuse to have a flip book in my
> thesis.

I bet that you could come up with one! Surely there is something
about your topic that involves change in some way--
changing conditions, changing relationships, or maybe
coordination between two seemingly different subjects.

Find a way to represent your initial situation with a picture,
and I think you will find that it is not hard to represent the
change by slowly modifying the initial picture.

And the more rare pictorial analogies are in your field, the more
interesting it will be to see one!

- Fred

Robin Fairbairns

unread,
Sep 5, 2007, 5:53:46 AM9/5/07
to
Fred Nugen <as...@asdf.com> writes:
>The biggest question I
>have is how to get it approved by the thesis layout standards
>committee.

amazing. a committee to waste their own time deciding what theses
should look like. some people don't have enough work to do...

>And if it flops, I guess you can call me a "flip-flop"!

groan.
--
Robin Fairbairns, Cambridge

0 new messages