[OS X TeX] problem with natbib in spanish

Gilberto ah.gilberto.c at gmail.com
Sat Dec 26 21:33:04 CET 2009

I had the same problem with Natbib in Spanish when writing my disertation. The solution I found involved customizing Natbib with custom-bib (open the documentation to the makebst documentation by typing into the Terminal.app: texdoc makebst). Runing the makebst program (by typing into the Terminal.app: latex maekbst) will get you a spanishBibStyle.bst (or whatever you call it) file that will tell Natbib and BibTeX to uses all the Spanish defaults, and the ones you sellect. (You are using the Spanish option in Babel, aren't you?) There may be shortcut to this, but you won't get a citation style customized to your needs. 

Still, you'll have to do some manual editing to yourDocument.bbl file (and maybe even to your spanishBibStyle.bst file). For example, I allways have to check that my references don't have any cases such as "Freeman y Insulsa (year)" (which, to my meager knowledge, must be manually edited into "Freeman e Insulza (year)").

Gilberto Conde
ah.gilberto.c at gmail.com
P.D. If you want, I can send you (or post) my own custom style file for Spanish.

> El dia 25/12/2009, a les 13:24, Sr Sur va escriure:
>> I am a new user of Latex. I have installed Mac TeX with the Tex Live  
>> '08 version. I'm writing my PhD thesis in spanish and I have  
>> problems with natbib package. when I \cite a reference with two  
>> authors the output is "Freeman and Bermudez (year)" but the correct  
>> way in spanish would be "Freeman y Bermudez (year)". How can I put  
>> the "spanish y" instead "and"???
> The problem is not with the natbib package, but with BibTeX, the  
> bibliography-generating program. The BibTeX style files corresponding  
> to the style you want to use have such particles as "and", "of", "In",  
> "edition", etc. hard-wired, so I think the only solution is to  
> manually edit them. Here is what you should do:
> 1) Locate the style file with suffix .bst corresponding to the  
> bibliography style you are using (plainnat.bst for plain, unsrtnat.bst  
> or abbrvnat.bast ofr other styles). Duplicate it, change its name to  
> "myplainnat.bst" or the like, and store it in your ~/Library/texmf/ 
> bibtex/bst folder (create it if necesssary).
> 2) Edit the new file, with TeXShop itself or another plain text  
> editor. Locate all occurrences of the strings you want changed and  
> replace them with the corresponding Spanish ones (y, de, En, edición,  
> etc.). Keep a record of the changes by inserting comments with %. If  
> you are new to LaTeX then you will find the syntax of the bst files  
> very strange, but if you are a programer you will understand it  
> quickly (it uses reverse Polish notation). The LaTeX Companion might  
> help you here; however, it is not necessary to *understand* how it  
> works just to change these words. Keep attention to all " quoting text  
> strings.
> 3) In your document, put \bibliographystyle{myplainnat} or whatever  
> new style you have created, instead of the standard one. Do not change  
> the \usepackage{natbib} nor its options, nor the  
> \bibliography{data_bases}.
> At least this is what I did (adding then a lot of other cosmetic  
> changes, once I understood the whole process) and it worked without  
> problems.
> I hope the above is correct. Perhaps other, more knowledgeable users  
> may correct me.
> Hope this helps. natbib is a great package, and with these  
> modifications I got a terrific formatting of my citations in Catalan.
> Best,
> JMaF

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20091226/ae40285c/attachment.html>

More information about the macostex-archives mailing list