0

In a book I want to create a double-page photo spread, so when you open the book, the left half of the photo is on the left, and the right half is on the right. I want it to be as big as possible, so would like to eliminate both left/right margins, and the header and footer.

I tried the geometry package to eliminate margins, header, footer, but this inserted a \clearpage which added a blank page impossible to suppress. I want no blank pages on either side of the spread.

I decided instead I'll just eliminate the left and right margins, and leave the header and footer for now.

I tried \addtolength for the margins, but this does not work with the figure environment. The left hand margin default is still present to the left of each photo.

If I eliminate the figure environment, then the margins are eliminated, but the page does not break between left and right, and the right half of the photo prints over the left half. If I force a page break with \clearpage, then the page breaks but a much wider margin of around 4 cm is created to the left of each photo.

Minimum working example below.

How can I print the photo all the way to the left and right edges of both pages?

Edit: All photos will start at the top of the page. Unique trim: each photo needs to be cropped, and the aspect ratio is unique to each photo and different from the page. I'd like to do the cropping within LaTeX so that it is recorded and easily changeable, in case editors prefer a different crop, and I'm assuming trim can be used to crop the photo so that the aspect ratio fits that of the page. I'm flexible on captions, probably would prefer them at the bottom of either the preceding or following page so that the photo is as large as possible without any white space.

More on captions: if a photo's dimensions are such that the best crop results in white space at the bottom, then preferably the caption should be in the white space at the bottom, either on the left page or right page, but not both. Probably the right page would be preferable.

\documentclass{book}

\begin{document}
    
    \newpage
    
    \addtolength{\oddsidemargin}{-1in}
    \addtolength{\evensidemargin}{-1in}
    
    \begin{figure}
        \rule{1in}{1in}
    \end{figure}
    
    \clearpage
    
    \begin{figure}
        \rule{1in}{1in}
    \end{figure}
    
\end{document}
5
  • 1
    Welcome to TeX.SX! Please extend your code to a minimal working example (MWE).
    – dexteritas
    Commented Aug 16, 2023 at 16:37
  • 1
    Take a look at the TUGboat article by Herbert Voß: Controlling captions, fullpage and doublepage ŕoats: hvfloat Commented Aug 16, 2023 at 16:52
  • Thank you for the welcome! Minimum working example provided. Commented Aug 16, 2023 at 20:08
  • Thank you @barbarabeeton for the hvfloat suggestion. It looks like it would solve my problems, but I can't get it working. I will ask a second question with a MWE to troubleshoot the errors from hvfloat. Commented Aug 17, 2023 at 23:03
  • There was a talk at the recent TUG 2023 meeting entitled "Architectural guides for Bonn — book production with ConTeXt" by Henning Hraban Ramm. It was the first talk on day 3, but the video isn't posted yet on the TUG YouTube channel, and the proceedings issue has just gone to the printer. The examples included a two-page photo spread, with bleed. But it's ConTeXt, not LaTeX, and not yet available. Perhaps still interesting, but involves a couple week wait. Commented Aug 18, 2023 at 0:47

1 Answer 1

0

The command \DoublePhoto{<photo to be splitted>} will place the top left corner of the left half of image in the top left corner of the even page, expanding the half-image to fill the full height and the width of the page, thus printing the left side of the image. It will repeat the action on the opposite (odd) page printing the right side of the image.

It is assumed that the image already has the same aspect ratio of the page (double) that will be used (to completely fill the pages).

It uses the geometry package to set the layout of the document pages. The \DoublePhoto command sets the layout of the two half-image pages using \newgeometry and \restoregeometry after. Both will start a new page.

Then it uses the tikz package to position the images. The command will clear the header and footers of both pages (\thispagestyle{empty}). It begins in a new page, so you must take care to end the material above the photo on a even page.

The left and right image halves are generated using the adjustbox package.

x

% !TeX TS-program = pdflatex

\documentclass[12pt]{book}

\usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,showframe]{geometry}% define margins+ show margins

\usepackage{kantlipsum} % only for dummy text

\usepackage{tikz}% needed <<<
\usepackage[export]{adjustbox}% cut & adjust the image size<<<
    
