Package conflict when using the combine document class
The following code demonstrates two types of errors, which I think are fundamentally the same. The code should format as is; now remove the % in front of \usepackage{semantic}. Reformatting fails to produce a PDF file. Now re-comment \usepackage{semantic} and un-comment \usepackage{titling}. Reformatting gives en error involving the footnote in a title. Unfortunately, I need both packages in my document.
\documentclass[book]{combine}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{filecontents}
\usepackage{alltt}
%\usepackage{semantic}
%\usepackage{titling}
% The input articles
\begin{filecontents*}{inputDoc1.tex}
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{alltt}
\@ifclassloaded{combine}
{\let\@begindocumenthook\@empty}
{}
\makeatother
\begin{document}
\title{First article\footnote{my footnote}}
\author{Author of first article}
\maketitle
\section{first section}
\blindtext[3]
\begin{alltt} \(10\sp{-6}\) \end{alltt}\end{document}
\section{Second section}
\end{document}
\end{filecontents*}
\begin{filecontents*}{inputDoc2.tex}
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{alltt}
\@ifclassloaded{combine}
{\let\@begindocumenthook\@empty}
{}
\makeatother
\begin{document}
\title{Second article}
\author{Author of second article}
\maketitle
\section{first section}
\blindtext[1]
\begin{alltt}
\textbf{deterministic} \textbf{assume}(|A - A'| < \(10\sp{-6}\) and
|B - B'| < \(10\sp{-6}\)) \{
C = parallel_matrix_multiply_float(A, B);\vspace{3pt}
\} \textbf{assert}(|C - C'| < \(10\sp{-6}\));
\end{alltt}
\end{document}
\end{filecontents*}
% Define abstract to be used in book class (or use report)
% http://tex.stackexchange.com/questions/51483/how-to-write-abstract-and-acknowledgement-in-book-format
% The main document
\begin{document}
\title{The collection}
\author{A. N. Editor}
\date{\today}
\maketitle
\chapter{First chapter}
\section{Introduction}
\ldots
\begin{papers}[]
\coltoctitle{First article}
\coltocauthor{Author of first article}
\import{inputDoc1}
\end{papers}
\chapter{Second chapter}
\section{Introduction}
\ldots
\begin{papers}[]
\coltoctitle{Third article}
\coltocauthor{Author of third article}
\import{inputDoc2}
\end{papers}
\end{document}
The following code demonstrates two types of errors, which I think are fundamentally the same. The code should format as is; now remove the % in front of \usepackage{semantic}. Reformatting fails to produce a PDF file. Now re-comment \usepackage{semantic} and un-comment \usepackage{titling}. Reformatting gives en error involving the footnote in a title. Unfortunately, I need both packages in my document.
\documentclass[book]{combine}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{filecontents}
\usepackage{alltt}
%\usepackage{semantic}
%\usepackage{titling}
% The input articles
\begin{filecontents*}{inputDoc1.tex}
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{alltt}
\@ifclassloaded{combine}
{\let\@begindocumenthook\@empty}
{}
\makeatother
\begin{document}
\title{First article\footnote{my footnote}}
\author{Author of first article}
\maketitle
\section{first section}
\blindtext[3]
\begin{alltt} \(10\sp{-6}\) \end{alltt}\end{document}
\section{Second section}
\end{document}
\end{filecontents*}
\begin{filecontents*}{inputDoc2.tex}
\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{alltt}
\@ifclassloaded{combine}
{\let\@begindocumenthook\@empty}
{}
\makeatother
\begin{document}
\title{Second article}
\author{Author of second article}
\maketitle
\section{first section}
\blindtext[1]
\begin{alltt}
\textbf{deterministic} \textbf{assume}(|A - A'| < \(10\sp{-6}\) and
|B - B'| < \(10\sp{-6}\)) \{
C = parallel_matrix_multiply_float(A, B);\vspace{3pt}
\} \textbf{assert}(|C - C'| < \(10\sp{-6}\));
\end{alltt}
\end{document}
\end{filecontents*}
% Define abstract to be used in book class (or use report)
% http://tex.stackexchange.com/questions/51483/how-to-write-abstract-and-acknowledgement-in-book-format
% The main document
\begin{document}
\title{The collection}
\author{A. N. Editor}
\date{\today}
\maketitle
\chapter{First chapter}
\section{Introduction}
\ldots
\begin{papers}[]
\coltoctitle{First article}
\coltocauthor{Author of first article}
\import{inputDoc1}
\end{papers}
\chapter{Second chapter}
\section{Introduction}
\ldots
\begin{papers}[]
\coltoctitle{Third article}
\coltocauthor{Author of third article}
\import{inputDoc2}
\end{papers}
\end{document}
No comments:
Post a Comment