6

I have a very large document (1000+pages) that I need to produce as four separate volumes. I'm using Texmaker and TeXLive on a Win7 PC with the book class (too late to switch to memoir), and each chapter is a separate included file with the document structure in the main file. The first 3 volumes contain the main body of the document, and the 4th contains the appendices.

The volumes need to meet the following requirements:

  • each volume has its own custom title page

  • each volume continues numbering (page nums excluding front matter, section and fig/tab numbering, etc) from the previous

  • the "management summary" needs to be in the frontmatter of each volume following the title page

  • each volume needs its own 3-level toc and its lists, but also needs an abbreviated 1-level toc (preferably without pg numbers) for all of the other volumes

  • the appendixes are their own volume

  • bibliography for whole document needs to appear at the end of each volume

I'm new-ish to LaTeX, but this project has been a serious crash course. I'm looking at the volumes and shorttoc packages, but I'm not quite sure how to structure the main document for the repeating sections or custom title pages. To add some complexity, Volume 3 has two parts...

Any suggestion would be very much appreciated... deadline is coming up and I'm still scratching my head trying to figure this out. There doesn't seem to be much in any forums about doing multi-volume productions like this.

\documentclass[12pt,letterpaper,twoside,final,openright]{book}

\begin{document}

\begin{titlepage}
  % Title page for whole document
  \include{titleAll}
  % Title pages for volumes
  \include{titleV1}
  \include{titleV2}
  \include{titleV3}
  \include{titleV4}
\end{titlepage}

\frontmatter
  % Management summary chapter
  \include{management_summary}

  \tableofcontents
  \listoffigures
  \listoftables

\mainmatter
  % Volume I
  \part{VolumeI}
    \include{chap1}
    \include{chap2}
    \include{chap3}

  % Volume II
  \part{VolumeII}
    \include{chap4}
    \include{chap5}
    \include{chap6}

  % Volume III
  \part{VolumeIII.a}
    \include{chap7}
    \include{chap8}

  \part{VolumeIII.b}
    \include{chap9}
    \include{chap10}

\appendix
  % Volume IV
  \part{Appendices}
    \include{app1}
    \include{app2}
    \include{app3}

\backmatter
  \bibliographystyle{humannat}
  \bibliography{mybiblio.bib}

\end{document}

I'm currently using an \includeonly list to do it (not shown for brevity), but there seems that there should be a better way than what I have set up?

