3

I tried this, https://tex.stackexchange.com/a/111725/44227, it works only for string has no blank space between words in the journal entry, for example


MWE:

Case 1: without blank space in Journal entry

\begin{filecontents*}{test.bib}
 @article{ugrinovskii13,
 doi = {10.1109/tac.2013.2256675},
 author={Valery Ugrinovskii},
 volume = {58},
 number = {10},
 pages = {2659-2664},
 title = {Conditions for Detectability in Distributed Consensus-Based Observer   Networks},
 journal =TAC
     }
 \end{filecontents*}

\begin{filecontents*}{abbr.bib}
@STRING{TAC   = "IEEE trans. Automat. Contr."}
\end{filecontents*}

\documentclass{article}
\usepackage{cite}
\usepackage{url}

\begin{document}
\cite{ugrinovskii13}

\bibliographystyle{IEEEtran}
\bibliography{abbr,test}
\end{document}

Output

enter image description here

Case 2: with blank space in Journal entry

\begin{filecontents*}{test.bib}
 @article{ugrinovskii13,
 doi = {10.1109/tac.2013.2256675},
 author={Valery Ugrinovskii},
 volume = {58},
 number = {10},
 pages = {2659-2664},
 title = {Conditions for Detectability in Distributed Consensus-Based Observer   Networks},
 journal = IEEE Transactions on Automatic Control
}
 \end{filecontents*}

\begin{filecontents*}{abbr.bib}
@STRING{IEEE Transactions on Automatic Control  = "IEEE trans. Automat. Contr."}
\end{filecontents*}

\documentclass{article}
\usepackage{cite}
\usepackage{url}

\begin{document}
\cite{ugrinovskii13}

\bibliographystyle{IEEEtran}
\bibliography{abbr,test}
\end{document}

Output

enter image description here

The difference between two cases lying in journal and @STRING.

My question is that how to solve the Case 2 problem without using Case 1 solution, that is, I want preserve the journal entry in Case 2.

wayne
  • 1,331
  • how it works only for string has no blank space between words : I don't understand. Please provide a MWE – Clément Feb 09 '15 at 08:11
  • 1
    Did you try {IEEE} Tra.... instead? And t is capitalized in the compressed form. JabRef has an option to shorten or expand journal names. And it has been done already https://github.com/JabRef/reference-abbreviations/blob/master/journals/journal_abbreviations_ieee.txt – percusse Feb 09 '15 at 08:49
  • @Clément I have rewritten my question, and a MWE is provided as well. – wayne Feb 09 '15 at 08:51
  • @percusse I had updated my question, I'm afraid the previous version is not clear enough, I edited {IEEE} Tra.... in the journal and @STRING entries, it came out the same way, but IEEE instead of ieee. – wayne Feb 09 '15 at 08:58
  • @percusse I visited https://github.com/JabRef/reference-abbreviations/blob/master/journals/journal_abbreviations_ieee.txt, it seems to me it just provided a list for journal abbreviation of IEEE, what about the journal outsides the IEEE? – wayne Feb 09 '15 at 09:06
  • 1
    https://github.com/JabRef/reference-abbreviations/tree/master/journals – percusse Feb 09 '15 at 09:15

1 Answers1

6

When you do BibTeX with Case 2, you get

Database file #1: abbr.bib
I was expecting an "="---line 1 of file abbr.bib
 : @string{ieee 
 :              Transactions on Automatic Control  = "IEEE trans. Automat. Contr."}
I'm skipping whatever remains of this command

What does it mean? That a string abbreviation cannot contain spaces.

Dead end. You can't have spaces in a string abbreviation, because the BibTeX language doesn't allow it.


Why does the error message show ieee? Because BibTeX normalizes string abbreviations to lowercase; whether you type TAC tac TaC in the first example is unimportant: they all refer to the same string.


What can you do instead? Use two string files:

File abbrv.bib

@STRING{ IEEETAC = "IEEE Trans. Automat. Contr."}

File full.bib

@STRING{ IEEETAC = "IEEE Transactions on Automatic Control"}

Then you can have your item in the form

@article{ugrinovskii13,
  doi = {10.1109/tac.2013.2256675},
  author={Valery Ugrinovskii},
  volume = {58},
  number = {10},
  pages = {2659-2664},
  title = {Conditions for Detectability in Distributed Consensus-Based Observer   Networks},
  journal = IEEETAC
}

and load

\bibliography{abbr,test}

when you want abbreviated names or

\bibliography{full,test}

when you want full names.

egreg
  • 1,121,712