\newcommand{\DoublePhoto}[1]{% \DoublePhoto{<photo to be splitted>}
\thispagestyle{empty}
\newgeometry{left=0.00cm, right=0.0cm,  top=0.00cm, bottom=0.00cm }% set the right margin value <<<
\begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north west) [inner sep=0pt, anchor=north west]   
    {\adjincludegraphics[height=\paperheight,trim={0 0 {.5\width} 0},clip, width=\textwidth+\marginparsep]{#1}};        
\end{tikzpicture}
\clearpage\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north east)  [inner sep=0pt, anchor=north east]
        {\adjincludegraphics[height=\paperheight,trim={{.5\width} 0 0 0},clip, width=\textwidth+\marginparsep]{#1}};
\end{tikzpicture}
\restoregeometry    
}

\begin{document}
    \kant[1-7]      
    
    \DoublePhoto{example-image}

    \kant[1-5]
    
\end{document}

To keep the inner margins use for example

\newgeometry{left=0.00cm, right=3.0cm,  top=0.00cm, bottom=0.00cm }

to set the right margin of the half-images pages equal to the rest of the document. Or use your binding width.

y

This is a more colorful example with two labels added. The image was taken from Solar System (wikipedia)

E

% !TeX TS-program = pdflatex

\documentclass[12pt]{book}

\usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm,]{geometry}% define margins+ show margins

\usepackage{kantlipsum} % only for dummy text

\usepackage{tikz}% needed <<<
\usepackage[export]{adjustbox}% cut & adjust the image size<<<

\newcommand{\SolarCaptioni}{Finally... the true color of the Solar System! Dwarf planets are sorted by radius ascending from top down, with four main classifications from right to left: Asteroid belt (Ceres, above the Jovian moons), Kuiper belt (Orcus, Quaoar, Makemake, Haumea, Pluto), scattered disk (Gonggong, Eris), and detached objects (Sedna). Dwarfs are at a larger scale than the moons.}

\newcommand{\SolarCaptionii}{Planet and moon credits: User:MotloAstro (Sun); NASA (Mercury, Venus, Earth, Moon, Jupiter, Saturn, Uranus, Neptune, Io, Europa (with color correction), Ganymede, Callisto (reprocessed by Kevin M. Gill), Mimas, Enceladus, Tethys, Dione, Rhea, Titan, Miranda, Ariel, Umbriel, Titania, Oberon, Triton); ISRO / ISSDC / Justin Cowart (Mars) Dwarf planets + moons credit: NASA and ESA.}
    
\newcommand{\DoublePhoto}[1]{% \DoublePhoto{<photo to be splitted>}
\thispagestyle{empty}
\newgeometry{left=0.00cm, right=3.0cm,  top=0.00cm, bottom=0.00cm }% set the right margin value <<<
\begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north west) [inner sep=0pt, anchor=north west,   label={below:{\parbox{\textwidth}{\sffamily\SolarCaptioni}}}]   
    {\adjincludegraphics[trim={0 0 {.5\width} 0},clip, width=\textwidth+\marginparsep]{#1}};        
\end{tikzpicture}
\clearpage\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
    \node at (current page.north east)  [inner sep=0pt, anchor=north east, label={below:{\parbox{\textwidth}{\sffamily\SolarCaptionii}}}]
        {\adjincludegraphics[trim={{.5\width} 0 0 0},clip, width=\textwidth+\marginparsep]{#1}};
\end{tikzpicture}
\restoregeometry
}

\begin{document}
    \kant[1-7]      
    
    \DoublePhoto{Solar_System_true_color_(captions)}

    \kant[1-5]
    
\end{document}

f

3
  • Thank you @SimonDispa! To clarify, I would need to create a unique \DoublePhoto command for every double photo in the preamble, each containing the unique trim and caption for the photo. Commented Aug 19, 2023 at 3:41
  • @Sowberry Hagan Please expand your former question by adding the new requirements there. Also: all photos will start at the top of the page or lower? Explain the meaning of unique trim for each photo: now it is 50% on each page. Where will the caption be located: left page, right page, both? Perhaps you can can add a a hand drawing with the several situations you have in mind. Commented Aug 19, 2023 at 13:48
  • Original question expanded. Commented Aug 19, 2023 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .