Bug#466524: bibtex2html: bib2bib fails for field = "text {"}emphase{"} text"
Package: bibtex2html
Version: 1.90-2
Severity: normal
Hello,
bib2bib does not like bib files with the following format:
@InProceedings{somekey,
author = "Samuel Colin",
title = "A title that {"}confuses{"} bib2bib",
}
bib2bib -c 'author : "Colin"' <this file>
stopped on the first {"}.
The "-delimited fields are a legitimate alternative to {}-delimited
fields. Furthermore, bibclean seems to prefer the "-delimitation.
I believe this is because the lexer of bib2bib (and of bibtex2html) does not
handle braces when it has started to read a "-delimited field.
I propose the attached patch to solve the problem.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.22 (PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages bibtex2html depends on:
ii ocaml-base-nox [ocaml-base-no 3.10.0-13 Runtime system for ocaml bytecode
ii perl 5.8.8-12 Larry Wall's Practical Extraction
ii texlive-base 2007-13 TeX Live: Essential programs and f
bibtex2html recommends no packages.
-- no debconf information
--- bibtex_lexer.mll.backup 2008-02-19 10:11:52.000000000 +0100
+++ bibtex_lexer.mll 2008-02-19 10:34:19.000000000 +0100
@@ -105,6 +105,12 @@
| _ { token lexbuf }
and string = parse
+ | '{'
+ { store_string_char '{';
+ brace lexbuf;
+ store_string_char '}';
+ string lexbuf
+ }
| '"'
{ () }
| "\\\""
Reply to: