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?


Short answer no.

Longer answer, as an alternative to the slightly obscure

\csname adummycommand\endcsname

You could use


together with

| improve this answer | |
  • That would be quite okay but biblatex/biber don't like @PREAMBLE{\providecommand\adummy{}}. I get syntax error: found "dummy". – Ulrike Fischer Jun 6 '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 7 '14 at 5:53
  • @Malipivo that's fine in a personal project but harder to arrange if you are publishing "public" bib databases – David Carlisle Jun 7 '14 at 8: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 7 '14 at 9:35
  • @UlrikeFischer oops I fixed the answer;-) – David Carlisle Jun 7 '14 at 9:56

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.