2

Consider this example:

\documentclass{book}
\begin{document}

\renewcommand{\tablename}{Tabla}

\ourtitlepage           
\tableofcontents    
\ifthenelse{\isodd{\value{page}}}{\emptypage}{\clearpage}   

\part{Calificación}     
\ifthenelse{\isodd{\value{page}}}{\emptypage}{\clearpage}   

\chapter{Plan de Calificación}
    \include{plan_calificacion}
    \include{registro_firmas} 
    \include{hoja_aprobaciones}

(.....)

\chapter{Reporte de Calificación}
    \ifthenelse{\isodd{\value{page}}}{\emptypage}{\clearpage}   
    \include{reporte_calificacion}
    \include{hoja_aprobaciones}
    \include{desvios}

\chapter{Plan para mantener el estado calificado}
    \clearpage
    \include{mantenimiento_calificacion}    
    \include{hoja_aprobaciones}

\end{document}

Repeating \include{hoja_aprobaciones} the table of contents takes only one item and repeats the number of section (5.2.) and page (142) in all the instances.

I Calificación                                                  4
1. Plan de Calificación                                         5
1.1. Plan de Calificación . . . . . . . . . . . . . . . . . . . 6
1.2. Registro de rmas . . . . . . .  . . . . . . . . . . . . . 10
5.2. Hoja de aprobaciones . . . . . . . . . . . . . . . . . . 142
4. Reporte de Calificación                                    125
4.1. Reporte de la calificación . . . . . . . . . . . . . . . 126
5.2. Hoja de aprobaciones . . . . . . . . . . . . . . . . . . 142
4.3. Reporte de desvíos . . . . . . . . . . . . . . . . . . . 129
5. Plan para mantener el estado calificado                    139
5.1. Plan para mantener el estado calificado . . . . . . . .  140
5.2. Hoja de aprobaciones . . . . . . . . . . . . . . . . . . 142
5.3. Control de Cambios . . . . . . . . . . . . . . . . . . . 143
5.4. Informe complementario al control de cambios . . . . . . 148
5.5. Informe de servicio técnico  . . . . . . . . . . . . . . 150
Fran
  • 80,769
Candela
  • 23
  • 6
    Welcome to TeX.SX! The language on this site is English, not Spanish. Please rephrase your question in English! Please complete your code above -- it's not compilable for us! –  Apr 29 '16 at 19:23
  • 1
    Si necesitas una mano con el inglés, podemos editar la pregunta, pero tienes que poner un ejemplo de documento y subdocumento que podamos compilar y reproducir el error para darte una solución. Por lo pronto, si "hoja_aprobaciones" es una parte del capítulo deberías usar \input, no \include. – Fran Apr 29 '16 at 19:35
  • Fran gracias por tu ayuda!! El problema se resolvió colocando \input en vez de \include. – Candela Apr 29 '16 at 20:16
  • Hello Fran! Sorry, my english is very poor. I would like write an answer but I dont know use this site. It is the first time I do a question here. And I am very grateful for your help. – Candela Apr 29 '16 at 20:55
  • @Candela De nada. Entonces me permito editar tu pregunta para que encaje con las normas de esta web, sin inglés y sin dar las gracias (aquí hay que ir al grano, el agradecimiento va implícito si aceptas y votas por la respuesta). Más abajo tienes mi respuesta formal. – Fran Apr 30 '16 at 10:07

1 Answers1

6

There are two errors and both that can be deduced of the excellent answers to When should I use \input vs. \include?

1) First error was use \include{} instead of \input{} for any chunk of text below a whole chapter because insert a \clearpage before and after the included code, and usually you do not want this for a section, a table or a few paragraphs.

2) Supposing that was fine insert a \clearpage before and after a section, the second error was use \include{hoja_aprobaciones} several times. Even if you want to show exactly the same content many times, unlike \input{}, each of these commands make its own auxiliar file (hoja_aprobaciones.aux). But done in triplicate, obviously only the last remain in the hard disk after the first compilation, so the information of the last .aux file will be:

\setcounter{page}{142}
(....)
\setcounter{chapter}{5}
\setcounter{section}{2}
(....)

An finally this information is used for the table of contents in the second compilation ... again and again.

Fran
  • 80,769