[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}
From: |
Roland Winkler |
Subject: |
bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \} |
Date: |
Fri, 23 Feb 2024 09:25:52 -0600 |
Ihor Radchenko <yantar92@posteo.net> writes:
> According to https://www.bibtex.org/SpecialSymbols/, characters that
> conflict with Bibtex format description can be \-escaped.
I believe the above webpage is incorrect. If I put something like \}
into a BibTeX field, BibTeX complains about unbalanced braces.
This is with BibTeX, Version 0.99d (TeX Live 2022/Debian).
The parsing algoritm used by BibTeX is very simple. Generally,
BibTeX fields should contain valid LaTeX code. So something
like
title = "$\}$tex",
should work with BibTeX, but it gives the same error message
"unbalanced braces".
Emacs bibtex mode follows the capabilities of BibTeX itself. I believe
it would not make sense to try to be smarter than that if, in the end,
this is not compatible anymore with BibTeX itself.
I guess one could submit here a bug report / feature request for BibTeX.
But BibTeX has been around for many decades with this limited feature set.
Nowadays, there is also biblatex. It's intended as a successor for
BibTeX. But it is something I know little to nothing about because in
my world (physics), everyone I know still uses BibTeX. Essentially,
biblatex entries still use the same format as BibTeX entries. I do not
know whether biblatex would deal with something like the above in a
smarter way.
These BibTeX fields should contain valid LaTeX code. But from (La)TeX's
perspective, in the string "$\}$" the backslash is not an escape
character for what follows, but \} is a macro that's defined inside TeX
math mode. Also, the meaning of the statement "valid LaTeX code" can be
heavily redefined within (La)TeX. Take a look at texinfo files that TeX
can digest. So a smart BibTeX parser would require (La)TeX itself working
in the background.
In practical terms (for many years) I have never experienced this to be
a constraint when working with BibTeX. So changing / improving this may
have a low priority among BibTeX / biblatex maintainers.
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Ihor Radchenko, 2024/02/19
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Arash Esbati, 2024/02/23
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \},
Roland Winkler <=
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Ihor Radchenko, 2024/02/24
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Roland Winkler, 2024/02/24
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Arash Esbati, 2024/02/25
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Roland Winkler, 2024/02/25
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Arash Esbati, 2024/02/26
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Ihor Radchenko, 2024/02/26
- bug#69266: 30.0.50; bibtex-parse-entry misreads escaped \}, Roland Winkler, 2024/02/26