JSCard
  • 366
  • Added a sample MWE of what I have set up so far in terms of structure for illustration... there are a whole lot of \usepackage preamble items and such that I can post if it looks to be necessary... – JSCard Apr 02 '15 at 19:47
  • i'd set this up as four separate jobs, and (after the other parts have run) create "tailored" frontmatter files for each, pulling in (copies -- renamed so they don't get overwritten) the .toc and .aux files for the other volumes. that way it's easy to apply individual title pages and other front matter. the bibliography can be included in all four with no modifications. are the page numbers for the body consecutive, or do they start over with each part? – barbara beeton Apr 02 '15 at 20:01
  • Consecutive page numbering for the whole multi-volume run. Not sure I follow what you mean by separate jobs & pulling in the .toc and .aux files, though... pull them in how? Haven't done anything yet with working on those files directly... mainly just repeatedly using the quickbuild function of Texmaker. Can you be more specific about the process you're describing? – JSCard Apr 02 '15 at 20:10
  • i don't use texmaker; i always compile tex jobs from the command line, but this shouldn't make a difference. i would have four separate "driver" files, each calling in the chapters for just one part. at the beginning of the "main matter" for a part, \setcounter{nnn} with the proper starting page number (not necessry for the first part; that will automatically = 1) and compile. you will get a .aux file, a .toc file, and maybe an .idx file. when this is "final", you can copy the .toc and .aux files to a different name and\input` to the other parts. want this as an answer? – barbara beeton Apr 02 '15 at 20:19
  • How want you numbering the frontmatter of each part? in roman? starting from ii(2)? – touhami Apr 02 '15 at 22:20
  • I'd do this as one job and then split the PDF into pieces afterwards. But @barbarabeeton's solution is more straightforward, though a bit less automatic. [In fact I do do something very much like this for course readers which have to be split into no more than 100 pages per part. Each part has its own titlepage, table of contents and back page. Numbering is continuous. And the display of the ToC is sensitive to the current part. But this uses etoc which is not for the faint of heart;).] – cfr Apr 03 '15 at 02:15
  • @barbarabeeton, I'll give that a try when I'm in the office tomorrow. A coupel of questions - does that methods maintain the consecutive section numbering as well? ...are the 4 "driver" documents called into a master doc like in my MWE, or are they each standalone documents (ie each with their own separate & complete preamble)? – JSCard Apr 03 '15 at 02:56
  • @Scard -- numbering is not automatically consecutive. you need to set all necessary counters just after \begin{document} in each driver file. that would include page, chapter, maybe figure (unless they're numbered within chapters), ... the reason i do this sort of thing as multiple jobs is that, for such publications at the ams, each volume has independent \frontmatter and \backmatter, and resetting those properly entails more pain than i want to suffer. it's also easier to explain to a production editor, and write instructions for how to pull in extra tocs, etc. – barbara beeton Apr 03 '15 at 12:32
  • @Scard Be careful to David Carlisle conjecture. https://tex.stackexchange.com/questions/139873/what-are-the-most-common-mistakes-that-beginners-of-latex-and-friends-make/139878#139878 I mean there is no need to worry about such formatting, you have 1000 pages to type, we'll help you and you'll be okay. – touhami Apr 03 '15 at 14:05
  • @touhami, Thankfully the writing is all done and edited... just on the layout and report production at this point. The research project actually started back in 2006... two principal investigators, 9 authors, and dozens of tech & lab support folks! Next step is to turn this report into a book for online publication (it's an archaeological assessment for a major NY colonial period site). – JSCard Apr 03 '15 at 16:25
  • @barbarabeeton, Okay... I see how that would work now. That also means that each driver file need all of the \usepackage and customization preable as well? Let me try a few test runs to work out the kinks and I'll let you know how it goes. Any thoughts on whether the shorttoc package might be useful for doing the toc format for the other volumes like they want it? I gather the package can pull form external files... might save some mucking about with the .toc files? – JSCard Apr 03 '15 at 16:28
  • @Scard -- never used shorttoc in anger. setting tocdepth to appropriate values in appropriate places takes care of "slimming down" the contents lists of the "other" parts. and yes, you do want to use the same preamble; you could even make it into a job-specific .sty file to make sure you don't get things out of synch. – barbara beeton Apr 03 '15 at 16:36
  • @Scard About shorttoc of others volumes, what to you think: each table in newpage? (or right newpage? or continued?) – touhami Apr 03 '15 at 17:11
  • The way they do their pubs here - the ToC is as though it were all one book, but it will only be the headings (no page #) for one level deep (sometimes two, depending on subject) for material in other volumes... not sure I like that, but it seems the tradition. – JSCard Apr 03 '15 at 17:25
  • @Scard I edited my answer I hope it will help – touhami Apr 04 '15 at 08:03
  • @Scard did you find a solution? – touhami Apr 08 '15 at 19:27
  • @touhami, been dealing with the last-minute edits that came back from the authors. I have compiled the MWE you posted, and that does look close to what they're asking for... just need to get time to try and adapt it for my doc. Hopefully get a working test this afternoon. – JSCard Apr 09 '15 at 17:58
  • @Scard good luck – touhami Apr 09 '15 at 18:10
  • Honestly, you're asking for something that would cost a fortune as a commercial project. Good luck! – yo' Apr 22 '15 at 16:29
  • @yo', The joy of having to do it in-house as the only technically inclined one in the office... – JSCard Apr 24 '15 at 04:02

2 Answers2

4

Here is my way:

Edit: Almost complete

We use \evolume and \evolume to reset page numbering

etoc package for table of contents

titletoc package for list of figures and tables

\documentclass[12pt,letterpaper,twoside,final,openright]{book}
\usepackage{titletoc}
\usepackage{etoc}

%---------------------------------------
\usepackage{lipsum,mwe}
\newcommand{\testt}{%
\lipsum[1]
\begin{table}
\begin{tabular}{|c|c|}
\hline 
bla & foo \\ 
\hline 
foo & bla \\ 
\hline 
\end{tabular} 
\caption{Just a table}
\end{table}}
\newcommand{\testf}{%
\lipsum[1]
\begin{figure}
\includegraphics{example-image-a}
\caption{Just a figure}
\end{figure}}
%----------------------------------------

\let\ppcleardoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{%
\clearpage{\pagestyle{empty}\ppcleardoublepage}}
\newcounter{ppage}
\newcommand{\evolume}{\setcounter{ppage}{\value{page}}}
\newcommand{\setpage}{\stepcounter{ppage}%
\setcounter{page}{\value{ppage}}}

\newcommand{\vtableofcontents}[2][subsection]{%
\begingroup
\etocsettagdepth{VolumeI}{none}
\etocsettagdepth{VolumeII}{none}
\etocsettagdepth{VolumeIII}{none}
\etocsettagdepth{VolumeIV}{none}
\etocsettagdepth{#2}{#1}
\tableofcontents
\endgroup}

\newcommand{\vshorttoc}[3][chapter]{%
\begingroup
\etocsetstyle {part}
{}
{\medskip\noindent\relax}
{\bfseries\large\makebox[2cm]{\partname\ \etocnumber\ }%
\etocname\par\nobreak\medskip}
{}
\etocsetstyle {chapter}
{}
{}
{\bfseries\normalsize\makebox[3cm]{\chaptername\ \etocnumber\ }%
\etocname\par}
{}
\etocsettagdepth{VolumeI}{none}
\etocsettagdepth{VolumeII}{none}
\etocsettagdepth{VolumeIII}{none}
\etocsettagdepth{VolumeIV}{none}
\etocsettagdepth{#2}{#1}
\etocsettocstyle{\vspace{1cm}{%
\centering\LARGE\bfseries Contents of volume #3\par\nobreak\medskip}}{}
\tableofcontents
\endgroup}

\newcommand{\vlists}[1]{%
\startlist[#1]{lof}
\printlist[#1]{lof}{}{%
    \chapter*{\listfigurename}%
      \markboth{\MakeUppercase\listfigurename}%
              {\MakeUppercase\listfigurename}}
\startlist[#1]{lot}
\printlist[#1]{lot}{}{%
    \chapter*{\listtablename}%
      \markboth{%
          \MakeUppercase\listtablename}%
         {\MakeUppercase\listtablename}}}

\newcommand{\vstoplist}[1]{%
\stoplist[#1]{lof}
\stoplist[#1]{lot}}

\begin{document}
   % DOCUMENT 
\begin{titlepage}
\huge\bfseries
\ \vfil
Document
\end{titlepage}

   % Volume I
\begin{titlepage}
\huge\bfseries
\ \vfil
Volume I
\end{titlepage}

\etocdepthtag.toc{VolumeI}


\frontmatter
  % Management summary chapter
  some test

  \vtableofcontents{VolumeI}
  %\newpage %  and may be a header
  \vshorttoc{VolumeII}{II}
  \vshorttoc{VolumeIII}{III}
  {\let\chaptername\appendixname\vshorttoc{VolumeIV}{IV}}

  \vlists{VolumeI}


\mainmatter
\setpage

  \part{VolumeI}
  \chapter{test}
  \section{One}
  \testf
  \subsection{Test On}
  \cite{big}
  \testt
  \chapter{test}
  \testt
  \chapter{test}
  \testf\testf

\backmatter

\bibliographystyle{plain}
\bibliography{mybiblio}{}
\evolume

  % Volume II

\begin{titlepage}
\huge\bfseries
\ \vfil
Volume II
\end{titlepage}

\etocdepthtag.toc{VolumeII}

\frontmatter
  % Management summary chapter
  some test

  \vtableofcontents{VolumeII}
  %\newpage
  \vshorttoc{VolumeII}{I}
  \vshorttoc{VolumeIII}{III}
  {\let\chaptername\appendixname\vshorttoc{VolumeIV}{IV}}

  \vstoplist{VolumeI}
  \vlists{VolumeII}

\mainmatter
\setpage

  \part{VolumeII}
  \chapter{test}
  \section{One}
  \testt
  \subsection{Test On}
  \testt
  \chapter{test}
  \cite{small}
  \testf
  \chapter{test}
  \testf\testt

\backmatter

\bibliographystyle{plain}
\bibliography{mybiblio}{}
\evolume

  % Volume III

\begin{titlepage}
\huge\bfseries
\ \vfil
Volume III
\end{titlepage}

\etocdepthtag.toc{VolumeIII}

\frontmatter
  % Management summary chapter
  some test

  \vtableofcontents{VolumeIII}
  %\newpage
  \vshorttoc{VolumeII}{I}
  \vshorttoc{VolumeIII}{II}
  \vshorttoc{VolumeIV}{IV}

  \vstoplist{VolumeII}
  \vlists{VolumeIII}

\mainmatter
\setpage

  \part{VolumIII.a}
  \chapter{test}
  \section{One}
  \testf
  \subsection{Test On}
  \testt
  \chapter{test}
  \testt
  \chapter{test}
  \cite{small}
  \testf

  \part{VolumeIII.b}
  \chapter{test}
  \chapter{test}
  \section{One}
  \testf
  \subsection{Test On}
  \testt
  \chapter{test}
  \cite{big}
  \testt\testt

\backmatter

\bibliographystyle{plain}
\bibliography{mybiblio}{}
\evolume 

\appendix
  % Volume IV

\begin{titlepage}
\huge\bfseries
\ \vfil
Volume IV
\end{titlepage}

\etocdepthtag.toc{VolumeIV}

\frontmatter
  % Management summary chapter
  some test

  \vtableofcontents{VolumeIV}
  %\newpage
  \vshorttoc{VolumeII}{I}
  \vshorttoc{VolumeIII}{II}
  \vshorttoc{VolumeIV}{III}

  \vstoplist{VolumeIII}
  \vlists{VolumeIV}

\mainmatter
\setpage

  \part{Appendices}
  \chapter{test}
  \testt
  \chapter{test}
  \testt
  \chapter{test}
  \testf

\backmatter

\bibliographystyle{plain}
\bibliography{mybiblio}{}

\end{document}

One should be careful to the header in frontmatter of volume 2,3 and 4. the header of bibliography continue. So maybe one shoud reset it

touhami
  • 19,520
1

Apologies for the long hiatus... deadlines and travel delayed my being able to close out this question & project...

I did try the MWE posted by @touhami, and it did work very well. Had I been starting from scratch building the volumes and chapters &c. and/or if this were likely to be a common sort of project that occurred regularly and needed to be semi-automated... @touhami's solution would be the way to do it, I think.

Unfortunately, the document was already largely built and under deadline pressure. What I ended up doing was pretty much the suggestion by @barbarabeeton, though I did "cheat" and use \shorttoc for the outside volume ToC's.

Thanks for all the suggestions and efforts.

JSCard
  • 366