
En el siguiente documento simple, la bibliografía no funciona:
\documentclass{article}
\usepackage[numbers]{natbib}
\usepackage{inputenc}
\inputencoding{utf8}
\begin{filecontents}{\jobname.bib}
\input{references_utf8}
\end{filecontents}
\inputencoding{latin1}
\begin{document}
\noindent
\cite[voir][chap. 12]{2009solar}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}
Quiero hacer esto porque mis documentos principales están en latin-1 y el archivo .bib está en utf-8. La idea de utilizar\inputencoding
se recomendó en esta pregunta:¿Cómo convertir UTF-8 a Latin-1 sobre la marcha?.
El archivo references_utf8.bib tiene este aspecto:
@book{2009solar,
address = {New Delhi},
author = {Solanki, Chetan Singh},
booktitle = {Solar Photovoltaics: Fundamentals, Technologies and Applications},
chapter = {12},
edition = {1},
isbn = {9788120337602},
pages = {478},
publisher = {Prentice-Hall of India},
title = {{Solar Photovoltaics: Fundamentals, Technologies and Applications}},
url = {http://books.google.ca/books?id=hdvYA9KsI2YC},
year = {2009}
}
Pero tiene que estar codificado en utf-8.
¿Cómo puedo hacer que esta configuración funcione?
Respuesta1
bibtex
No puedo manejar caracteres utf8. Conbibtex8
algunoSon posibles caracteres utf8, por ejemplo, diéresis. Sin embargo, puedes cambiar la codificación de entrada:
\documentclass{article}
\usepackage[numbers]{natbib}
\usepackage[latin1]{inputenc}
\begin{document}
\noindent
\cite[voir][chap. 12]{2009solar}
\begingroup
\iputencoding{utf8}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\endgroup
\end{document}