不同作者撰写的多篇文档和一个目录

不同作者撰写的多篇文档和一个目录

我有许多不同的 LaTeX 文档。每个文档都有不同的标题和作者。我有什么办法可以:

  1. 将所有这些文档合并为一个更大的文档,并让整个大文档具有准确的页码和单个标题页?
  2. 创建一个目录,其中包括每个单独文档的开始页码和该文档的作者?

编辑:此模板用于所有需要合并的文档。

答案1

正如@HarishKumar所建议的,该combine软件包可以完成这项工作。这是一个可行的示例。

这是包装文档,几乎逐字逐句地从包装文档中复制而来,网址为 http://tug.ctan.org/tex-archive/macros/latex/contrib/combine/combine.pdf。多次编译以确保目录正确。

\documentclass[12pt]{combine}

\title{Proceedings of the ...}
\author{A. N. Editor\thanks{Support ...}}
\date{29 February, 2000}
\begin{document}
\pagestyle{combine} % use the combine page style
\maketitle % main title
\tableofcontents % main ToC
\clearpage
\begin{papers}
\coltoctitle{A Sample Article for  \textsc{ Mathematics Magazine}}
\coltocauthor{Jack Q.~Firstauthor} % first authors into main ToC
\import{mm1}

\coltoctitle{A second piece} 
\coltocauthor{Jill P.~Secondauthor}
\import{mm2}
\end{papers}

\end{document}

在此处输入图片描述 以下是两篇导入的文章,每篇都是使用您链接到的模板构建的:

mm1.tex

% Article template for Mathematics Magazine
% Revised 7/2002  Thanks for Greg St. George
\documentclass[12pt]{article}
\usepackage{amssymb}
\renewcommand{\baselinestretch}{1.2}
%This is the command that spaces the manuscript for easy reading

\begin{document}
%\thispagestyle{empty}
\begin{center}
\Large
% TITLE GOES HERE
A Sample Article for  \textsc{ Mathematics Magazine}
\end{center}

\begin{flushright}
Jack Q.~Firstauthor\footnote{Supported by the National Science
Foundation.}  \\
XXXX University \\
City, State 98765-4321\\
\[email protected]+

\vspace{2 mm}

Jill P.~Secondauthor \\
Department of Physics
\footnote{Authors are in alphabetical order
unless there is an extraordinary reason to do otherwise.  Also,
the author address includes a department \emph{only} if
the department is \emph{not} mathematics. We use as few
footnotes as possible in the \textit{Magazine}.  This one, for instance,
contains information that really belongs in the body of the paper.
The previous footnote probably belongs among the Acknowledgments at the end.}\\
ZZZZ College \\
City, State 12345-6789
\end{flushright}

This document is meant to help you prepare an Article for
submission to \textsc{Mathematics Magazine}.  Of course,
editorial decisions depend entirely on
what you say and how you say it. Nonetheless, we will all save
time if you exercise some care in how you first present the paper.

\begin{thebibliography}{20}

\bibitem{Boas}  R.P. Boas, Can we make mathematics intelligible? \textit{Amer. Math.
Monthly} \textbf{88} (1981), 727--731.

\bibitem{Farris}  Frank Farris, \textit{A \textsc{Mathematics Magazine} Retrospective}, this \textsc{Magazine}, \textbf{79} (2006), 1-88.

\bibitem{Halmos} Paul Halmos, How to write mathematics,
\textit{Enseign.  Math.} \textbf{16} (1970), 123--152.  Reprinted in
Halmos, \textit{Selecta, expository writings}, Vol.  2, Springer, New
York, 1983, 157--186.

\bibitem{Hwang} Andrew Hwang, Writing in the age of Latex, \textit{AMS
Notices} \textbf{42} (1995), 878--882.

\bibitem{Knuth}  D.E. Knuth, T. Larrabee, and P.M. Roberts,
\textit{Mathematical Writing}, MAA Notes \#14, 1989.

\bibitem{Krantz}   Steven G. Krantz, \textit{A Primer of Mathematical Writing},
American Mathematical Society, 1997.

\bibitem{MAA} Mathematical Association of America, \textit{Electronic
Production Guidelines}, http://www.maa.org/pubs/bev.html .

\bibitem{Mermin} N. David Mermin, \textit{Boojums All the Way
Through}, Cambridge Univ.  Pr., Cambridge, UK, 1990.

\end{thebibliography}



\end{document}

mm2.tex

% Article template for Mathematics Magazine
% Revised 7/2002  Thanks for Greg St. George
\documentclass[12pt]{article}
\usepackage{amssymb}
\renewcommand{\baselinestretch}{1.2}
%This is the command that spaces the manuscript for easy reading

\begin{document}
%\thispagestyle{empty}
\begin{center}
\Large
A second piece
\end{center}

\begin{flushright}
Jack Q.~Firstauthor\footnote{Supported by the National Science
Foundation.}  \\
XXXX University \\
City, State 98765-4321\\
\[email protected]+

