Texto entre título y contenido del Índice o Bibliografía

Texto entre título y contenido del Índice o Bibliografía

Quiero escribir un texto entre el título del índice y el contenido. (también entre título de Bibliografía y contenido).

Intenté redefinir el título con el texto, pero espero que haya una solución mejor, porque es demasiado feo.

Gracias.

Respuesta1

Dada la diferente naturaleza de bibliographyy indexhe dividido mi respuesta en dos partes:

Texto entre título de bibliografía y contenido.

Esta solución se basa enparcheel thebibliographymedio ambiente (usando el paqueteetoolboxy su comando \patchcmd) para agregar Some textantes del contenido.

Creo un comando \bibpreface{Text before bibliography}para ello.

Aquí un ejemplo de código (incluido el .bibuso filecontents)

\documentclass{book}
%---------------------------------
% Database .bib file
\begin{filecontents}{mydatabib.bib}
@book{goossens93,
 author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
 title = "The Latex Companion",
 year = "1993",
 publisher = "Addison-Wesley",
 address = "Reading, Massachusetts"
}

@book{lamport94,
 author = "Leslie Lamport",
 title = "Latex: A Document Preparation System",
 year = "1994",
 edition = "Second",
 publisher = "Addison-Wesley",
 address = "Reading, Massachusetts"
}

@misc{patashnik88,
 author = "Oren Patashnik",
 title = "{B}ib{T}e{X}ing.  Documentation for General {B}ib{T}e{X} users",
 year = "1988",
 howpublished = "Electronic document accompanying BibTeX
distribution"
}
\end{filecontents}
%-----------------------------------------
\usepackage{etoolbox}
\newcommand{\bibpreface}[1]{\patchcmd{\thebibliography}{\list}{#1\list}{}{}}
\begin{document}
In \cite{goossens93} we can find information  very  useful about \LaTeX\ and in \cite{patashnik88} there is important information  about \textsc{Bib}\TeX.
\nocite{*}
\bibpreface{Text before of bibliography, and some warnings to take in account when you read the books.}
\bibliographystyle{plain}
\bibliography{mydatabib}
\end{document}

Parte del resultado (recortado)

ingrese la descripción de la imagen aquí

Este enfoque también funciona en articleyreport clases.

EDITAR

Si escribes tu bibliografíaa manoentonces solo con esto

\documentclass{book}
\usepackage{etoolbox}
\newcommand{\bibpreface}[1]{\patchcmd{\thebibliography}{\list}{#1\list}{}{}}
\begin{document}
In \cite{goossens93} we can find information  very  useful about \LaTeX\ and in \cite{patashnik88} there is important information  about \textsc{Bib}\TeX.
\nocite{*}
\bibpreface{Text before of bibliography, and some warnings to take in account when you read the books.

This allows change of lines.}
\begin{thebibliography}{1}

\bibitem{goossens93}
Michel Goossens, Frank Mittlebach, and Alexander Samarin.
\newblock {\em The Latex Companion}.
\newblock Addison-Wesley, Reading, Massachusetts, 1993.

\bibitem{lamport94}
Leslie Lamport.
\newblock {\em Latex: A Document Preparation System}.
\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.

\bibitem{patashnik88}
Oren Patashnik.
\newblock {B}ib{T}e{X}ing. documentation for general {B}ib{T}e{X} users.
\newblock Electronic document accompanying BibTeX distribution, 1988.

\end{thebibliography}
\end{document}

obtendrás el resultado deseado.

Texto entre el título del índice y el contenido.

Usando la misma idea defino el comando \indexpreamble{Text}, este escribe sutextoen toda la página (recuerde que indexestá escrito en twocolumn)

Sólo necesitas agregar este códigoantesde la \makeindexinstrucción en elpreámbulo del documento

\usepackage{etoolbox} %If it doesn't loaded
\newlength{\oldparindent}
\setlength{\oldparindent}{\parindent}
\newcommand{\indexpreamble}[1]{\patchcmd{\theindex}{]}{\setlength{\parindent}{\oldparindent}%
\noindent#1\par\indexspace]}{}{}}

y utilizar \indexpreamble{...}justo antes de \printindex(o \begin{theindex}).

Respuesta2

¿Por qué no utilizar biblatex? Tiene muchas funciones y no es tan complicado. Sé que este no es tu paquete elegido, pero aquí tienes una sugerencia:

El prenotecampo está hecho para adaptarse solo a su propósito (si lo entiendo correctamente):

\documentclass{article}

\usepackage{filecontents}

% suggested bibliography package
\usepackage[indexing = true]{biblatex}
\addbibresource{mydatabib.bib}

\defbibnote{bib-intro}{This is where you put your bibliography prenote.}

% suggested index package
\usepackage{imakeidx}
\makeindex

\begin{filecontents}{mydatabib.bib}
@book{goossens93,
 author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
 title = "The Latex Companion",
 year = "1993",
 publisher = "Addison-Wesley",
 address = "Reading, Massachusetts"
}

@misc{patashnik88,
 author = "Oren Patashnik",
 title = "{B}ib{T}e{X}ing.  Documentation for General {B}ib{T}e{X} users",
 year = "1988",
 howpublished = "Electronic document accompanying BibTeX
distribution"
}
\end{filecontents}

\begin{document}

In \cite{goossens93} we can find information  very  useful about \LaTeX\ and in \cite{patashnik88} there is important information  about \textsc{Bib}\TeX.

% Printing the bibliography
\printbibliography[prenote={bib-intro}]

% Printing the index with a prenote
\indexprologue{%
    Index prenote goes here. Lets make it a bit longer just for illustrating the presentation of it.
}
\printindex

\end{document}

Me da: Salida con biblatex y uso de prenota.

Con \printbibliography[prenote={bib-intro}]usted define qué prenota desea usar y con \defbibnote{bib-intro}{<text>}usted define el texto que desea anteponer. Consulte la página 73 deldocumentación biblatex.

Tenga en cuenta que utilicé la clase de documento del artículo en lugar del libro solo con fines ilustrativos (es más fácil tomar el clip de pantalla con todo en una página).

No estoy muy seguro de cómo desea utilizar el índice y qué paquete, pero recomendaría imakeidx.

Incluyendo

\usepackage{imakeidx}
\makeindex

A su preámbulo y [indexing = true]como opción biblatex, sus datos bibliográficos están indexados. Agregué esta configuración a mi ejemplo anterior y eso me da este índice:

ingrese la descripción de la imagen aquí

información relacionada