# Two-column LaTeX class for a photobook

I am looking for a solution to produce a two-column(ed) LaTeX-based photobook. Text and comments should go on the outer column (in a two-sided document)--something like a wide outer margin. Photos (along with their optional captions) should be placed in the inner column (which will be wider than the "text"-column).

Very important detail: the idea is to have landscape pages, wide enough to present photos that can be actually seen.

As an extra, the class should be compatible with some kind of a thumb-index for the chapters, placed on the outer side of the page, from top to bottom, counting from the first to the last chapter.

Should I start scratching my own class (or layout for LyX)?

-
Can you have a look at the tufte-latex class? –  Yiannis Lazarides Nov 1 '11 at 8:39
I've already started my "photobook" project based on the tufte-latex class :-). Two things do not play nice: the thumb-index and my custom definitions of the layout geometry (using the "geometry" package). Moreover, I am a bit sceptical whether the use of "marginal notes" for the text is a clean solution for the question asked here. –  Nikos Alexandris Nov 1 '11 at 8:50
Then you probably need to start from somewhere and develop your own class. In this case then move away from Tufte as it redefines a lot of stuff and it will be more difficult to modify. I would start from a class like octavo (I know is a bit heretical), but the class is very well documented and is based on the standard book class. Another problem will be floats, for a picture book I would not use them. Have you got a sample scan of what you are after? –  Yiannis Lazarides Nov 1 '11 at 9:06
If you have one photo per page, or a fixed number of photos of fixed sizes (that you know fits on a single page) then it's ok. But as Yiannis says, floats will turn this project into a nightmare: how to keep comment text with the photos? etc. –  Seamus Nov 1 '11 at 9:09
Where can I post a left and right layout(.pdf) pages--produced with the layout packge after a lot of trial and error--as a sample? No floats are required! Just one, or two photos max. per page. Also, the very nice solution, for two-page wide photos provided by Martin Scharrer will be honoured. –  Nikos Alexandris Nov 1 '11 at 9:10

The important issues to handle for such a project would be the handling of floats. Normally photo books or similar documents do not have a large amount of words and if you use floats and marginpars, the text will certainly end up in the wrong place.

I would first choose a few page designs and then use minipages or better TeX vbox and hbox primitives to position them and work macros around them. Martin's adjustbox package might also come handy here, i.e., you need to build the two columns, rather than use the marginpar area or a two-column layout.

The layout above was achieved using such a macro:

\newcommand\addpicture[2]{
\hskip-2cm\begin{minipage}[b]{17cm}
\includegraphics[width=17cm]{#1}
\end{minipage}\hspace{0.3cm}
\begin{minipage}[b]{3cm}
#2
\end{minipage}}


I haven't used your dimensions for the page geometry but you can vary the sizes in the minimal that follows. Add fonts and style to suit your requirements.

\documentclass[11pt]{book}
\usepackage{xcolor}
\usepackage{ifpdf}
\usepackage{graphicx}
\newfont{\HUGE}{cmr17 at 96pt}
\setlength{\textwidth}{8.0in}
\setlength{\textheight}{5.125in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{-0.375in}
\setlength{\topmargin}{-0.375in}
\setlength{\footskip}{0.25in}
\ifpdf
\pdfpageheight 7.5in
\pdfpagewidth 9.625in
\fi
\newcommand{\hstroke}{\rule[0.5ex]{5.0em}{0.2ex}}

\begin{document}

\thispagestyle{empty}
\begin{center}
\setlength{\unitlength}{1.0em}%
\begin{picture}(45,16)(0,0)
\put(-0.625,0){\framebox(6.2,7.25){\HUGE \textcolor{purple}{A}}}
\raggedright FOR LITTLE\linebreak
FEET\linebreak
}}
\end{picture}
\hspace*{-0.6em}\rule{\textwidth}{0.3ex}\\
{\small \sc by}\\
{\small YIANNIS LAZARIDES}\\
{\footnotesize Author of Myths of TeX''}\\
\vspace*{18.5 ex}
\rule{\textwidth}{0.3ex}\\
{\small
DOHA\phantom{ZZZZZ,}\hfill\raisebox{0.5ex}{$\bullet$}\hfill THE CAMEL\linebreak
QATAR\hfill\raisebox{0.5ex}{$\bullet$}\hfill PRESS
}
\end{center}
\newpage
\thispagestyle{empty}
\vspace*{18ex}
\begin{center}
{\em Copyright, $\mit 2011$}\\
{\sc By the Little Girl \& Company}\\
\hstroke\\
\vspace*{18ex}
{\sc A little story book}\\
{\sc for a little girl}\\
\vspace*{12ex}
\end{center}
\newpage
\frontmatter
\thispagestyle{empty}
\vspace*{20ex}
\begin{center}
{\scriptsize FOR}\\
{\large \bf Li, Mary and John}\\
\smallskip
{\footnotesize AND THE REST\\
OF THE WORLD'S\\
CHILDREN}
\end{center}

\mainmatter

\hskip-2cm\begin{minipage}[b]{17cm}
\includegraphics[width=17cm]{#1}
\end{minipage}\hspace{0.3cm}
\begin{minipage}[b]{3cm}
#2
\end{minipage}}

\addpicture{children-03.jpg}{\ldots and on the other side of the world in the Land of the Moon Wi Li was sleeping \ldots}

\end{document}


-
The example demonstrated above is close enough to what I want to achieve. I will try it out (using of course my own geometry definitions). To expand a bit on the discussion, I've thought of using minipages (within LyX, to be honest) to get it done. Then again, it would be nice to have a clean(er) solution, a unique class to fulfil this need. I am not convinced that LaTeX is not meant to be used for such a task. How else can I create automatically an index for various cross-references and the like? I imagine this would be a harder work when using a photo or page editing tool. –  Nikos Alexandris Nov 1 '11 at 12:04
Everything is still available in the example. You can add packages as you like make indices, table of contents and the like. Using LyX might not be the best way to develop special layouts, rather use a good editor and type the commands yourself. It will be also a good idea to do a bit of research on boxes, how to raise them or lower them etc., I have a feeling you will need them. –  Yiannis Lazarides Nov 1 '11 at 12:13
In my last comment I wanted to contrast the LaTeX way against other tools (like LibreOffice, GIMP or Scribus). In addition, besides time availability before the deadline to deliver "something", there is one important reason why I consider myself bound to LyX: other people (without any special attachment to LaTeX) might need to work on it later on. For them, I consider LyX as a good compromise between the "good" (=LaTeX) and the "bad" solution (=OfficeLike-YouNameIt-EditingTool). For my very own projects, I will definitely try-out the clean(er) way :-) –  Nikos Alexandris Nov 1 '11 at 12:27
Finally, I've made progress and am about to finish up the project. As suggested by Yiannis L., I used minipages (within the KOMA-script) to produce the desired positioning of photos and texts. –  Nikos Alexandris Nov 15 '11 at 11:08