On 30 November 2005, Guillaume Rousse said:
> I'm using Text::BibTeX to convert bibtex database to XML. I faced s=
mall
> escaping problems I was unable to solve properly.
>=20
> First, all entries keep internal formating braces.
> Such a bibtex entry:
> title =3D "Automata-based Parsing in Dynamic Programming for
> {L}inear {I}ndexed {G}rammars"
> Result in following title value:
> Automata-based Parsing in Dynamic Programming for
> {L}inear {I}ndexed {G}rammars
>=20
> Second, I was unable to convert accentued characters macros, such a=
s \'E
> to =C9, even when trying to use macro-related functions, such as
> add_macro_text('\\\'E', '=C9') or add_macro_text("\\'E", '=C9')
You're being bitten by the fact that btparse is a BibTeX parser, not =
a TeX
parser. Most BibTeX files include TeX markup, and btparse generally =
doesn't
touch that stuff. (I dimly recall some hacks for dealing with accent=
ed
characters, but don't remember the details.)
> The only solution I found is an ugly hack to add additional functio=
n in
> original Text::BibTeX namespace, so as to convert values on the fly=
:
That's pretty ugly, all right. Do you really have to meddle in the
Text::BibTeX namespace? Can't you just write your own post-processin=
g code?
It'll be the same cheezy regex hacks to handle whatever limited subse=
t of
TeX markup occurs in your .bib files, but at least it wouldn't interf=
ere with
the library's business.
Greg
--=20
Greg Ward <gw...@py...> http://www.gerg.=
ca/
=2E.. I think I'd better go back to my DESK and toy with a few common
MISAPPREHENSIONS ...
|