latex: utphys-fr.bst

File utphys-fr.bst, 27.5 KB (added by /C=FR/O=CNRS/OU=UMR5821/CN=Frederic Melot/emailAddress=frederic.melot@…, 8 years ago)
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%
3% utphys-fr.bst
4% à partir du style bibtex utphys de Jacques Distler (avec ref arXiv + lien href)
5% disponible sur http://arxiv.org/hypertex/bibstyles/
6% Francisé par J. Labbe - mai 2009
7%
8%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
10%%% Modification, J. Labbe
11% Mai 2009 :
12% * fixe 2 erreurs (@misc + empty howpublished, @article + non empty month)
13% * justifie texte
14% * small caps pour nom
15% * francisation
16
17%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18% UT Physics bibliographic style, ver. 2.2. Based on:
19%
20%X IEEE Transactions bibliography style (29-Jan-88 version)
21%X numeric labels, order-of-reference, IEEE abbreviations,
22%X quotes around article titles, commas separate all fields
23%X except after book titles and before "notes". Otherwise,
24%X much like the "plain" family, from which this is adapted.
25%X
26%X History
27%X 9/30/85 (HWT) Original version, by Howard Trickey.
28%X 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
29%X THIS `ieeetr' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
30%
31% Modifications: 1) added hypertex support and "archive", "eprint"
32% and "url" fields.
33% 2) parentheses around dates, and no "pp." for article entries
34% 3) "publisher, address" instead of "address: publisher"
35% 4) added "report" field for article entries.
36% 5) particle physics-oriented abbreviations, rather than ieee.
37% 6) added "collaboration" field, as per
38% Jonathan Flynn' suggestion. SPIRES now supports this field.
39% 7) Improved output of Proceedings entries
40%
41% Modified by Jacques Distler, 4/08
42% History: ver 1.0 9/96
43% ver 1.1 10/96 - added "collaboration" field
44% ver 1.2 7/97 - added a "\providecommand{\href}[2]{#2}"
45% to handle case where \href is not defined
46% ver 1.3 12/97 - fixed lousy-looking proceedings output.
47% ver 1.4 1/98 - fixed format.number, address in
48% proceedings entries
49% ver 1.5 3/99 - added (nonprinting) CITATION field for
50% SLAC internal use
51% ver 1.6 4/99 - Fix to ensure %%CITATION output not broken
52% across lines. Added new.sentence to ensure
53% previous output properly terminated.
54% (Moral: test before you release.)
55% ver 1.7 10/99 - "et.~al." should be "et al." Morons!
56% ver 1.8 11/99 - Changed the Web URL to the more portable
57% arxiv.org. The "archive" field functions as
58% a true base-URL. This is NOT A
59% BACKWARDS-COMPATIBLE change!
60% ver 1.8a 12/99 - MACROs for arXiv and cogprints
61% BaseURL's defined.
62% ver 1.9 6/05 - eprint support for other entry types
63% ver 2.0 4/08 - support "new-style" eprint identifiers
64% ver 2.1 4/08 - support for "url" field
65% ver 2.2 4/08 - support for "doi" field
66%
67% HyperTeX Wizardry:
68%
69% The following are equivalent:
70% archive = arXiv
71% eprint = "hep-th/9605023"
72% and
73% eprint = "hep-th/9605023"
74% both produce
75%
76% \href{http://arxiv.org/abs/hep-th/9605023}{{\tt hep-th/9605023}}
77%
78% in the bibliographic output at the appropriate point. More generally,
79% if the archive field is present, we produce a URL of the form
80% "archive/eprint" as the first argument of the \href. If absent, the base
81% URL defaults to "http://arxiv.org/abs"
82% If you are using a hypertex macropackage, like hyperref.sty, this command
83% will create a link to the eprint at Los Alamos (or wherever).
84%
85% "New-style" arXiv identifiers are also supported.
86%
87% archivePrefix = "arXiv",
88% eprint = "0707.3168",
89% primaryClass = "hep-th",
90%
91% produces
92%
93% \href{http://arxiv.org/abs/0707.3168}{{\tt arXiv:0707.3168 [hep-th]}}
94%
95% Another (non-arXiv) example:
96%
97% archive = "http://cogprints.org",
98% eprint = "5542",
99% archivePrefix = "Cogprints",
100%
101% produces
102%
103% \href{http://cogprints.org/5542}{{\tt Cogprints:5542}}
104%
105% If a
106%
107% doi = "10.xxxx"
108%
109% field is present, then the journal reference becomes a
110% clickable hyperlink to the online journal version of the paper.
111%
112% The bibtex output produced by SPIRES, while far from perfect, is pretty
113% suitable for use with this style. Indeed, this style was designed with
114% SPIRES in mind.
115
116ENTRY
117 { address
118 author
119 booktitle
120 chapter
121 edition
122 editor
123 howpublished
124 institution
125 journal
126 key
127 month
128 note
129 number
130 organization
131 pages
132 publisher
133 school
134 series
135 title
136 type
137 volume
138 year
139 archive
140 eprint
141 report
142 collaboration
143 SLACcitation
144 archivePrefix
145 primaryClass
146 url
147 doi
148 }
149 {}
150 { label }
151
152INTEGERS { output.state before.all mid.sentence after.quote after.sentence
153 after.quoted.block after.block }
154
155%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156%%% MACROS & FRANCISATION
157%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158
159%% Francisation (J. Labbe - mai 2009)
160%% à partir de unsrt-fr de markey@lsv.ens-cachan.f
161
162FUNCTION{fr.and}{ %% le "et" entre les deux derniers auteurs
163" et "
164}
165
166FUNCTION{fr.editeur}{ %% ", \'editeur" au singulier, ou " (\'editeur)"...
167", \'editeur"
168}
169
170FUNCTION{fr.editeurs}{ %% ", \'editeurs" au pluriel, ou " (\'editeurs)"...
171", \'editeurs"
172}
173
174FUNCTION{fr.collaboration}{ %% "Collaboration "
175"Collaboration "
176}
177
178FUNCTION{fr.et.al}{ %% " et~al."
179" \emph{et~al.}"
180}
181
182FUNCTION{fr.in}{ %% "In "
183"\emph{In} "
184}
185
186FUNCTION{fr.in.spc}{ %% " de " (ou " de la s\'erie ")
187" de "
188}
189
190FUNCTION{fr.of}{ %% " de "
191" de "
192}
193
194FUNCTION{fr.number}{ %% "num\'ero "
195"no.~"
196}
197
198FUNCTION{fr.number.maj}{ %% "Num\'ero "
199"No.~"
200}
201
202FUNCTION{fr.volume}{ %% "volume"
203"vol.~"
204}
205
206FUNCTION{fr.volume.maj}{ %% "Volume"
207"Volume"
208}
209
210FUNCTION{fr.edition}{ %% " \'edition"
211" \'edition"
212}
213
214FUNCTION{fr.pages}{ %% "pages"
215"p.~"
216}
217
218FUNCTION{fr.page}{ %% "page"
219"p.~"
220}
221
222FUNCTION{fr.chapter}{ %% "chapitre"
223"chapitre~"
224}
225
226FUNCTION{fr.tech.rep}{ %% "Rapport Technique"
227"Note"
228}
229
230FUNCTION{fr.master}{ %% "M\'emoire de D.E.A."
231"M\'emoire de master"
232}
233
234FUNCTION{fr.phd}{ %% "Th\`ese de doctorat"
235"Th\`ese de doctorat"
236}
237
238FUNCTION{fr.auteurs.style}{
239 %% si on veut des small caps sur le LASTNAME de l'auteur
240 %% Cette fonction est utilisee dans la definition d'une
241 %% fonction LaTeX.
242"\scshape"
243}
244
245FUNCTION{fr.ponctuation.apres.auteurs}{ %% Comme son nom l'indique...
246" : "
247}
248
249FUNCTION{fr.deuxpoints}{ %% Pour eviter l'espace avant les ":".
250"\string:\penalty500\relax "
251}
252
253
254%% Months
255MACRO {jan} {"janvier"} % MACRO {jan} {"Jan."}
256MACRO {feb} {"f\'evrier"} % MACRO {feb} {"Feb."}
257MACRO {mar} {"mars"} % MACRO {mar} {"Mar."}
258MACRO {apr} {"avril"} % MACRO {apr} {"Apr."}
259MACRO {may} {"mai"} % MACRO {may} {"May"}
260MACRO {jun} {"juin"} % MACRO {jun} {"June"}
261MACRO {jul} {"juillet"} % MACRO {jul} {"July"}
262MACRO {aug} {"ao\^ut"} % MACRO {aug} {"Aug."}
263MACRO {sep} {"septembre"} % MACRO {sep} {"Sept."}
264MACRO {oct} {"octobre"} % MACRO {oct} {"Oct."}
265MACRO {nov} {"novembre"} % MACRO {nov} {"Nov."}
266MACRO {dec} {"d\'ecembre"} % MACRO {dec} {"Dec."}
267
268%% Journals
269MACRO {nup} {"Nucl. Phys."}
270MACRO {cmp} {"Comm. Math. Phys."}
271MACRO {prl} {"Phys. Rev. Lett."}
272MACRO {pl} {"Phys. Lett."}
273MACRO {rmp} {"Rev. Mod. Phys."}
274MACRO {ijmp}{"Int. Jour. Mod. Phys."}
275MACRO {mpl} {"Mod. Phys. Lett."}
276MACRO {pr} {"Phys. Rev."}
277
278MACRO {arXiv} {"http://arxiv.org/abs"}
279MACRO {cogprints} {"http://cogprints.org"}
280MACRO {pubmed} {"http://www.ncbi.nlm.nih.gov/pubmed"}
281
282%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
283
284
285FUNCTION {init.state.consts}
286{ #0 'before.all :=
287 #1 'mid.sentence :=
288 #2 'after.quote :=
289 #3 'after.sentence :=
290 #4 'after.quoted.block :=
291 #5 'after.block :=
292}
293
294STRINGS { s t }
295
296FUNCTION {output.nonnull}
297{ 's :=
298 output.state mid.sentence =
299 { ", " * write$ }
300 { output.state after.quote =
301 { " " * write$ }
302 { output.state after.block =
303 { add.period$ write$
304 newline$
305 "\newblock " write$
306 }
307 { output.state before.all =
308 'write$
309 { output.state after.quoted.block =
310 { write$
311 newline$
312 "\newblock " write$
313 }
314 { add.period$ " " * write$ }
315 if$
316 }
317 if$
318 }
319 if$
320 }
321 if$
322 mid.sentence 'output.state :=
323 }
324 if$
325 s
326}
327
328FUNCTION {output}
329{ duplicate$ empty$
330 'pop$
331 'output.nonnull
332 if$
333}
334
335FUNCTION {output.check}
336{ 't :=
337 duplicate$ empty$
338 { pop$ "empty " t * " in " * cite$ * warning$ }
339 'output.nonnull
340 if$
341}
342
343FUNCTION {output.bibitem}
344{ newline$
345 "\bibitem{" write$
346 cite$ write$
347 "}" write$
348 newline$
349 ""
350 before.all 'output.state :=
351}
352
353FUNCTION {blank.sep}
354{ after.quote 'output.state :=
355}
356
357FUNCTION {fin.entry}
358{ output.state after.quoted.block =
359 'skip$
360 'add.period$
361 if$
362 write$
363 newline$
364}
365
366FUNCTION {new.block}
367{ output.state before.all =
368 'skip$
369 { output.state after.quote =
370 { after.quoted.block 'output.state := }
371 { after.block 'output.state := }
372 if$
373 }
374 if$
375}
376
377FUNCTION {new.sentence}
378{ output.state after.block =
379 'skip$
380 { output.state before.all =
381 'skip$
382 { after.sentence 'output.state := }
383 if$
384 }
385 if$
386}
387
388FUNCTION {not}
389{ { #0 }
390 { #1 }
391 if$
392}
393
394FUNCTION {and}
395{ 'skip$
396 { pop$ #0 }
397 if$
398}
399
400FUNCTION {or}
401{ { pop$ #1 }
402 'skip$
403 if$
404}
405
406FUNCTION {new.block.checka}
407{ empty$
408 'skip$
409 'new.block
410 if$
411}
412
413FUNCTION {new.block.checkb}
414{ empty$
415 swap$ empty$
416 and
417 'skip$
418 'new.block
419 if$
420}
421
422FUNCTION {new.sentence.checka}
423{ empty$
424 'skip$
425 'new.sentence
426 if$
427}
428
429FUNCTION {field.or.null}
430{ duplicate$ empty$
431 { pop$ "" }
432 'skip$
433 if$
434}
435
436FUNCTION {emphasize}
437{ duplicate$ empty$
438 { pop$ "" }
439 { "{\em " swap$ * "}" * }
440 if$
441}
442
443FUNCTION {smallcaps}
444{ duplicate$ empty$
445 { pop$ "" }
446 { "{\sc " swap$ * "}" * }
447 if$
448}
449
450FUNCTION {capitalize}
451{ "u" change.case$ "t" change.case$ }
452
453INTEGERS { nameptr namesleft numnames }
454
455FUNCTION {format.names}
456{ 's :=
457 #1 'nameptr :=
458 s num.names$ 'numnames :=
459 numnames 'namesleft :=
460 { namesleft #0 > }
461%%% Modif J. Labbe : small caps pour noms
462% { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
463 { s nameptr "{f.~}{vv~}\bgroup\scshape\bgroup {ll}\egroup\egroup{{}}{, jj}" format.name$ 't :=
464 nameptr #1 >
465 { namesleft #1 >
466 { ", " * t * }
467 { numnames #2 >
468 { "," * }
469 'skip$
470 if$
471%%% Modif J. Labbe : small caps pour noms
472% t "others" =
473 t "\bgroup\scshape\bgroup others\egroup\egroup{}" =
474 { " {\em et al.}" * }
475 { fr.and * t * }
476 if$
477 }
478 if$
479 }
480 't
481 if$
482 nameptr #1 + 'nameptr :=
483 namesleft #1 - 'namesleft :=
484 }
485 while$
486}
487
488FUNCTION {format.authors}
489{ author empty$
490 { "" }
491 { author format.names }
492 if$
493}
494
495FUNCTION {format.archive}
496{
497 archivePrefix empty$
498 { "" }
499 { archivePrefix fr.deuxpoints *}
500 if$
501}
502
503FUNCTION {format.primaryClass}
504{
505 primaryClass empty$
506 { "" }
507 { " [" primaryClass * "]" *}
508 if$
509}
510
511FUNCTION {format.eprint}
512{ eprint empty$
513 { ""}
514 { archive empty$
515 {"\href{http://arxiv.org/abs/" eprint * "}" *
516 "{{\tt " * format.archive * eprint *
517 format.primaryClass * "}}" *}
518 {"\href{" archive * "/" * eprint * "}" *
519 "{{\tt " * format.archive * eprint *
520 format.primaryClass * "}}" *}
521 if$
522 }
523 if$
524}
525
526FUNCTION {format.url}
527{ url empty$
528 { "" }
529 {"\url{" url * "}" *}
530 if$
531}
532
533FUNCTION {add.doi}
534{ duplicate$ empty$
535 { skip$ }
536 { doi empty$
537 {}
538 {"\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}
539 if$
540 }
541 if$
542}
543
544FUNCTION {format.report}
545{ report empty$
546 { ""}
547 { report}
548 if$
549}
550
551FUNCTION {format.editors}
552{ editor empty$
553 { "" }
554 { editor format.names
555 editor num.names$ #1 >
556 { fr.editeurs * }
557 { fr.editeur * }
558 if$
559 }
560 if$
561}
562
563FUNCTION {format.title}
564{ title empty$
565 { "" }
566 { "``" title "t" change.case$ * "''," * }
567 if$
568}
569
570FUNCTION {format.title.p}
571{ title empty$
572 { "" }
573 { "``" title "t" change.case$ * "''." * }
574 if$
575}
576
577FUNCTION {n.dashify}
578{ 't :=
579 ""
580 { t empty$ not }
581 { t #1 #1 substring$ "-" =
582 { t #1 #2 substring$ "--" = not
583 { "--" *
584 t #2 global.max$ substring$ 't :=
585 }
586 { { t #1 #1 substring$ "-" = }
587 { "-" *
588 t #2 global.max$ substring$ 't :=
589 }
590 while$
591 }
592 if$
593 }
594 { t #1 #1 substring$ *
595 t #2 global.max$ substring$ 't :=
596 }
597 if$
598 }
599 while$
600}
601
602FUNCTION {format.date}
603{ year empty$
604 { month empty$
605 { "" }
606 { "there's a month but no year in " cite$ * warning$
607 month
608 }
609 if$
610 }
611 { month empty$
612 'year
613 { month " " * year * }
614 if$
615 }
616 if$
617}
618
619FUNCTION {format.date.paren}
620{ year empty$
621 { month empty$
622 { "" }
623 { "there's a month but no year in " cite$ * warning$
624 month
625 }
626 if$
627 }
628 { month empty$
629 {"(" year * ")" *}
630 {"(" month * " " * year * ")" *}
631 if$
632 }
633 if$
634}
635
636FUNCTION {format.collaboration}
637{ collaboration empty$
638 { "" }
639 { fr.collaboration "{\bf " * collaboration * "}" *}
640 if$
641}
642
643FUNCTION {format.SLACcitation}
644{ SLACcitation empty$
645 {""}
646 { newline$ SLACcitation output "" newline$ }
647 if$
648}
649
650FUNCTION {format.btitle}
651{ title emphasize
652}
653
654FUNCTION {tie.or.space.connect}
655{ duplicate$ text.length$ #3 <
656 { "~" }
657 { " " }
658 if$
659 swap$ * *
660}
661
662FUNCTION {either.or.check}
663{ empty$
664 'pop$
665 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
666 if$
667}
668
669FUNCTION {format.bvolume}
670{ volume empty$
671 { "" }
672 { fr.volume volume *
673 series empty$
674 'skip$
675 { fr.of * series emphasize * }
676 if$
677 "volume and number" number either.or.check
678 }
679 if$
680}
681
682FUNCTION {format.number.series}
683{ volume empty$
684 { number empty$
685 { series field.or.null }
686 { output.state mid.sentence =
687 { fr.number }
688 { fr.number.maj }
689 if$
690 number *
691 series empty$
692 { "there's a number but no series in " cite$ * warning$ }
693 { fr.in.spc * series * }
694 if$
695 }
696 if$
697 }
698 { "" }
699 if$
700}
701
702FUNCTION {format.edition}
703{ edition empty$
704 { "" }
705 { output.state mid.sentence =
706 { edition "l" change.case$ fr.edition * }
707 { edition "t" change.case$ fr.edition * }
708 if$
709 }
710 if$
711}
712
713INTEGERS { multiresult }
714
715FUNCTION {multi.page.check}
716{ 't :=
717 #0 'multiresult :=
718 { multiresult not
719 t empty$ not
720 and
721 }
722 { t #1 #1 substring$
723 duplicate$ "-" =
724 swap$ duplicate$ "," =
725 swap$ "+" =
726 or or
727 { #1 'multiresult := }
728 { t #2 global.max$ substring$ 't := }
729 if$
730 }
731 while$
732 multiresult
733}
734
735FUNCTION {format.pages}
736{ pages empty$
737 { "" }
738 { pages multi.page.check
739 { fr.pages pages n.dashify * }
740 { fr.page pages * }
741 if$
742 }
743 if$
744}
745
746FUNCTION {format.pages.nopp}
747{ pages empty$
748 { "" }
749 { pages multi.page.check
750 { pages n.dashify }
751 { pages }
752 if$
753 }
754 if$
755}
756
757
758FUNCTION {format.volume}
759{ volume empty$
760 { "" }
761 { "{\bf " volume * "} " * }
762 if$
763}
764
765FUNCTION {format.number}
766{ number empty$
767 { "" }
768 { fr.number number *}
769 if$
770}
771
772FUNCTION {format.chapter.pages}
773{ chapter empty$
774 'format.pages
775 { type empty$
776 { fr.chapter chapter * }
777 { type "l" change.case$ chapter tie.or.space.connect }
778 if$
779 pages empty$
780 'skip$
781 { ", " * format.pages * }
782 if$
783 }
784 if$
785}
786
787FUNCTION {format.in.ed.booktitle}
788{ booktitle empty$
789 { "" }
790 { fr.in booktitle emphasize *
791 editor empty$
792 'skip$
793 { ", " * format.editors * }
794 if$
795 }
796 if$
797}
798
799FUNCTION {format.thesis.type}
800{ type empty$
801 'skip$
802 { pop$
803 output.state after.block =
804 { type "t" change.case$ }
805 { type "l" change.case$ }
806 if$
807 }
808 if$
809}
810
811FUNCTION {empty.misc.check}
812{ author empty$ title empty$ howpublished empty$
813 month empty$ year empty$ note empty$
814 and and and and and
815 { "all relevant fields are empty in " cite$ * warning$ }
816 'skip$
817 if$
818}
819
820FUNCTION {format.tr.number}
821{ type empty$
822 { fr.tech.rep }
823 'type
824 if$
825 number empty$
826 { "l" change.case$ }
827 { number tie.or.space.connect }
828 if$
829}
830
831FUNCTION {format.paddress}
832{ address empty$
833 { "" }
834 { "(" address * ")" * }
835 if$
836}
837
838FUNCTION {format.article.crossref}
839{ key empty$
840 { journal empty$
841 { "need key or journal for " cite$ * " to crossref " * crossref *
842 warning$
843 ""
844 }
845 { fr.in "{\em " * journal * "\/}" * }
846 if$
847 }
848 { "in " key * }
849 if$
850 " \cite{" * crossref * "}" *
851}
852
853FUNCTION {format.crossref.editor}
854{ editor #1 "{vv~}{ll}" format.name$
855 editor num.names$ duplicate$
856 #2 >
857 { pop$ fr.et.al * }
858 { #2 <
859 'skip$
860 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
861 { fr.et.al * }
862 { fr.and * editor #2 "{vv~}{ll}" format.name$ * }
863 if$
864 }
865 if$
866 }
867 if$
868}
869
870FUNCTION {format.book.crossref}
871{ volume empty$
872 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
873 fr.in
874 }
875 { fr.volume.maj volume tie.or.space.connect
876 fr.of *
877 }
878 if$
879 editor empty$
880 editor field.or.null author field.or.null =
881 or
882 { key empty$
883 { series empty$
884 { "need editor, key, or series for " cite$ * " to crossref " *
885 crossref * warning$
886 "" *
887 }
888 { "{\em " * series * "\/}" * }
889 if$
890 }
891 { key * }
892 if$
893 }
894 { format.crossref.editor * }
895 if$
896 " \cite{" * crossref * "}" *
897}
898
899FUNCTION {format.incoll.inproc.crossref}
900{ editor empty$
901 editor field.or.null author field.or.null =
902 or
903 { key empty$
904 { booktitle empty$
905 { "need editor, key, or booktitle for " cite$ * " to crossref " *
906 crossref * warning$
907 ""
908 }
909 { fr.in "{\em " * booktitle * "\/}" * }
910 if$
911 }
912 { fr.in key * }
913 if$
914 }
915 { fr.in format.crossref.editor * }
916 if$
917 " \cite{" * crossref * "}" *
918}
919
920FUNCTION {format.journal} % Modif J. Labbe - may 2009 (error with non empty month + small fix)
921{ journal missing$
922 { "" }
923 {journal emphasize " " *
924 format.volume *
925 format.date.paren *
926 pages empty$
927 {
928 month empty$
929 { " " * format.number *}
930 'skip$
931 if$
932 }
933 {
934 month empty$ number empty$ not and
935 { " " * format.number * ", " *}
936 { " " *}
937 if$
938 format.pages.nopp *
939 }
940 if$
941 }
942 if$
943}
944
945%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
946%% Document types
947
948FUNCTION {article}
949{ output.bibitem
950 format.collaboration output
951 format.authors "author" output.check
952 format.title "title" output.check
953 blank.sep
954 crossref missing$
955 { journal missing$
956 { format.date.paren output}
957 { format.journal add.doi "journal" output.check}
958 if$
959 report missing$
960 {format.eprint output}
961 {blank.sep format.report output format.eprint output}
962 if$
963 }
964 { format.article.crossref output.nonnull
965 format.pages output
966 format.eprint output
967 }
968 if$
969 new.sentence
970 format.url output
971 new.sentence
972 note output
973 new.sentence
974 format.SLACcitation output
975 fin.entry
976}
977
978FUNCTION {book}
979{ output.bibitem
980 format.collaboration output
981 author empty$
982 { format.editors "author and editor" output.check }
983 { format.authors output.nonnull
984 crossref missing$
985 { "author and editor" editor either.or.check }
986 'skip$
987 if$
988 }
989 if$
990 format.btitle add.doi "title" output.check
991 crossref missing$
992 { format.bvolume output
993 new.block
994 format.number.series output
995 new.sentence
996 publisher "publisher" output.check
997 address output
998 }
999 { new.block
1000 format.book.crossref output.nonnull
1001 }
1002 if$
1003 format.edition output
1004 format.date "year" output.check
1005 new.block
1006 format.eprint output
1007 new.block
1008 format.url output
1009 new.block
1010 note output
1011 new.sentence
1012 format.SLACcitation output
1013 fin.entry
1014}
1015
1016FUNCTION {booklet}
1017{ output.bibitem
1018 format.collaboration output
1019 format.authors output
1020 title empty$
1021 { "empty title in " cite$ * warning$
1022 howpublished new.sentence.checka
1023 }
1024 { howpublished empty$ not
1025 address empty$ month empty$ year empty$ and and
1026 or
1027 { format.title.p output.nonnull }
1028 { format.title output.nonnull }
1029 if$
1030 blank.sep
1031 }
1032 if$
1033 howpublished capitalize output
1034 address output
1035 format.date output
1036 new.block
1037 format.eprint output
1038 new.block
1039 format.url output
1040 new.block
1041 note output
1042 new.sentence
1043 format.SLACcitation output
1044 fin.entry
1045}
1046
1047FUNCTION {inbook}
1048{ output.bibitem
1049 format.collaboration output
1050 author empty$
1051 { format.editors "author and editor" output.check }
1052 { format.authors output.nonnull
1053 crossref missing$
1054 { "author and editor" editor either.or.check }
1055 'skip$
1056 if$
1057 }
1058 if$
1059 format.btitle "title" output.check
1060 crossref missing$
1061 { format.bvolume output
1062 format.chapter.pages add.doi "chapter and pages" output.check
1063 new.block
1064 format.number.series output
1065 new.block
1066 publisher "publisher" output.check
1067 address output
1068 }
1069 { format.chapter.pages add.doi "chapter and pages" output.check
1070 new.block
1071 format.book.crossref output.nonnull
1072 }
1073 if$
1074 format.edition output
1075 format.date "year" output.check
1076 new.block
1077 format.eprint output
1078 new.block
1079 format.url output
1080 new.block
1081 note output
1082 new.sentence
1083 format.SLACcitation output
1084 fin.entry
1085}
1086
1087FUNCTION {incollection}
1088{ output.bibitem
1089 format.collaboration output
1090 format.authors "author" output.check
1091 format.title add.doi "title" output.check
1092 blank.sep
1093 crossref missing$
1094 { format.in.ed.booktitle "booktitle" output.check
1095 format.bvolume output
1096 format.number.series output
1097 format.chapter.pages output
1098 new.block
1099 publisher "publisher" output.check
1100 address output
1101 format.edition output
1102 format.date "year" output.check
1103 }
1104 { format.incoll.inproc.crossref output.nonnull
1105 format.chapter.pages output
1106 }
1107 if$
1108 new.block
1109 format.eprint output
1110 new.block
1111 format.url output
1112 new.block
1113 note output
1114 new.sentence
1115 format.SLACcitation output
1116 fin.entry
1117}
1118
1119FUNCTION {inproceedings}
1120{ output.bibitem
1121 format.collaboration output
1122 format.authors "author" output.check
1123 format.title add.doi "title" output.check
1124 blank.sep
1125 crossref missing$
1126 { format.in.ed.booktitle "booktitle" output.check
1127 format.bvolume output
1128 format.number.series output
1129 format.pages output
1130 organization output
1131 new.block
1132 publisher output
1133 address output
1134 format.date "year" output.check
1135 }
1136 { format.incoll.inproc.crossref output.nonnull
1137 format.pages output
1138 }
1139 if$
1140 new.block
1141 format.eprint output
1142 new.block
1143 format.url output
1144 new.block
1145 note output
1146 new.sentence
1147 format.SLACcitation output
1148 fin.entry
1149}
1150
1151FUNCTION {conference} { inproceedings }
1152
1153FUNCTION {manual}
1154{ output.bibitem
1155 format.collaboration output
1156 author empty$
1157 { organization empty$
1158 'skip$
1159 { organization output.nonnull
1160 address output
1161 }
1162 if$
1163 }
1164 { format.authors output.nonnull }
1165 if$
1166 format.btitle "title" output.check
1167 author empty$
1168 { organization empty$
1169 { address new.block.checka
1170 address output
1171 }
1172 'skip$
1173 if$
1174 }
1175 { organization address new.block.checkb
1176 organization output
1177 address output
1178 }
1179 if$
1180 format.edition output
1181 format.date output
1182 new.block
1183 format.eprint output
1184 new.block
1185 format.url output
1186 new.block
1187 note output
1188 fin.entry
1189}
1190
1191FUNCTION {mastersthesis}
1192{ output.bibitem
1193 format.authors "author" output.check
1194 format.title add.doi "title" output.check
1195 blank.sep
1196 fr.master format.thesis.type output.nonnull
1197 school "school" output.check
1198 address output
1199 format.date "year" output.check
1200 new.block
1201 format.url output
1202 new.block
1203 note output
1204 fin.entry
1205}
1206
1207FUNCTION {misc}
1208{ output.bibitem
1209 format.collaboration output
1210 format.authors output
1211 title empty$
1212 { howpublished new.sentence.checka }
1213 { howpublished empty$ not
1214 month empty$ year empty$ and
1215 or
1216 { format.title.p output.nonnull }
1217 { format.title output.nonnull }
1218 if$
1219 blank.sep
1220 }
1221 if$
1222%%% Modif J. Labbe - May 2009
1223% howpublished capitalize output
1224 howpublished output
1225 format.date output
1226 new.block
1227 format.url output
1228 new.sentence
1229 note output
1230 new.sentence
1231 fin.entry
1232 empty.misc.check
1233}
1234
1235FUNCTION {phdthesis}
1236{ output.bibitem
1237 format.authors "author" output.check
1238 format.btitle add.doi "title" output.check
1239 new.block
1240 "Th\`ese de doctorat" format.thesis.type output.nonnull
1241 school "school" output.check
1242 address output
1243 format.date "year" output.check
1244 new.block
1245 format.eprint output
1246 new.block
1247 format.url output
1248 new.block
1249 note output
1250 new.sentence
1251 format.SLACcitation output
1252 fin.entry
1253}
1254
1255FUNCTION {course}
1256{ output.bibitem
1257 format.collaboration output
1258 format.authors "author" output.check
1259 format.title "title" output.check
1260 blank.sep
1261 organization output
1262 school "school" output.check
1263 address output
1264 format.date "year" output.check
1265 new.sentence
1266 format.url output
1267 new.sentence
1268 note output
1269 new.sentence
1270 fin.entry
1271}
1272
1273FUNCTION {proceedings}
1274{ output.bibitem
1275 editor empty$
1276 { organization output }
1277 { format.editors output.nonnull }
1278 if$
1279 format.btitle add.doi "title" output.check
1280 format.bvolume output
1281 format.number.series output
1282 editor empty$
1283 'skip$
1284 { organization output }
1285 if$
1286 new.block
1287 publisher output
1288 address output
1289 format.date "year" output.check
1290 new.block
1291 format.eprint output
1292 new.block
1293 format.url output
1294 new.block
1295 note output
1296 new.sentence
1297 format.SLACcitation output
1298 fin.entry
1299}
1300
1301FUNCTION {techreport}
1302{ output.bibitem
1303 format.collaboration output
1304 format.authors "author" output.check
1305 format.title add.doi "title" output.check
1306 blank.sep
1307 format.tr.number output.nonnull
1308 institution "institution" output.check
1309 address output
1310 format.date "year" output.check
1311 new.block
1312 format.eprint output
1313 new.block
1314 format.url output
1315 new.block
1316 note output
1317 fin.entry
1318}
1319
1320FUNCTION {unpublished}
1321{ output.bibitem
1322 format.collaboration output
1323 format.authors "author" output.check
1324 format.title.p "title" output.check
1325 blank.sep
1326 note "note" output.check
1327 format.date output
1328 new.sentence
1329 format.SLACcitation output
1330 fin.entry
1331}
1332
1333FUNCTION {default.type} { misc }
1334
1335%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1336%% Main chain
1337
1338READ
1339
1340STRINGS { longest.label }
1341
1342INTEGERS { number.label longest.label.width }
1343
1344FUNCTION {initialize.longest.label}
1345{ "" 'longest.label :=
1346 #1 'number.label :=
1347 #0 'longest.label.width :=
1348}
1349
1350FUNCTION {longest.label.pass}
1351{ number.label int.to.str$ 'label :=
1352 number.label #1 + 'number.label :=
1353 label width$ longest.label.width >
1354 { label 'longest.label :=
1355 label width$ 'longest.label.width :=
1356 }
1357 'skip$
1358 if$
1359}
1360
1361EXECUTE {initialize.longest.label}
1362
1363ITERATE {longest.label.pass}
1364
1365FUNCTION {begin.bib}
1366{ preamble$ empty$
1367 'skip$
1368 { preamble$ write$ newline$ }
1369 if$
1370 "\providecommand{\href}[2]{#2}"
1371%%% Modif J. Labbe (mai 2009) : justifier
1372% "\begingroup\raggedright\begin{thebibliography}{" * longest.label *
1373 "\begin{thebibliography}{" * longest.label *
1374 "}" * write$ newline$ }
1375
1376EXECUTE {begin.bib}
1377
1378EXECUTE {init.state.consts}
1379
1380ITERATE {call.type$}
1381
1382FUNCTION {end.bib}
1383{ newline$
1384%%% Modif J. Labbe (mai 2009) : justifier
1385% "\end{thebibliography}\endgroup" write$ newline$
1386 "\end{thebibliography}" write$ newline$
1387}
1388
1389EXECUTE {end.bib}