# How to use command \LaTeX{} in .bib like in .tex?

My .bib file contains this:

@article{shell2002use,
title={How to Use the IEEEtran LaTeX Class},
author={Shell, Michael},
journal={Journal of LATEX Class Files},
volume={1},
number={11},
pages={10--20},
year={2002}
}


and I get this:

[1] M. Shell, “How to use the ieeetran class,” Journal of LATEX Class Files, vol. 1, no. 11, pp. 10–20, 2002.


How to get the effect like use \LaTeX{} in .tex file?

-

## migrated from stackoverflow.comJan 12 '14 at 12:35

This question came from our site for professional and enthusiast programmers.

## 1 Answer

Many BibTeX bibliography style files employ sentence style to render the contents of the title field of entries of type @article, @techreport, and @misc, i.e., they turn uppercase letters (except the very first letter) into lowercase letters. You can prevent this by enclosing the words in question (and even the entire title field) inside an extra pair of braces. In your case enclosing \LaTeX{} or the entire title (better) inside a pair of braces like:

title={{How to Use the IEEEtran \LaTeX{} Class}},


makes capital letters and IEEEtran retain their attributes additionally.

MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{mybib.bib}
@article{shell2002use,
title={{How to Use the IEEEtran \LaTeX{} Class}},
author={Shell, Michael},
journal={Journal of \LaTeX{} Class Files},
volume={1},
number={11},
pages={10--20},
year={2002}
}
\end{filecontents*}
\begin{document}
\cite{shell2002use}
\bibliographystyle{unsrt}
\bibliography{mybib}
\end{document}


-
BibTeX doesn't have this happit. It's simple related to the bibliography style which uses the bibtex command change.case$ for titles. So Please clarify this. Thanks. – Marco Daniel Jan 12 '14 at 15:18 @MarcoDaniel May be. But whatever style/s I use do this. I agree with you that this is due to change.case$. I edited. Hope it is enough. Thanks for noting. –  Harish Kumar Jan 12 '14 at 15:22
I've take the liberty of rephrasing the first sentence of your answer to highlight that "sentence style", if in use, applies mainly to the title fields of certain entry types. –  Mico Jan 12 '14 at 15:34
@Mico: The power of a native speaker ;-) –  Marco Daniel Jan 12 '14 at 15:36
@Mico Thanks for the edit. :-) –  Harish Kumar Jan 12 '14 at 22:27