diff --git a/iclr2026/iclr2026_conference.bst b/iclr2026/iclr2026_conference.bst index a85a008..7bae739 100644 --- a/iclr2026/iclr2026_conference.bst +++ b/iclr2026/iclr2026_conference.bst @@ -1,3 +1,15 @@ +%%% Modification of BibTeX style file +%%% ... by urlbst, version 0.9.1 (marked with "% urlbst") +%%% See and repository +%%% Modifications Copyright 2002–23, Norman Gray, +%%% and distributed under the terms of the LPPL; see README for discussion. +%%% +%%% Added webpage entry type, and url and lastchecked fields. +%%% Added eprint support. +%%% Added DOI support. +%%% Added PUBMED support. +%%% Original headers follow... + %% File: `iclr2024.bst' %% A copy of iclm2010.bst, which is a modification of `plainnl.bst' for use with natbib package %% @@ -53,7 +65,7 @@ ENTRY author booktitle chapter - doi + %doi eid edition editor @@ -73,17 +85,72 @@ ENTRY series title type - url + %url volume year + eprint % urlbst + doi % urlbst + pubmed % urlbst + url % urlbst + lastchecked % urlbst } {} { label extra.label sort.label short.list } INTEGERS { output.state before.all mid.sentence after.sentence after.block } +% urlbst... +% urlbst constants and state variables +STRINGS { urlintro + eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl + citedstring onlinestring linktextstring + inlinelinkurl } +INTEGERS { hrefform doiform inlinelinks makeinlinelink + addeprints adddoi addpubmed } +FUNCTION {init.urlbst.variables} +{ + % The following constants may be adjusted by hand, if desired + + % The first set allow you to enable or disable certain functionality. + #1 'addpubmed := % 0=no PUBMED resolver; 1=include it + #0 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs + #1 'addeprints := % 0=no eprints; 1=include eprints + #0 'doiform := % 0=with href; 1=with \doi{} + #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles + #1 'adddoi := % 0=no DOI resolver; 1=include it + + % String constants, which you _might_ want to tweak. + "online" 'onlinestring := % label that a resource is online + "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED + "cited " 'citedstring := % label in "lastchecked" remark + "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref + "arXiv:" 'eprintprefix := % text prefix printed before eprint ref + "[link]" 'linktextstring := % anonymous link text + "doi:" 'doiprefix := % printed text to introduce DOI + "https://doi.org/" 'doiurl := % prefix to make URL from DOI + "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref + "URL: " 'urlintro := % text prefix before URL + + % The following are internal state variables, not configuration constants, + % so they shouldn't be fiddled with. + #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink + "" 'inlinelinkurl := +} +INTEGERS { + bracket.state + outside.brackets + open.brackets + within.brackets + close.brackets +} +% ...urlbst to here FUNCTION {init.state.consts} -{ #0 'before.all := +{ #0 'outside.brackets := % urlbst... + #1 'open.brackets := + #2 'within.brackets := + #3 'close.brackets := % ...urlbst to here + + #0 'before.all := #1 'mid.sentence := #2 'after.sentence := #3 'after.block := @@ -91,7 +158,8 @@ FUNCTION {init.state.consts} STRINGS { s t } -FUNCTION {output.nonnull} +% urlbst +FUNCTION {output.nonnull.original} { 's := output.state mid.sentence = { ", " * write$ } @@ -112,6 +180,154 @@ FUNCTION {output.nonnull} s } +% urlbst... +% Functions for making hypertext links. +% In all cases, the stack has (link-text href-url path-p) +% If path-p is true (non-zero) then the link-test may need escaping, +% because it's URL/path-like +% +% make 'null' specials +FUNCTION {make.href.null} +{ + pop$ pop$ +} +% make hypertex specials +FUNCTION {make.href.hypertex} +{ pop$ + "\special {html: }" * swap$ * + "\special {html:}" * +} +% make hyperref specials +% (the space between "} {" matters: a URL of just the right length can cause "\% newline em") +FUNCTION {make.href.hyperref} +{ { "\href {" swap$ * "} {\path{" * swap$ * "}}" * } + { "\href {" swap$ * "} {" * swap$ * "}" * } + if$ +} +FUNCTION {make.href} +{ hrefform #2 = + 'make.href.hyperref % hrefform = 2 + { hrefform #1 = + 'make.href.hypertex % hrefform = 1 + 'make.href.null % hrefform = 0 (or anything else) + if$ + } + if$ +} + +% Minimal DOI parsing. +% Given a DOI on the stack, check whether it starts with 'doiurl' or not. +% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix. +FUNCTION {parse.doi} +{ + #1 doiurl text.length$ substring$ + doiurl = + { doi + doi doiurl text.length$ #1 + #999 substring$ } + { doiurl doi * + doi } + if$ +} +% The following two functions are for handling inlinelink. They wrap +% a block of text which is potentially output with write$ by multiple +% other functions, so we don't know the content a priori. +% They communicate between each other using the variables makeinlinelink +% (which is true if a link should be made), and closeinlinelink (which holds +% the string which should close any current link. They can be called +% at any time, but start.inlinelink will be a no-op unless something has +% previously set makeinlinelink true, and the two ...end.inlinelink functions +% will only do their stuff if start.inlinelink has previously set +% closeinlinelink to be non-empty. +% (thanks to 'ijvm' for suggested code here) +FUNCTION {uand} +{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file) +FUNCTION {possibly.setup.inlinelink} +{ makeinlinelink hrefform #0 > uand + { doi empty$ adddoi uand + { pubmed empty$ addpubmed uand + { eprint empty$ addeprints uand + { url empty$ + { "" } + { url } + if$ } + { eprinturl eprint * } + if$ } + { pubmedurl pubmed * } + if$ } +% { doiurl doi * } + { doi empty$ + { "XXX" } + { doi parse.doi pop$ } + if$ + } + if$ + % an appropriately-formatted URL is now on the stack + 'inlinelinkurl := + #0 'makeinlinelink := + } + 'skip$ + if$ % makeinlinelink +} +FUNCTION {add.inlinelink} +{ inlinelinkurl empty$ + 'skip$ + { inlinelinkurl #0 make.href + "" 'inlinelinkurl := + } + if$ +} +FUNCTION {output.nonnull} +{ % Save the thing we've been asked to output + 's := + % If the bracket-state is close.brackets, then add a close-bracket to + % what is currently at the top of the stack, and set bracket.state + % to outside.brackets + bracket.state close.brackets = + { "]" * + outside.brackets 'bracket.state := + } + 'skip$ + if$ + bracket.state outside.brackets = + { % We're outside all brackets -- this is the normal situation. + % Write out what's currently at the top of the stack, using the + % original output.nonnull function. + s + add.inlinelink + output.nonnull.original % invoke the original output.nonnull + } + { % Still in brackets. Add open-bracket or (continuation) comma, add the + % new text (in s) to the top of the stack, and move to the close-brackets + % state, ready for next time (unless inbrackets resets it). If we come + % into this branch, then output.state is carefully undisturbed. + bracket.state open.brackets = + { " [" * } + { ", " * } % bracket.state will be within.brackets + if$ + s * + close.brackets 'bracket.state := + } + if$ +} + +% Call this function just before adding something which should be presented in +% brackets. bracket.state is handled specially within output.nonnull. +FUNCTION {inbrackets} +{ bracket.state close.brackets = + { within.brackets 'bracket.state := } % reset the state: not open nor closed + { open.brackets 'bracket.state := } + if$ +} + +FUNCTION {format.lastchecked} +{ lastchecked empty$ + { "" } + { inbrackets citedstring lastchecked * } + if$ +} +% ...urlbst to here + FUNCTION {output} { duplicate$ empty$ 'pop$ @@ -127,7 +343,7 @@ FUNCTION {output.check} if$ } -FUNCTION {fin.entry} +FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below) { add.period$ write$ newline$ @@ -286,14 +502,14 @@ FUNCTION {format.issn} if$ } -FUNCTION {format.url} +FUNCTION {format.url.legacy} { url empty$ { "" } { new.block "URL \url{" url * "}" * } if$ } -FUNCTION {format.doi} +FUNCTION {format.doi.legacy} { doi empty$ { "" } { new.block "\doi{" doi * "}" * } @@ -377,7 +593,7 @@ FUNCTION {make.full.names} if$ } -FUNCTION {output.bibitem} +FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below) { newline$ "\bibitem[" write$ label write$ @@ -700,11 +916,174 @@ FUNCTION {format.incoll.inproc.crossref} " \citet{" * crossref * "}" * } +% urlbst... +% If inlinelinks is true, then format.url should be a no-op, since it's +% (a) redundant, and (b) could end up as a link-within-a-link. +% Here, we don't use the general make.href mechanism, because each of +% the hrefform possibilities has a specific \url{...} macro +% designed for this case. +FUNCTION {format.url} +{ inlinelinks #1 = url empty$ or + { "" } + { hrefform #1 = + { % special case -- add HyperTeX specials + urlintro "\url{" url * "}" * url make.href.hypertex * } + { urlintro "\url{" * url * "}" * } + if$ + } + if$ +} +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprintprefix eprint * eprinturl eprint * #0 make.href } + if$ +} + +FUNCTION {format.doi} +{ doi empty$ + { "" } + { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack + 's := 't := + doiform #1 = + { "\doi{" s * "}" * } + { doiprefix s * t #1 make.href } + if$ + } + if$ +} + +FUNCTION {format.pubmed} +{ pubmed empty$ + { "" } + { pubmedprefix pubmed * pubmedurl pubmed * #0 make.href } + if$ +} + +% Output a URL. We can't use the more normal idiom (something like +% `format.url output'), because the `inbrackets' within +% format.lastchecked applies to everything between calls to `output', +% so that `format.url format.lastchecked * output' ends up with both +% the URL and the lastchecked in brackets. +FUNCTION {output.url} +{ url empty$ + 'skip$ + { new.block + format.url output + format.lastchecked output + } + if$ +} + +FUNCTION {output.web.refs} +{ + new.block + inlinelinks + 'skip$ % links were inline -- don't repeat them + { % If the generated DOI will be the same as the URL, + % then don't print the URL (thanks to Joseph Wright + % for (the original version of) this code, + % at http://tex.stackexchange.com/questions/5660) + adddoi + doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated + url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty + = % are the strings equal? + and + 'skip$ + { output.url } + if$ + addeprints eprint empty$ not and + { format.eprint output.nonnull } + 'skip$ + if$ + adddoi doi empty$ not and + { format.doi output.nonnull } + 'skip$ + if$ + addpubmed pubmed empty$ not and + { format.pubmed output.nonnull } + 'skip$ + if$ + } + if$ +} + +% Wrapper for output.bibitem.original. +% If the URL field is not empty, set makeinlinelink to be true, +% so that an inline link will be started at the next opportunity +FUNCTION {output.bibitem} +{ outside.brackets 'bracket.state := + output.bibitem.original + inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and + { #1 'makeinlinelink := } + { #0 'makeinlinelink := } + if$ +} + +% Wrapper for fin.entry.original +FUNCTION {fin.entry} +{ output.web.refs % urlbst + makeinlinelink % ooops, it appears we didn't have a title for inlinelink + { possibly.setup.inlinelink % add some artificial link text here, as a fallback + linktextstring output.nonnull } + 'skip$ + if$ + bracket.state close.brackets = % urlbst + { "]" * } + 'skip$ + if$ + fin.entry.original +} + +% Webpage entry type. +% Title and url fields required; +% author, note, year, month, and lastchecked fields optional +% See references +% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm +% http://www.classroom.net/classroom/CitingNetResources.html +% http://neal.ctstateu.edu/history/cite.html +% http://www.cas.usf.edu/english/walker/mla.html +% for citation formats for web pages. +FUNCTION {webpage} +{ output.bibitem + author empty$ + { editor empty$ + 'skip$ % author and editor both optional + { format.editors output.nonnull } + if$ + } + { editor empty$ + { format.authors output.nonnull } + { "can't use both author and editor fields in " cite$ * warning$ } + if$ + } + if$ + new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ + format.title "title" output.check + inbrackets onlinestring output + new.block + year empty$ + 'skip$ + { format.date "year" output.check } + if$ + % We don't need to output the URL details ('lastchecked' and 'url'), + % because fin.entry does that for us, using output.web.refs. The only + % reason we would want to put them here is if we were to decide that + % they should go in front of the rather miscellaneous information in 'note'. + new.block + note output + fin.entry +} +% ...urlbst to here + + FUNCTION {article} { output.bibitem format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block crossref missing$ @@ -723,8 +1102,6 @@ FUNCTION {article} } if$ format.issn output - format.doi output - format.url output new.block note output fin.entry @@ -744,6 +1121,7 @@ FUNCTION {book} } if$ new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.btitle "title" output.check crossref missing$ { format.bvolume output @@ -772,6 +1150,7 @@ FUNCTION {booklet} format.authors output author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check howpublished address new.block.checkb howpublished output @@ -799,6 +1178,7 @@ FUNCTION {inbook} } if$ new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.btitle "title" output.check crossref missing$ { format.bvolume output @@ -829,6 +1209,7 @@ FUNCTION {incollection} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block crossref missing$ @@ -859,6 +1240,7 @@ FUNCTION {inproceedings} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block crossref missing$ @@ -885,8 +1267,6 @@ FUNCTION {inproceedings} } if$ format.isbn output - format.doi output - format.url output new.block note output fin.entry @@ -899,6 +1279,7 @@ FUNCTION {manual} format.authors output author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.btitle "title" output.check organization address new.block.checkb organization output @@ -916,6 +1297,7 @@ FUNCTION {mastersthesis} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block "Master's thesis" format.thesis.type output.nonnull @@ -933,12 +1315,12 @@ FUNCTION {misc} format.authors output author format.key output title howpublished new.block.checkb + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title output howpublished new.block.checka howpublished output format.date output format.issn output - format.url output new.block note output fin.entry @@ -950,6 +1332,7 @@ FUNCTION {phdthesis} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.btitle "title" output.check new.block "PhD thesis" format.thesis.type output.nonnull @@ -967,6 +1350,7 @@ FUNCTION {proceedings} format.editors output editor format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.btitle "title" output.check format.bvolume output format.number.series output @@ -988,6 +1372,7 @@ FUNCTION {techreport} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block format.tr.number output.nonnull @@ -1005,6 +1390,7 @@ FUNCTION {unpublished} format.authors "author" output.check author format.key output new.block + title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst format.title "title" output.check new.block note "note" output.check @@ -1428,6 +1814,7 @@ FUNCTION {begin.bib} EXECUTE {begin.bib} +EXECUTE {init.urlbst.variables} % urlbst EXECUTE {init.state.consts} ITERATE {call.type$}