Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ampersand in Bibtex

1,845 views
Skip to first unread message

nutsmuggler

unread,
Dec 18, 2006, 3:42:15 AM12/18/06
to
Hello folks.
When compiling my latex document I get an error message "Misplaced
alignment tab character & ...s Universitaires de Lille (CERIUL) &".
I suppose this is because the bibtex entry has an ampersand character
in the publisher field. Here is the field:

PUBLISHER ="Presses Universitaires de Lille (CERIUL) & Colin Smythe"

I could (easily) subsitute ampersands with 'and', but I would like to
keep them, for they look much better. How do I put the ampersand
character in bibtex?
Cheers,
Davide

Juhapekka Tolvanen

unread,
Dec 18, 2006, 4:05:21 AM12/18/06
to

"nutsmuggler" <benini...@gmail.com> writes:

> PUBLISHER ="Presses Universitaires de Lille (CERIUL) & Colin Smythe"
>
> I could (easily) subsitute ampersands with 'and', but I would like to
> keep them, for they look much better. How do I put the ampersand
> character in bibtex?

Does this work?:

{\&}


--
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash juhtolv
"Yhtälailla säälittävä olen niin kuin muutkin, yksinäinen jos et tuu ja jos
sä sitten tuutkin, olen sulle kohtelias, mutta vain sen verran, että saan
sut sänkyyni tämän yhden kerran. Tilaa jo se taksi." Zen Café

nutsmuggler

unread,
Dec 18, 2006, 4:39:19 AM12/18/06
to

Juhapekka Tolvanen ha scritto:

> Does this work?:
>
> {\&}

Nope, it doesn't, I get the same error.

Dominik Waßenhoven

unread,
Dec 18, 2006, 5:00:09 AM12/18/06
to
nutsmuggler schrieb:

That is strange. Could you provide a minimal example? The one i add
works for me:

