5

I am running latex2rtf on a document and have discovered that many of my BiBTex-generated references being with the sequence =2plus 43minus, like this:

=2plus 43minus 4 {American Bar Association}, \ldblquote Metadata ethics opinions around the {U.S.}\rdblquote  2013. [Online]. Available:  http://www.americanbar.org/groups/departments\\s\\do5({\fs16 o})ffices/legal\\s\\do5({\fs16 t})echnology\\s\\do5({\fs16 r})esources/resources/charts\\s\\do5({\fs16 f})yis/metadatachart.html =0pt\par

Well, that's pretty weird. So I did a Google Search for =2plus 43minus and found this kind of artifact on a variety of sites --- and even published PDFs:

Any idea what's causing this?

I am using \documentclass{article} and \bibliographystyle{IEEEtran}. The obvious short example does not generate the problem.

  • 1
    These seem to be left-over remnants of rubber lengths specified for some bibliography element (perhaps using a length measure unknown to latex2rtf). Could you include, as part of your post, the style of your bibliography, and perhaps also the original bibliography from the LaTeX source (like the .tex and/or .bbl file)? – Werner Oct 6 '13 at 0:49
  • Hm. It's strange. I tried a simple example and the problem doesn't appear. – vy32 Oct 6 '13 at 0:56
  • This seems to stem from an inability by latex2rtf to recognize \spaceskip's redefinition (inside \BIBentryALTinterwordspacing): \spaceskip=\fontdimen2\font plus \BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax. Stripping out the \fontdimen and other stuff, you receive \spaceskip=2 plus X3 minus 4 where X is most likely the value of \BIBentryALTinterwordstretchfactor. – Werner Oct 6 '13 at 1:07
  • 2
    ...you'll find that information hidden in IEEEtran.bst. – Werner Oct 6 '13 at 1:08
  • Try adding \def\BIBentryALTinterwordspacing{} just before \bibliography{references}. The definition of \BIBentryALTinterwordspacing is made using \providecommand which shouldn't happen if its already defined, skipping the odd definition altogether. – Werner Oct 6 '13 at 20:55
4

Place

\newcommand{\BIBentryALTinterwordspacing}{}
\newcommand{\BIBentrySTDinterwordspacing}{}

before \bibliography{<your bibliography>} to remove the unwanted output.


Here's a lengthier discussion and a motivation behind the solution. Consider the following example:

\documentclass[conference]{IEEEtran}
\usepackage[noadjust]{cite}
\title{This document}
\author{This author}

\begin{document}

\maketitle

\begin{abstract}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non sapien velit. 
\end{abstract}

I have cited this document \cite{Khoe:1994:CML:2288694.2294265}

\bibliographystyle{ieeetran}
\bibliography{references}
\end{document}

with references.bib:

@article{Khoe:1994:CML:2288694.2294265,
    author = {Khoe, G. -D.},
    title = {Coherent multicarrier lightwave technology for flexible capacity networks},
    journal = {Comm. Mag.},
    issue_date = {March 1994},
    volume = {32},
    number = {3},
    month = mar,
    year = {1994},
    issn = {0163-6804},
    pages = {22--33},
    numpages = {12},
    url = {http://dx.doi.org/10.1109/35.267438},
    doi = {10.1109/35.267438},
    acmid = {2294265},
    publisher = {IEEE Press},
    address = {Piscataway, NJ, USA},
}

Here's the .bbl after being processed by BibTeX:

% Generated by IEEEtran.bst, version: 1.13 (2008/09/30)
\begin{thebibliography}{1}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus
  \fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl

\bibitem{Khoe:1994:CML:2288694.2294265}
\BIBentryALTinterwordspacing
G.~D. Khoe, ``Coherent multicarrier lightwave technology for flexible capacity
  networks,'' \emph{Comm. Mag.}, vol.~32, no.~3, pp. 22--33, Mar. 1994.
  [Online]. Available: \url{http://dx.doi.org/10.1109/35.267438}
\BIBentrySTDinterwordspacing

\end{thebibliography}

and the expected output:

enter image description here

Running this file.tex through LaTeX2RTF yields:

file.tex:1   Document format <IEEEtran> unknown, using article format
file.tex:1   Package/option 'conference' unknown
file.tex:12  (file.aux)
file.bbl:4   Unknown command '\csname'
file.bbl:4   Unknown command '\endcsname'
file.bbl:25  Unknown command '\spaceskip'
file.bbl:25  Unknown command '\fontdimen'
file.bbl:25  Unknown command '\font'
file.bbl:26  Unknown command '\fontdimen'
file.bbl:26  Unknown command '\font'
file.bbl:27  Unknown command '\fontdimen'
file.bbl:27  Unknown command '\font'
file.bbl:31  Unknown command '\spaceskip'

with the incorrect output that includes the strange references:

enter image description here

With the knowledge that some commands cannot be interpreted by LaTeX2RTF (most notably \spaceskip, \fontdimen and \font, all of which occur in \BIBentryALTinterwordspacing and \BIBentrySTDinterwordspacing), inserting the definitions

\newcommand{\BIBentryALTinterwordspacing}{}
\newcommand{\BIBentrySTDinterwordspacing}{}

before calling \bibliography{references} skips the analogous \providecommands inside the .bbl, yielding the .rtf output:

enter image description here

For complete correction of the .rtf, you may have to remove other content manually (as is the case with \csname url@samestyle\endcsname.

Indeed, the LaTeX2RTF main page states:

There are drawbacks to the conversion process. In fact, don't expect any LaTeX file to be converted as you would like, don't expect it to be converted without errors or warnings, and don't be especially surprised when it doesn't convert at all. LaTeX2RTF is known to have many bugs and many missing features. Paradoxically, this number seems to grow more and more with each day. However, we can categorically state that there are some special cases in which a LaTeX file will be translated to RTF satisfactorily by LaTeX2RTF — This was sort of disclaimer, ok? OK!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.