[Tex/LaTex] bibtex format for url reference

bibtexieeetran

How do I add a note after a URL in URL reference using BibTeX in IEEE format? My code looks like this

@misc{thz_net,
 title={Terahertz applications },
 url={http://thznetwork.net/index.php/thz-images},
 note={(Date last accessed 15-July-2014)},
 }

Note appears before the url like this

[2] “Terahertz applications,” (Date last accessed 15-July-2014). [Online].
Available: http://thznetwork.net/index.php/thz-images

I'd like the note to appear after the URL. How can I achieve it?

Best Answer

It turns out that modifying a copy of the file IEEEtran.bst to achieve your objective is not particular difficult. I suggest you perform the following steps:

  • Find the file IEEEtran.bst in your TeX distribution. (If you run TeXLive, it probably resides at /usr/local/texlive/2014/texmf-dist/bibtex/bst/IEEEtran/.)

  • Make a copy of this file -- don't edit a file from your TeX distribution directly -- and call the copy, say, myIEEEtran.bst.

  • Open the file myIEEEtran.bst in your favorite text editor. The editor you use for your .tex files will do fine.

  • Find the function called misc. (In my copy of this file, the function misc starts on line 2144.)

  • In this function, locate the two lines that say

      format.note output
      format.url output
    

    Exchange the ordering of these two lines so that format.url will be executed before format.note.

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

  • Start using the "new" bibliography style file by issuing the instruction

    \bibliographystyle{myIEEEtran.bst}
    

    The first time you use the new style file, be sure to run LaTeX, BibTeX, and LaTeX twice more to propagate all changes.

Happy BibTeXing!

enter image description here

\documentclass{article}
\usepackage{filecontents,url}
\begin{filecontents*}{\jobname.bib}
@misc{thz_net,
 title={Terahertz applications },
 url={http://thznetwork.net/index.php/thz-images},
 note={(Date last accessed 15-July-2014)},
 }
\end{filecontents*}
\bibliographystyle{myIEEEtran}
\begin{document}
\nocite{*}
\bibliography{\jobname}
\end{document}