4

I'm having trouble with how URLs are displayed in the bibliography section. The document is in Spanish, but instead of displaying "Disponible en:" before the address appears the word "Available:". As can configure this, without resort to manually modify the .bst file.

%-- Document Class
\documentclass[10pt]{article}
%-- Packages
\usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2.2cm, right=2.2cm]{geometry}
\usepackage[spanish,es-tabla]{babel}
\usepackage[noadjust]{cite}
%-- Document Fragment
\begin{document} 
     .
     .
     .
\section{Objetivos} 
 El Laboratorio de ....\cite{Momoh2012,Berger2012}.
     .
     .
\bibliographystyle{IEEEtran} 
\bibliography{myBIB}      
\end{document}

bibliography outcome

0

2 Answers 2

6

You can change the text via the IEEEtranBSTCTL special BibTeX entry, as documented in the manual (Section VII, page 7). First, add an entry of type IEEEtranBSTCTL to your .bib:

@IEEEtranBSTCTL{IEEEexample:BSTcontrol,
  CTLname_url_prefix = "[Online]. Disponible en:"
}

Then, cite this entry before using any other \cite command with a special command (provided by package IEEEtrantools or printed verbatim in the documentation):

\bstctlcite{IEEEexample:BSTcontrol}

The name of the entry is customizable.

1
  • 2
    Please add on which page one can find the information ...
    – Mensch
    Commented Feb 16, 2015 at 16:05
5

You asked,

[How] can [I] configure this, without resort to manually modify[ing] the .bst file?

The IEEEtran bibliography style does provide some switches and macros that can be redefined "on the fly" from within your TeX document and/or the bib file(s). To achieve your objective, though, it turns out to be more straightforward (in my opinion) to modify the bst file directly. Fortunately, the required edits to the bst file aren't difficult to undertake, in no small part because the language-related functions are defined near the top of the style file.

  • Find the file IEEEtran.bst in your TeX distribution. If you use TeXLive on a unix or MacOSX system, the file might be at /usr/local/texlive/2014/texmf-dist/bibtex/bst/IEEEtran/IEEEtran.bst. Make a copy of this file and call the copy, say, IEEEtran-spanish.bst. (Don't edit an original file of the TeX distribution directly.)

  • Open the file IEEEtran-spanish.bst in a TeX-aware editor and search for the line that reads

    FUNCTION {default.name.url.prefix}{ "[Online]. Available:" }
    

    In my copy of this file, it's on line 179. Change the instruction to

    FUNCTION {default.name.url.prefix}{ "[Online]. Disponible en:" }
    

    I'm afraid I don't know enough Spanish to give a suggestion on how to translate "Online".

  • While you're at it, you may also want to modify some of the string constant functions that start on line 232 of the file. E.g., you may want to change the line

    FUNCTION {bbl.and}{ "and" }
    

    to

    FUNCTION {bbl.and}{ "y" }
    
  • Similarly, you may want to change the macros, starting on line 277, that set up the abbreviations for months.

  • Save the file IEEEtran-spanish.bst. Store it either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, be sure to update the filename database of your TeX distribution suitably.

  • Start using the new bibliography style by issuing the command

    \bibliographystyle{IEEEtran-spanish}
    

    Be sure to run LaTeX, BibTeX, and LaTeX twice more to fully propagate the changes.

You must log in to answer this question.

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