%%%%% \begin{minimal example} %%%%%
\documentclass{scrartcl}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{testbib.bib}
@BOOK{book,
author = {Buchautor, Hans-Wilhelm},
title = {Irgendein Buch},
address = {Buch am Wald},
publisher = {Presses Universitaires de Lille (CERIUL) {\&} Colin Smythe}
year = {2000}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\begin{document}
\cite{book}
\bibliographystyle{plain}
\bibliography{testbib}
\end{document}
%%%%% \end{minimal example} %%%%%

Regards,
Dominik.-

Lars Madsen

unread,
Dec 18, 2006, 5:48:07 AM12/18/06
to

did you remember to rerun bibtex such that it overwrites the .bbl file?

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl

anon k

unread,
Dec 18, 2006, 5:48:08 AM12/18/06
to

This is strange; it works in my bibliographies. Could you reproduce the
whole entry here?

nutsmuggler

unread,
Dec 18, 2006, 5:52:25 AM12/18/06
to

Dominik Waßenhoven ha scritto:

Here is an short example:

@incollection{Rafroi:-474, AUTHOR ="Rafroidi, Patrick", TITLE ="The
Irish Short Story in English: the Birth of New Tradition", BOOKTITLE
="The Irish Short Story", EDITOR ="P. Rafroidi", PUBLISHER ="Presses
Universitaires de Lille (CERIUL) {\&} Colin Smythe", ADDRESS ="Lille",
YEAR = "", PAGES = "27-38" }

The {\&} command does work, but I get the previous error nonetheless.
This happens only when printing the bibliography (not when rinting the
quotation).
Notice that I use biblatex. for my bibbliography.
I have noticed you use braces to delimitate your fields. Is that the
norm?
Cheers,
Davide

Philipp Lehman

unread,
Dec 18, 2006, 6:17:58 AM12/18/06
to
nutsmuggler wrote:

> @incollection{Rafroi:-474, AUTHOR ="Rafroidi, Patrick", TITLE ="The
> Irish Short Story in English: the Birth of New Tradition",
> BOOKTITLE ="The Irish Short Story", EDITOR ="P. Rafroidi", PUBLISHER
> ="Presses Universitaires de Lille (CERIUL) {\&} Colin Smythe",
> ADDRESS ="Lille", YEAR = "", PAGES = "27-38" }
>
> The {\&} command does work, but I get the previous error
> nonetheless.

Delete the .bbl file and try again.

Btw, there is no need to wrap the ampersand in braces, neither with
traditional Bibtex styles nor with biblatex. The following is fine:

publisher = "Presses Universitaires de Lille \& Colin Smythe",

> This happens only when printing the bibliography (not
> when rinting the quotation).

Obviously.

> Notice that I use biblatex. for my bibbliography.

It's better not to 'hard-code' the delimiters in the .bib file.
Try this instead:

publisher = "Presses Universitaires de Lille and Colin Smythe",

and in your .tex file:

\renewcommand*{\multilocsdelim}{\addspace\&\space}

See section 2.3.2 in the manual for details.

--
Sender address blackholed; do not reply to From: address.
You can still reach me by email at: plehman gmx net.

nutsmuggler

unread,
Dec 18, 2006, 7:34:46 AM12/18/06
to

Philipp Lehman ha scritto:

> Btw, there is no need to wrap the ampersand in braces, neither with
> traditional Bibtex styles nor with biblatex. The following is fine:
>
> publisher = "Presses Universitaires de Lille \& Colin Smythe",

Yes, it works fine but I get an error; both with and without braces.

> It's better not to 'hard-code' the delimiters in the .bib file.
> Try this instead:
>
> publisher = "Presses Universitaires de Lille and Colin Smythe",
>
> and in your .tex file:
>
> \renewcommand*{\multilocsdelim}{\addspace\&\space}

This works like magic, but only for the publisher field. In this
record, for example the 'and' in the editor field was not substituted:

@incollection{Carbon:1996-366, AUTHOR ="Carbonell, Ovidio", TITLE ="The
Exotic Space of Cultural Translation", BOOKTITLE ="Translation, Power,
Subversion", EDITOR ="Román Álvarez and Carmen-África Vidal",
PUBLISHER ="Multilingual Matters Ltd", ADDRESS ="Clevedon", YEAR =
"1996", PAGES = "79-98" }

nutsmuggler

unread,
Dec 18, 2006, 9:17:42 AM12/18/06
to
By the way, what is \multilocsdelim? It's in the biblatex
documentation, but it's not documented at all...

Dominik Waßenhoven

unread,
Dec 18, 2006, 9:41:57 AM12/18/06
to
nutsmuggler schrieb:

> By the way, what is \multilocsdelim? It's in the biblatex
> documentation, but it's not documented at all...
>

It is the *delim*iter of *multi*ple *loc*ation*s*, as the name indicates
(c; You could try to use \multinamedelim in the same way in order to
receive the wished appearance.

Regards,
Dominik.-

Philipp Lehman

unread,
Dec 18, 2006, 10:36:20 AM12/18/06
to
nutsmuggler wrote:

> Philipp Lehman ha scritto:


>> publisher = "Presses Universitaires de Lille \& Colin Smythe",
> Yes, it works fine but I get an error; both with and without braces.

Then you probably have an old .bbl file in your working directory.
Delete it or run Bibtex after modifying the .bib file, but *before*
running Latex.

>> It's better not to 'hard-code' the delimiters in the .bib file.
>> Try this instead:
>>
>> publisher = "Presses Universitaires de Lille and Colin Smythe",
>>
>> and in your .tex file:
>>
>> \renewcommand*{\multilocsdelim}{\addspace\&\space}
>
> This works like magic, but only for the publisher field. In this
> record, for example the 'and' in the editor field was not
> substituted:

Well, of course. There are different commands for different types of
lists. Try:

\renewcommand*{\multinamedelim}{\addcomma\space} % = default
\renewcommand*{\finalnamedelim}{\addspace\&\space}

Philipp Lehman

unread,
Dec 18, 2006, 10:37:45 AM12/18/06
to
nutsmuggler wrote:

> By the way, what is \multilocsdelim? It's in the biblatex
> documentation, but it's not documented at all...

Yes, that's one reason why the package is labelled as 'beta'.
The default definitions are all given in biblatex.def and most command
names should be (almost) self-explicatory, though.

nutsmuggler

unread,
Dec 18, 2006, 11:41:44 AM12/18/06
to
Thanks to everybody helping me here.
I had a look at the biblatex source, and found the \multinamedelimiter;
I tried to renew it after the \multilocs delimiter example

\renewcommand*{\multinamedelim}{\addspace\&\space}

Yet, there was no change in the editor field; the names are still
separated by 'and'.
I would like to understand how exactly bibtex (or biblatex) parses the
multiple names; maybe 'and' is not a proper delimiter for names...
Cheers,
Davide

Dominik Waßenhoven

unread,
Dec 18, 2006, 11:57:04 AM12/18/06
to
nutsmuggler schrieb:

> Thanks to everybody helping me here.
> I had a look at the biblatex source, and found the \multinamedelimiter;
> I tried to renew it after the \multilocs delimiter example
>
> \renewcommand*{\multinamedelim}{\addspace\&\space}
>
> Yet, there was no change in the editor field; the names are still
> separated by 'and'.


I'm sorry, you also have to edit the separator between the last two names:

\renewcommand*{\finalnamedelim}{%
\ifnum\value{liststop}>2\relax\finalandcomma\fi
\addspace\&\space}

This should work then.

Regards,
Dominik.-

--
DE-TeX-FAQ | http://www.dante.de/faq/de-tex-faq
Minimalbeispiel | http://www.minimalbeispiel.de
BibTeX-Editor | http://jabref.sourceforge.net

Philipp Lehman

unread,
Dec 18, 2006, 1:57:48 PM12/18/06
to
nutsmuggler wrote:

> Thanks to everybody helping me here.

You should read some of the replies, eventually.

> Yet, there was no change in the editor field; the names are still
> separated by 'and'.

\renewcommand*{\multinamedelim}{\addcomma\space} % = default


\renewcommand*{\finalnamedelim}{\addspace\&\space}

> I would like to understand how exactly bibtex (or biblatex) parses


> the multiple names; maybe 'and' is not a proper delimiter for
> names...

Trust me, it is.

Here's an example:

editor = {Editor1 and Editor2 and Editor3 and EditorN}

becomes

Editor1\multinamedelim Editor2\multinamedelim
Editor3\finalnamedelim EditorN

nutsmuggler

unread,
Dec 19, 2006, 3:48:17 AM12/19/06
to
Thanks a million, folks, everythings works fine now.

Yet, for the sake of understanding: Philipp Lehman's duggested this:
\renewcommand*{\multinamedelim}{\addcomma\space}


\renewcommand*{\finalnamedelim}{\addspace\&\space}

Dominik Waßenhoven suggested this


\renewcommand*{\multinamedelim}{\addspace\&\space}

\renewcommand*{\finalnamedelim}{%
\ifnum\value{liststop}>2\relax\finalandcomma\fi
\addspace\&\space}

Both solution produced the same output. Can anyone explain why?
Sorry, I'd just like to fully grasp the mechaninchs of the
\multinamedelim and \finalname delim commands

Cheers, Davide

PS:


> nutsmuggler wrote:
> > Thanks to everybody helping me here.
> You should read some of the replies, eventually.

I do prefer to test and try to understand before going back to the
thread and giving my feedback. Do I smell sarcasm here? I do smell
sarcasm. Nevermind, I am large, I contains multitudes.

Dominik Waßenhoven

unread,
Dec 19, 2006, 3:57:03 AM12/19/06
to
nutsmuggler schrieb:

> Yet, for the sake of understanding: Philipp Lehman's duggested this:
> \renewcommand*{\multinamedelim}{\addcomma\space}
> \renewcommand*{\finalnamedelim}{\addspace\&\space}
>
> Dominik Waßenhoven suggested this
> \renewcommand*{\multinamedelim}{\addspace\&\space}
> \renewcommand*{\finalnamedelim}{%
> \ifnum\value{liststop}>2\relax\finalandcomma\fi
> \addspace\&\space}
>
> Both solution produced the same output.

Only if you have not more than two authors/editors. Otherwise Philipp's
suggestion produces "Name1, Name2 & Name3", and mine produces "Name1 &
Name2 & Name3".

> Can anyone explain why?
> Sorry, I'd just like to fully grasp the mechaninchs of the
> \multinamedelim and \finalname delim commands

I can't, but I guess Philipp can, since he made the package (c;

Regards,
Dominik.-

nutsmuggler

unread,
Dec 19, 2006, 5:27:22 AM12/19/06
to

Dominik Waßenhoven ha scritto:

Ok, lovely.
Thanks again
Davide

Philipp Lehman

unread,
Dec 19, 2006, 9:25:39 AM12/19/06
to
nutsmuggler wrote:

> Yet, for the sake of understanding: Philipp Lehman's duggested this:
> \renewcommand*{\multinamedelim}{\addcomma\space}
> \renewcommand*{\finalnamedelim}{\addspace\&\space}
>
> Dominik Waßenhoven suggested this
> \renewcommand*{\multinamedelim}{\addspace\&\space}
> \renewcommand*{\finalnamedelim}{%
> \ifnum\value{liststop}>2\relax\finalandcomma\fi
> \addspace\&\space}
>
> Both solution produced the same output. Can anyone explain why?

Dominik's original suggestion was:

\renewcommand*{\multinamedelim}{\addspace\&\space}

He already explained why you also need to redefine \finalnamedelim
(you can actually leave \multinamedelim at the default). Dominik's
revised suggestion (quoted above) only differs from mine in that it
includes \finalandcomma. This macro only applies to American English
(it prints the comma before the final 'and'), so I omitted it for the
sake of simplicity. There's no harm in leaving it in there, though
(it's actually a good idea to do so). Its definition will be empty
with any language except American English.

> Sorry, I'd just like to fully grasp the mechaninchs of the
> \multinamedelim and \finalname delim commands

If you really want to get to the bottom of it, you need to read the
author guide in the manual, i.e., read about \printnames and
\printlist as well as \DeclareNameFormat and \DeclareListFormat. If
you go back to biblatex.def after that, it should be clear what
happens under the hood.

The basic idea is this. For every field or list in your .bib file,
there is a corresponding piece of code which controls how it is to be
formatted. This piece of code is called a 'formatting directive'.
It's pretty straightforward for a plain, literal field like, say,
'booktitle':

\DeclareFieldFormat{booktitle}{\emph{#1}}

If want biblatex to print all 'booktitle' fields in boldface, you
simple redefine the corresponding directive:

\DeclareFieldFormat{booktitle}{\textbf{#1}}

For an 'and'-separated list of names (e.g., 'author') or a literal
list (e.g., 'publisher') it's a bit more complicated than that
because biblatex loops over the list and executes the formatting
directive for every item in the list. For example, here's the code
which handles the 'location' (a.k.a. 'address') list:

\DeclareListFormat{location}{%
#1\isdot
\ifthenelse{\value{listcount}<\value{liststop}}
{\multilocsdelim}
{}}

You can also redefine this list formatting directive as desired, but
in most cases all users will want to do (I suppose) is modifying the
list delimiter. That's why most list and name formatting directives
are parametrized in some way or other. In the above example, the
directive doesn't print any literal punctuation (such as a literal
comma), but executes the macro \multilocsdelim instead. If you want
to modify the list delimiter, you don't need to redefine the entire
directive. You simply redefine \multilocsdelim.

Formatting directives for name lists are similar in concept, but the
code is more complex. In principle, however, \multinamedelim and
\finalnamedelim are hooked up to the directive in the same way.

nutsmuggler

unread,
Dec 19, 2006, 9:29:43 AM12/19/06
to
Ok, now it is clearer; time to go back to the manual and do some
studies.
Thanks again for the feedback,
Davide

Philipp Lehman ha scritto:

0 new messages