4

I'm new here. I'm typing my Thesis and I'm using two languages (Spanish, English). This is my code:

\documentclass[hidelinks,letterpaper,titlepage,12pt,oneside,spanish,final]{report_eie}
\usepackage[english,spanish]{babel} 
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amssymb}
.
.
\usepackage{indentfirst} %(Because I have declared a new language, english)
\usepackage[apaciteclassic]{apacite}
\usepackage[round,authoryear]{natbib}
.
.
\begin{document}
\selectlanguage{spanish} 
.
.
.
\bibliographystyle{apacite}
\renewcommand{\bibname}{REFERENCIAS}
\let\oldbibsection\bibsection
\bibliography{biblioteca} 
.
.
.
\end{document}

All works but the bibliography is showed in English (for example, the ordinal numbers are showed "Nth", instead of Nª, "and" instead of "y", etc). If I type \usepackage[spanish]{babel} and delete \selectlanguage{spanish} the bibliography is showed in Spanish. What I can do? I need to use both languages.

6
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Aug 17, 2013 at 15:53
  • 3
    I would like to point out the combination \documentclass[spanish]{..} with \usepackage[english,spanish]{babel} doesn't make Spanish the main language (the second spanish is just ignored). If you want to set spanish as the main language, you must upgrade to babel 3.9 and use \usepackage[english,main=spanish]{babel} or remove spanish from the global options. Aug 17, 2013 at 16:33
  • @JavierBezos at least all names and hyphenation are changed to Spanish, am I wrong? Aug 17, 2013 at 17:39
  • I just removed spanish from the line \documentclass[hidelinks,letterpaper,titlepage,12pt,oneside,spanish,final]{report_eie} and everything seems to work fine.
    – GregM
    Aug 17, 2013 at 19:31
  • @karlkoeller Thanks to \selectlanguage{spanish}. Without it, the language is english. On the other hand, spanish makes some additional changes when it's the main language. Aug 18, 2013 at 6:38

1 Answer 1

3

If I understand you correctly, you want Spanish entries in the bibliography to be handled like they should be in Spanish, and English entries similarly in English?

If this is the case, You'll have to use a bibtex style that is capable of switching the language for each entry in the bibliography.

biblatex package provides such a functionality, by using an additional field 'hyphenation' langid for each bibtex database entry. This field indicates the language the entry should be presented in, thus allowing biblatex to put each entry in a correct babel language environment. Then you'll get each entry in the bibliography to behave its correctly.

1
  • You might be a bit careful here, bibtex and biblatex aren't really related much besides using the same data format. Your wording can be read as is biblatex is a bibtex style, which it isn't
    – daleif
    Aug 21, 2021 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .