trying to fix page ranges in bibliography
![](https://secure.gravatar.com/avatar/5705290add533907ed4869f7e9f586c3.jpg?s=120&d=mm&r=g)
29 Jan
2011
29 Jan
'11
4:58 p.m.
Hi, I'm trying to insert the macro \pagerange into the code from texmf-context/tex/context/base/bibl-tra.mkiv but I'm quite lost. The macro should make proper page ranges from the bibtex file entries (Pages = {...}). That means remove any whitespace before and after the hyphen and double a single hyphen: 7-9 -> 7--9 1 - 3a -> 1--3a \def\pagerange#1% {\directlua{ range = string.gsub("#1", "\%s*[-\%s]+", "--") tex.sprint(range)}} Thanks for suggestions, Florian
4947
Age (days ago)
4947
Last active (days ago)
0 comments
1 participants
participants (1)
-
Florian Wobbe