10

I would like to add in the title field of some bib entries a dummy command which I can redefine to force e.g. a linebreak in certain cases. I need a command which normally doesn't do anything, doesn't rely on some specific package (so that the bib-file doesn't break when used without the package), which isn't used elsewhere and which I can safely redefine without breaking something.

I looked up latex.ltx but couldn't find anything suitable. Has someone an idea what I could use if I don't want to clutter the bib with \csname adummycommand\endcsname?

Ulrike Fischer
  • 327,261

1 Answers1

8

Short answer no.

Longer answer, as an alternative to the slightly obscure

\csname adummycommand\endcsname

You could use

\adummy

together with

@PREAMBLE{{\providecommand\adummy{}}}
David Carlisle
  • 757,742
  • That would be quite okay but biblatex/biber don't like @PREAMBLE{\providecommand\adummy{}}. I get syntax error: found "dummy". – Ulrike Fischer Jun 06 '14 at 17:20
  • I usually redefine some command before/after \printindex, \tableofcontents, \bibliography etc. It suits me well for forcing line breaks. For rather complicated things I define two independent commands for the same typesetted material. The disadvantage is it can lead to mistyping errors. – Malipivo Jun 07 '14 at 05:53
  • @Malipivo that's fine in a personal project but harder to arrange if you are publishing "public" bib databases – David Carlisle Jun 07 '14 at 08:56
  • @DavidCarlisle: I put to much trust in your example ;-). Even with bibtex it wouldn't work: There is a layer of braces missing. One needs to use @PREAMBLE{{\providecommand\adummy{}}} or @PREAMBLE{"\providecommand\adummy{}"}. With this correction it works with biber too. And the definition is seen by the document. Now I only have to think about a good name ;-). – Ulrike Fischer Jun 07 '14 at 09:35
  • @UlrikeFischer oops I fixed the answer;-) – David Carlisle Jun 07 '14 at 09:56