nxg / urlbst (http://nxg.me.uk/dist/urlbst/)
A script to add a webpage BibTeX entry type, and add support for general url and lastchecked fields, to (most) BibTeX .bst files. Optionally adds basic support for eprint and doi fields, and hypertex/hyperref support, too.
| commit 71: | 54ae6c0d6bf5 |
| parent 70: | a49ad9a3e594 |
| branch: | default |
| tags: | urlbst-0-6-2 |
We now turn on inlinelinks when we spot format.vol.num.pages,
which means we include links for those styles which don't include a
title in the citation (common for articles in physical science styles,
such as aip.sty).
Release 0.6-2
16 months ago
Changed (Δ522 bytes):
raw changeset »
configure.ac (2 lines added, 2 lines removed)
urlbst.html.in (6 lines added, 0 lines removed)
urlbst.in (13 lines added, 5 lines removed)
1 |
1 |
dnl Process this file with autoconf to produce a configure script |
2 |
2 |
AC_REVISION($Revision$) |
3 |
3 |
|
4 |
AC_INIT(urlbst, 0.6-1, norman@astro.gla.ac.uk) |
|
5 |
RELEASEDATE="2008 June 16" |
|
4 |
AC_INIT(urlbst, 0.6-2, norman@astro.gla.ac.uk) |
|
5 |
RELEASEDATE="2008 November 17" |
|
6 |
6 |
AC_SUBST(RELEASEDATE) |
7 |
7 |
|
8 |
8 |
AC_PREREQ(2.50) |
Up to file-list urlbst.html.in:
| … | … | @@ -272,6 +272,12 @@ General Public Licence.</p> |
272 |
272 |
<h2><a name='history'>Version history</a></h2> |
273 |
273 |
<dl> |
274 |
274 |
|
275 |
<dt>0.6-2, 2008 November 17</dt> |
|
276 |
<dd>We now turn on inlinelinks when we spot format.vol.num.pages, |
|
277 |
which means we include links for those styles which don't include a |
|
278 |
title in the citation (common for articles in physical science styles, |
|
279 |
such as aip.sty).</dd> |
|
280 |
||
275 |
281 |
<dt>0.6-1, 2008 June 16</dt> |
276 |
282 |
<dd>Fixed some broken links to the various citation standards (I think |
277 |
283 |
in this context this should probably <em>not</em> be happening, |
| … | … | @@ -214,7 +214,7 @@ FUNCTION {init.urlbst.variables} |
214 |
214 |
#$makehref 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs |
215 |
215 |
#$inlinelinks 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles |
216 |
216 |
% the following are internal state variables, not config constants |
217 |
#0 'makeinlinelink := % state variable managed by |
|
217 |
#0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink |
|
218 |
218 |
"" 'openinlinelink := % ditto |
219 |
219 |
"" 'closeinlinelink := % ditto |
220 |
220 |
} |
| … | … | @@ -283,12 +283,20 @@ EOD |
283 |
283 |
}; |
284 |
284 |
|
285 |
285 |
/^ *format\.b?title/ && do { |
286 |
# interpolate a call to |
|
286 |
# interpolate a call to possibly.setup.inlinelink |
|
287 |
287 |
print OUT " title empty\$ 'skip\$ 'setup\.inlinelink if\$ $mymarker\n"; |
288 |
288 |
print OUT; |
289 |
289 |
next; |
290 |
290 |
}; |
291 |
291 |
|
292 |
/^ *format\.vol\.num\.pages/ && do { |
|
293 |
# interpolate a call to possibly.setup.inlinelink |
|
294 |
s/^( *)/$1possibly.setup.inlinelink /; |
|
295 |
s/$/$mymarker/; |
|
296 |
print OUT; |
|
297 |
next; |
|
298 |
}; |
|
299 |
||
292 |
300 |
/^ *FUNCTION *\{article\}/ && do { |
293 |
301 |
|
294 |
302 |
print_missing_functions(); |
| … | … | @@ -343,7 +351,7 @@ sub print_output_functions { |
343 |
351 |
% previously set makeinlinelink true, and the two ...end.inlinelink functions |
344 |
352 |
% will only do their stuff if start.inlinelink has previously set |
345 |
353 |
% closeinlinelink to be non-empty. |
346 |
FUNCTION { |
|
354 |
FUNCTION {possibly.setup.inlinelink} |
|
347 |
355 |
{ makeinlinelink |
348 |
356 |
{ hrefform #1 = % hypertex |
349 |
357 |
{ "\special {html:<a href=" quote$ * url * quote$ * "> }{" * 'openinlinelink := |
| … | … | @@ -555,7 +563,7 @@ FUNCTION {output.bibitem} |
555 |
563 |
FUNCTION {fin.entry} |
556 |
564 |
{ output.web.refs % urlbst |
557 |
565 |
makeinlinelink % ooops, it appears we didn't have a title for inlinelink |
558 |
{ |
|
566 |
{ possibly.setup.inlinelink % add some artificial link text here, as a fallback |
|
559 |
567 |
"[link]" output.nonnull } |
560 |
568 |
'skip$ |
561 |
569 |
if$ |
| … | … | @@ -590,7 +598,7 @@ FUNCTION {webpage} |
590 |
598 |
} |
591 |
599 |
if$ |
592 |
600 |
new.block |
593 |
title empty$ 'skip$ ' |
|
601 |
title empty$ 'skip$ 'possibly.setup.inlinelink if$ |
|
594 |
602 |
format.title "title" output.check |
595 |
603 |
inbrackets "online" output |
596 |
604 |
new.block |
