Showing posts with label bibliography. Show all posts
Showing posts with label bibliography. Show all posts

Wednesday, July 17, 2013

LaTex: customise IEEEtran bibliography style with multibib package

When using multibib package, I wanted to apply and customise the IEEEtran bibliography style. It should be similar with bibentry.  However, it did not work. The function that repeated names of entries are replaced with dashes were disabled, but results showed that the dashes were still there. Searched the Internet but could not find a solution. OK, it’s time to debug.

Use LaTex multibib package

First, load the package using
\usepackage{multibib}

Then, in the preamble define new cite and bibliography commands through providing suffixes. For example

\newcites{jourl,conf}{{Journals},{Conferences}}

This command here gives two suffixes: jourl and conf. Therefore, we have the following new commands

\citejourl
\nocitejourl
\bibliographystylejourl
\bibliographyjourl

and

\citeconf
\nociteconf
\bibliographystyleconf
\bibliographyconf

When the commands with “jourl” are used, all the references will be put under the reference list, of which the name is “Journals” as defined in the \newcites command.

When the commands with “conf” are used, all the references will be put under then reference list, of which the name is “Conferences” as defined in the \newcites command.


When the document is compiled, there will be two auxiliary files: jourl.aux and conf.aux. These two files need to be compiled through BibTex.

Use IEEEtran bibliography style

Suppose the pub.bib file contains the entry

@ieeetranbstctl{BSTcontrol,
        CTLdash_repeated_names = {no},
        CTLuse_alt_spacing = {no}}

To apply this control entry to the “Journals” reference list, we should call

\bstctlcite[@auxoutjourl]{BSTcontrol_Thesis}
\bibliographystylejourl{ieeetran}
\bibliographyjourl{pub}   

Note that there is an optional argument in the \bstctlcite command which includes the suffix “jourl”. To control the "Conferences" list, simply change the optional argument accordingly.

Thursday, May 03, 2012

Latex bibentry package and IEEE bibliography style

When I used Latex bibentry package together with IEEEtran bibliography style, an error would occur:
paragraph ended before \BR@bibitem was complete.

Googled but didn't find any solution until came to this page. The solution is to use the IEEEtrantools LaTeX package. 

To use the package, load it using
\usepackage[retainorgcmds]{IEEEtrantools}

The option [retainorgcmds] asks IEEEtrantools NOT to override the standard LaTeX itemize, enumerate and description list environments.

Of course you need to load bibentry

\usepackage{bibentry}  


Add the following entry to the .bib file:

@ieeetranbstctl{BSTcontrol,
        CTLdash_repeated_names = {no},
        CTLuse_alt_spacing = {no}}

This entry is to give you the access to the IEEEtran.bst controls. CTLdash_repeated_names controls whether dashes are used for repeated names or not. CTLuse_alt_spacing controls the alternate interword spacing for bib entries with URLs. The label of the entry "BSTcontrol" can be changed as long as you use the same name in the \bstctlcite{} command.

After the \begin{document} command, add

\bstctlcite{BSTcontrol} % activate the IEEEtran controls.
\nobibliography*
\bibliographystyle{ieeetran}
Now the bibentry works well with IEEEtran style.

References:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg70594.html
http://www.michaelshell.org/tex/ieeetran/tools/
http://mirrors.ctan.org/macros/latex/contrib/IEEEtran/bibtex/IEEEtran_bst_HOWTO.pdf

Friday, May 08, 2009

Place the bibliography entry in the text

Sometimes we need to put the bibliography entry in the text, how can we do it in Latex?

The answer is to use package bibentry, which is included in natbib package.

After \beging{document}, put \nobibliography* (used with \bibliography{database}) or \nobibliography{database}. In the place where you want to show the bibliography entry, put \bibentry{label}.

In addition, \bibliographystyle{style} can be placed anywhere in the document.

Here are two examples.
1
\begin{document}
\nobibliography*
...
\bibliography{database}
\bibliographystyle{style}
\end{document}


2
\begin{document}
\nobibliography{database}
...
\bibliographystyle{style}
\end{document}

Friday, December 07, 2007

Rename bibliography title in Latex

Sometimes we need to rename the bibliography's title in Latex, for example, we want the title to be 'References'.

In the preamble, add "\renewcommand\refname{New Title}" for article type documents and "\renewcommand\bibname{New Title}" for book and report type documents.