I would like to use three different background textures, alternating on all the pages of the document. I'm currently using the eso-pic package, which works great, but I'm having only one background texture for all the pages.
How can we tell LaTeX to use texture1 on page1, texture2 on page2, texture3 on page 3, then texture1 on page 4, texture2 on page 5, and so on ?
You could first call \ClearShipoutPicture and then \AddToShipoutPicture with the next texture. Either manually, or make a macro for it. For automatizing, that macro could go to a header or footer command.
Well, that's an "outer" approach. You could make an if-then choice within \AddToShipoutPicture{...} itself. Instead of the \put, decide which picture will be put, depending on the page number (modulo 3).
However, bevor you make such work, I recommend to think about if it's really necessary. I imagine it would be strange for me, always changing patterns, instead of some homogeneity. Even more, if it's not left/right alternating but in triples.
the idea with 3 (or 4) textures, is to give some subtle variety. The textures are old paper with dirts and scratches, and the project is for a personal travel journal, with text and pictures. I want to give the impression that each page is unique.
However, I may revert to a simpler idea : two textures only, one for the left page, and the second texture for the right page.
How this should be done, with the eso-pic package ? The documentation isn't very helpfull to me.
That's not an MWE. Please don't put together untested code, this is not compilable, there are errors, such as missing hyperref package and capitalization in \chapter. Please always make a test run before posting.
Sure, you need to find something for the "if". Either TeX' \isodd, or the ifthen package, or toolbox. Here's a way with the changepage package. I just used different sizes to see the changing picture without an actual image.
Hmm, now it's working, but there's a slight horizontal offset of the textures ; there's a white vertical band on the left part of all the pages. Why ? I used this (the textures should cover all the page, including the margins) :
In my code I used a percent sign % to comment out the following whitespace (line break, indentation in the code). Just do it the same, then you won't get that offset.