\vspace{2 mm}

Jill P.~Secondauthor \\
Department of Physics
\footnote{Authors are in alphabetical order
unless there is an extraordinary reason to do otherwise.  Also,
the author address includes a department \emph{only} if
the department is \emph{not} mathematics. We use as few
footnotes as possible in the \textit{Magazine}.  This one, for instance,
contains information that really belongs in the body of the paper.
The previous footnote probably belongs among the Acknowledgments at the end.}\\
ZZZZ College \\
City, State 12345-6789
\end{flushright}

This document is meant to help you prepare an Article for
submission to \textsc{Mathematics Magazine}.  Of course,
editorial decisions depend entirely on
what you say and how you say it. Nonetheless, we will all save
time if you exercise some care in how you first present the paper.

Now that I have caught your attention with an interesting introductory paragraph,
here is what you will find:
specific information about the style of Articles in the \textsc{Magazine}
and a description of the \LaTeX\ code we prefer that you use
to prepare your manuscript.

Since this section is very clearly
an introduction, I thought that labeling it ``Introduction" would add
nothing.  Note that I am willing to use the first person in an Article
and you might be as well.  Another equally respectable choice is ``we,''
even when there is only one author; this can
create an author-reader partnership to
work through the mathematics together.
Whatever voice you choose, consistency is important.

You may be looking at this document in a variety of ways:  the .pdf or .ps files
are meant to be viewed on a screen or printed, while
the .tex file contains the codes used to create those
viewable versions via the program \LaTeX.  Even if you are a novice with \TeX,
there may be enough here to teach you what
you need to know.  And if you are an ace with \TeX,
we have a warning: please do not overload your
document with special kludges and tricks that will
only be removed later by our compositor.

This document is prepared with extremely simple \LaTeX\ formatting,
using the unadorned \verb+article+ template.
It is designed for simplicity and ease of handling---not
to imitate the \textsc{Magazine}'s final, typeset style in every
detail.    For authors less familiar with \LaTeX, we offer a
brief lesson, showing how certain common elements of mathematical
style are typeset using this program.  For hardcore technical
specifications, please see the Electronic Publication Guidelines~\cite{MAA}.

\subsection*{Notes on writing an Article}
Articles in the \textsc{Magazine} tend to be longer and
more substantial than Notes,
offering a broad overview of some field
or making new connections.
Being longer, they often
benefit from more sectioning. We use
the \verb+\subsection*+ command to create titles
for these sections, which are not usually numbered
(the \verb+*+ in \verb+\subsection*+ accomplishes this).

To judge the length of your piece,  consider that
this document prints to six pages with the current code, but would run
about four pages in the \textsc{Magazine}.  The current settings produce
a document that is generously spaced in consideration of
referees' eyesight.

Few pieces of mathematical writing are entirely self-contained,
although we try to make Articles reasonably so.    Consider
providing a section of background material that our
more knowledgeable readers can skip. Define
enough terms to enable an eager undergraduate student
to read your piece without having to consult
too many references.

For readers intrigued by your exposition,
you should provide friendly references.
Bibliographies may contain suggested reading along with sources actually referenced.  In all cases,
cite sources that are currently and readily available.

\LaTeX\ has a way to keep track of references automatically,
which is illustrated in the code that ends this file.  To refer
to Halmos~\cite{Halmos}, you use a codename that you have created
as a mnemonic, often the author's last name.
 \LaTeX\
 keeps track, numbering the references in
the order they appear in your list.  If you add a reference
(positioning it correctly in the list) the numbers will be adjusted accordingly.

Please follow our bibliographic format carefully, based
on the examples below.  Entries may appear either in alphabetical
order or in order of citation (but choose one order and
stick to it).   Journal titles are abbreviated
as in \emph{Mathematical Reviews},
for instance, \textit{Amer. Math. Monthly}; volume numbers
of journals are set in \textbf{bold}.  Authors names are
not inverted: Frank A. Farris, not Farris, Frank A.~\cite{Farris}.
The abbreviation pp. is used for books, but not journal
articles.  Note the slightly different style for
citing articles in the \textsc{Magazine}.


\paragraph*{How to do things in \LaTeX}

Roman letters used as variables will be correctly
italicized if enclosed with \$s in your code, as in ``functions $f$, $g$, and $h$.''
This makes for typing lots of \$s when writing in \TeX.
Other popular fonts are $\mathcal A$, for sets and the like, and

\end{document}

笔记:该模板有很多过时的LaTeX构造。我希望它不是《数学杂志》目前使用的那个。以下是其中一些

  • 标题和作者的硬编码格式\maketitle会更好。

  • 带有 的许多换行符\\

  • ${\mathbb Z}$无法编译。

  • eqnarray环境不再是明智的选择。

  • 使用$$...$$而不是\[...\]显示数学。[在链接的模板中,但不是在此答案中重复的摘录中。]

  • 其他人可能也一样......

相关内容