Skip to content

Commit e530248

Browse files
committed
Incorrect representation of citation
In case we have a bibtex entry like: ``` @Manual{ cgal:as-lum ,author = {Algorithmic Solutions} ,title = {The {LEDA} {U}ser {M}anual} ,organization = {Algorithmic Solutions} ,address = {66123 Saarbr\"ucken, Germany} ,url = {http://www.algorithmic-solutions.info/leda_manual/MANUAL.html} } ``` this is rendered / referenced like: ``` [Solutions] Algorithmic Solutions. The LEDA User Manual. Algorithmic Solutions, 66123 Saarbrücken, Germany. ``` instead of ``` [2] Algorithmic Solutions. The LEDA User Manual. Algorithmic Solutions, 66123 Saarbrücken, Germany. ``` The problem is that in the resulting "bbl" file from the bibtex command we have the line: ``` <dt><a name="CITEREF_cgal:as-lum">[Solutions]</a></dt><dd>\bibxhtmlname{Algorithmic Solutions}. ``` instead of (from another entry): ``` <dt><a name="CITEREF_cgal:mog-vbcfe-11">[Merigot et~al., 2011]</a></dt><dd>\bibxhtmlname{Quentin Merigot}, \bibxhtmlname{Maks ``` Note the `\n` after the `<a` instead of the (expected) space. This has been corrected in the regular expression (Note: we need to use `[ \n][ \n]*` as we cannot use the equivalent `[ \n]+` as the `+`- sign has here a different meaning).
1 parent f94a2f3 commit e530248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/html/bib2xhtml.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ sub html_ent {
198198
next loop;
199199
}
200200
$nentry++;
201-
($bcite, $blabel) = m+<dt><a name=\"([^\"]*)\">\[([^\]]*)\]</a></dt><dd>+;
201+
($bcite, $blabel) = m+<dt><a[ \n][ \n]*name=\"([^\"]*)\">\[([^\]]*)\]</a></dt><dd>+;
202202
$blabel = "$nentry";
203203
$bibcite{$bcite} = $blabel;
204204
}
@@ -222,7 +222,7 @@ sub html_ent {
222222
}
223223
s/\%\n//g;
224224
s/(\.(<\/cite>|<\/a>|\')+)\./$1/g;
225-
s:(<dt><a name=\"[^\"]*\">\[)[^\]]*(\]</a></dt><dd>):$1$nentry$2:;
225+
s:(<dt><a[ \n][ \n]*name=\"[^\"]*\">\[)[^\]]*(\]</a></dt><dd>):$1$nentry$2:;
226226
while (m/(\\(cite(label)?)(\001\d+)\{([^\001]+)\4\})/) {
227227
$old = $1;
228228
$cmd = $2;

0 commit comments

Comments
 (0)