3

I am looking for a documentclass to achieve the following: I would like to typeset a compilation ( abook or a volume of a journal) which consists of completely independent articles (which I will call "contribution" here, just not to mix them up with the latex-\documentclass{article}) each provided by a different author. Studying some books that are such compilations leads me to the following standard requirements the documentclass shall meet:

  1. every contribution shall be listed with its respective author in the table of contents

  2. every contribution shall start on a new (odd) page

  3. contributions shall not be numbered

  4. contributions shall not come with any addendum like "chapter" or something similar, neither in toc, nor in the document itself nor in the header of the document

  5. numbering of the "sections" of each contribution shall start at "1" (and not at "0.1")

  6. (short) title and author of the current contribution shall be shown in the header of the document (author on even, title on uneven pages)

  7. toc shall only show the title and the author of every contribution, not their respective sectioning structure

  8. footnote numbering shall restart from "1" in each contribution

I am sure there is a way to achieve this with a lot of manipulations of the \documentclass{book} like in the solutions described here:

But all in all this is pretty much stuff and - besides it will take a lot of time for me to understand all these manipulations in detail to adapt them for my needs - looks ugly to my eye. So I wonder if there is a predefined documentclass which provides all the features named above or is at least "closer" to the solution I would like to have.

  • From the top of my head dtk.cls. But you will be much faster and much safer simply implementing everything you need yourself using book, memoir or scrbook. Right now, there might be a class that fullfills your nedds, but doing every requirement in an answer would be too much. – Johannes_B Mar 1 '15 at 20:32
  • OK. I have not very much experience with LaTex, but I would have expecte the described/desired documentclass to be a rather basal one. – jonathan.scholbach Mar 2 '15 at 0:47
  • Look at your requirements, 7 (individual) questions. Each and every one of them might be basic stuff, but the collection of them, is very individual. – Johannes_B Mar 3 '15 at 17:41
  • Yes, I knew that the collection of many probable things might be improbable. But I would reckon in humanities most publications follow exactly these typesetting rules. That's why I've been a little bit surprised... – jonathan.scholbach Mar 3 '15 at 18:42
1

Alright, so I solved it the way I would call ugly, i.e. manipulating the book-class. Here is my minimum example which meets all the requirements demanded in the thread-opening. Just in case, someone else wants something similar:

\documentclass{book}

\newcommand\contributionauthor{}
\newcommand\contributiontitle{}
\newcommand\ctitle{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%   chapter  and section    %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% to supress "chapter n" before each chapter we use \chapter*
% the solution with titlesec
%   \usepackage{titlesec}
%       \titleformat{\chapter}[display]
%       {\normalfont\bfseries}{}{0\Large\centering\scshapet}{\huge}
% does not work, since it seems to interfer with \usepackage{sectsty}
% which we want to use lateron to center the chapter- and section headings

% since we want the section numbering to start from 1 in each contribution
% we have to tell \chapter* to reset the section counter
% for the same reason we have to reset the footnote counter
\newcommand*\contribution{\setcounter{section}{0} \setcounter{footnote}{0}\chapter}

%center chapter, section, subsection and subsubsection headings
\usepackage{sectsty}
    \allsectionsfont{\centering}

%let section numbering start at "1." (instead of "0.1")
\renewcommand\thesection{\arabic{section}}

% show \contributionauthor after title oft chapter
\usepackage{suffix}
    \newcommand\chapterauthor{\printchapterauthor{\contributionauthor}\authortoc
    {\contributionauthor}}\WithSuffix\newcommand\chapterauthor*[1]
        {\printchapterauthor{#1}}

\makeatletter
\newcommand{\printchapterauthor}[1]{%
  {\parindent0pt\vspace*{-35pt}%
  \linespread{1.1}\Large\centering\scshape#1%
  \par\nobreak\vspace*{40pt}}
  \@afterheading%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%          headers          %%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
    % clear header
    \fancyhead{}
    % show author of the contribution in the header of even pages
    \fancyhead[CE]{\textsc{\contributionauthor}}
    % show title of the contribution in the header of odd pages
    \fancyhead[CO]{\contributiontitle}
    % activate the headerstyle  
    \pagestyle{fancy}

% suppress header on those empty pages standardly produced by \cleardoublepage 
% (in twosided documents \cleardoublepage lets every new chapter start on an odd page) 
\makeatletter
    \renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}%
    \thispagestyle{empty}%
    \newpage%
    \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      table of contents    %%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% show \contributionauthor in toc
\newcommand{\authortoc}[1]{%
  \addtocontents{toc}{\vskip -35pt}%
  \addtocontents{toc}{%
    \protect\contentsline{chapter}%
    {\mdseries\scshape\protect\normalsize#1}{}{}}
  \addtocontents{toc}{\vskip 35pt}%
}

% set depth of toc 0, so only chaptertitles appear, no section or subsections
\setcounter{tocdepth}{0}

\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      document itself      %%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\tableofcontents

\renewcommand\ctitle{First Contribution}
\contribution*{\ctitle}\addcontentsline{toc}{chapter}{\ctitle}
\renewcommand\contributiontitle{First Contribution}
\renewcommand\contributionauthor{Jane Doe}
\chapterauthor{}

\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
This is to show you that headings of sections and subsections and subsubsections are centered.\footnote{This is the first footnote.}
\newpage
\section{Another Section}
This page only exists to show you that header-behaviour is working on verso and recto pages.\footnote{This is the second footnote}
\newpage
This page only exists to show you that header-behaviour is working on verso and recto pages. Also have a look on the next (completely) blank page, which is automatically added by \textbackslash cleardoublepage to ensure that next chapter starts on an odd page. It does not have a header nor a footer.

\renewcommand\ctitle{Second Contribution}
\contribution*{\ctitle}\addcontentsline{toc}{chapter}{\ctitle}
\renewcommand\contributiontitle{Second Contribution}
\renewcommand\contributionauthor{John Doe}
\chapterauthor{}

\section{Again, a new section}
But since it is part of new contribution, it is numbered by "1."\footnote{This is the third footnote in the document, but the first in the current contribution, so it is numbered by "1"}

\section{One remark on the definition of a new contribution title}
We want the same title to appear in toc and in the heading of the contribution. That's why the title of the contribution is given to \{\}ctitle to print it in the chapter-title and in the toc. But the contribution title must not be given to the fancyheader before the \textbackslash chapter*, since else the header would change even one page before.

\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.