How to place a different background image on each part of a book
-
Do you know if it is possible to place a background image on each \part{} of a book? Ideally, for each part I would like to be able to put a different background image. Currently, I am using the following commands to create the a background image in a latex document, but I cannot think of a way to use on the page of \part{}. Definitions: \usepackage{eso-pic} \newcommand\BackgroundPic{% \put(0,0){% \parbox[b][\paperheight]{\paperwidth}{% \vfill \centering \includegraphics[width=\paperwidth,height=\paperheight,% keepaspectratio]{background.pdf}% \vfill }}} Usage: \AddToShipoutPicture*{\BackgroundPic} \ClearShipoutPicture
-
Answer:
The following provides \partimage[<options>]{<image>} that places <image> as a full-page spread on a \part page. You can adjust any of the options passed to http://ctan.org/pkg/graphicx using the optional <options> argument. The default sets the image at full page height/width, anchored at the bottom-left of the page. \documentclass{book} \usepackage{graphicx,eso-pic,lipsum,etoolbox} \providecommand{\parthook}{} \patchcmd{\part}{\thispagestyle}{\parthook\thispagestyle}{}{} \newcommand{\partimage}[2][]{% \parthook[<options>]{<image>} \renewcommand{\parthook}{% Update \parthook \AddToShipoutPictureBG*{% Add picture to background of THIS page only \AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight,#1]{#2}}}% Insert image \renewcommand{\parthook}{}}}% Restore \parthook \begin{document} \partimage{example-image-a} \part{First part} \lipsum[1-20] \partimage[keepaspectratio]{example-image-b} \part{Second part} \lipsum[1-20] \end{document} For optimal management of image properties, you can consider adding \usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox to your preamble, which would allow you to add more options to the image inclusion <options>.
Dion_E at TeX - LaTeX Visit the source
Related Q & A:
- How To Connect Two Different Network Segments Using A Switch And A Router?Best solution by Super User
- How do I put in a different background in my Blogger blog?Best solution by helplogger.blogspot.com
- How do you change the background image on Myspace 2.0?Best solution by Yahoo! Answers
- How do I add a custom background image to my Tumblr?Best solution by Yahoo! Answers
- How to set a stationary background for my outgoing email?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.