Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a problem with the numbering of items.

I own the items separately and do not know how to put it together, for the numbering, etc, etc.

I have several articles, and need to get an index should be done as follows

                               Contents

Name of the Article

Author of Article .......................................................Page Number

Name of the Article

Author of Article .......................................................Page Number

Name of the Article

Author of Article .......................................................Page Number

Etc, etc.

Thanks for your help

share|improve this question
    
I'm not sure I understand the question. Is the problem that you have several articles that are currently independent LaTeX files and you want to combine them into one document with a unified table of contents? –  Scribblemacher May 23 '12 at 14:19
    
Yes, is exactly what I need, I have articles, generated separately, but do not know how to get a list of contents, or is there some way to get article in one file –  Andres Sarmiento C May 24 '12 at 15:30
    
hi all I tested your recommendation, but I have a problem in the document to be combined figures exist, but I get this problem when there is no compilation and how to fix the problem I get is: Underfull \hbox (badness 10000) in paragraph at lines 72--73 [3] <oblique.pdf, id=20, 238.46692pt x 181.11665pt> <use oblique.pdf> –  Andres Sarmiento C May 28 '12 at 15:33
add comment

1 Answer 1

up vote 2 down vote accepted

Use the combine class. The combine class can be used to turn a collection of independent *.tex files into a compilation. Here is an example:

main.tex

\documentclass[book]{combine}
\title{A Book Example Using the Combine Class}
\author{TeX.SX}

\begin{document}
\maketitle
\tableofcontents

\chapter{Introduction}
I'm adding an introduction to this collection

\begin{papers}
    \coltoctitle{Hello, World}
    \coltocauthor{Tom Thompson}
    \label{doc1}
    \import{doc1} % this is doc1.tex; notice the lack of *.tex in the file name

    \coltoctitle{Farewell, everyone}
    \coltocauthor{John Johnson}
    \label{doc2}
    \import{doc2}
\end{papers}

\chapter{Acknowledgements}
\emph{You}, for asking this question on TeX.SX!

\end{document}

doc1.tex

\documentclass{article}

\begin{document}
\chapter{Introduction}
Hello, world! How are you?

This is the end of the first part.
\end{document}

doc2.tex

\documentclass{article}

\begin{document}
\chapter{Farewell}
Goodbye, World. I'll miss you.

This is the end of the second part.

\end{document}

Note that the \import{} command takes the name of the LaTeX file without the *.tex extension. See the documentation for combine for more information on how to use it.

share|improve this answer
    
I tested your recommendation, but I have a problem in the document to be combined figures exist, but I get this problem when there is no compilation and how to fix the problem I get is: Underfull \hbox (badness 10000) in paragraph at lines 72--73 [3] <oblique.pdf, id=20, 238.46692pt x 181.11665pt> <use oblique.pdf> –  Andres Sarmiento C May 28 '12 at 15:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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