TransWikia.com

How to escape the & (ampersand) character in BibTeX?

TeX - LaTeX Asked on December 10, 2020

I would like to put a & character in a BibTeX publisher tag. Thus far I have tried:

&
{&}
{&}
"&"

with the full value enclosed in curly braces and double quotes. No matter what I do I always get a Misplaced alignment tab character &. error. Is there some special way to do this that I’m missing?

7 Answers

I have no problem with

publisher = {Harold & Maude},

and running again bibtex and pdflatex

Correct answer by user2478 on December 10, 2020

Typing backslash before the ampersand & works for me.

Answered by KenWSmith on December 10, 2020

When you've typed correctly in the .bib file but still receive errors, go check your .bbl file.

What I usually do is

  1. Delete the whole erroneous line in the .bbl file, save, then close the file.
  2. Make corrections or dummy (temporary) changes in the .bib file, then compile.

This is an example from my .bbl file:

bibitem{Mohanty2005}

A.~K. Mohanty, M.~Misra, and L.~T.
Drzal.

newblock {em {Natural Fibers,
Biopolymers, and Biocomposites}}.

newblock Taylor {&} `&` Francis Group,
Florida, 2005.

newblock ISBN-10: 0-8493-1741-X.

The & is the culprit, not {&}.

What i do is delete the whole line (newblock Taylor {&} & Francis Group, Florida, 2005.), save, then close the .bbl file. Make corrections or dummy changes in the .bib file, then compile.


You can simply delete the & in the .bbl file but the next time you make a change in the field that contains that & and compile your .bib file, the error will return.

Answered by Gula Kapas on December 10, 2020

This worked for me. After getting the same error message I typed a backslash in the .bib file:

publisher = {John Wiley & Sons},

then I went to the .bbl file and modified the entry from:

newblock John Wiley & Sons, 2nd edition.

to:

newblock John Wiley & Sons, 2nd edition.

and finally I recompiled, in my case: latex->bibtex->latex->latex->dvipdfm->view pdf. It worked :)

Answered by Thiago Parente on December 10, 2020

Clear your auxiliary files and then use the & escape.

EDIT - and by auxiliary files, I mean that many GUI-based editors have a button or menu option for doing this. If you are doing it manually, delete the .bbl file (and perhaps the .aux file) and this should help.

Answered by JeffP on December 10, 2020

& works well.

I think you should clear all the log and output files including .aux, .log, .bbl, synctex.gz and .pdf, and then recompile the source files.

Answered by Patrick on December 10, 2020

I had a strange problem that the {&}, which I thought was properly escaped, only caused an issue if it was used in the author field with biblatex.

For this field, remember to use two brackets ({{…}}) if you have a non-human name, such as an organization. Because BibLaTex/BibTex otherwise change the author name according to their citation format, and apparently this could not handle

If you cite multiple authors and some of these are not in the expected format, you can still cite them by placing the entries into brackets like this e.g.:

author = {Aldo Example and Arushit Example and {@rugk} and {Company {&} Value}},

The same error may happen with other signs like the at sign (@) that you usually can just write normally in LaTeX.

Answered by rugk on December 10, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP