| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
\_codedecl \_undefined {BIB style (simple) <2023-09-13>} % loaded on demand by \usebib |
| 4 |
|
| 5 |
\_ifx\_optexbibstyle\_undefined \_errmessage |
| 6 |
{This file can be read by: \_string\usebib/? (simple) bibfiles command only} |
| 7 |
\_endinput \_fi |
| 8 |
|
| 9 |
% misc: |
| 10 |
|
| 11 |
\_def\_maybedot{\_ifnum\_spacefactor=\_sfcode`\.\_relax\_else.\_fi} |
| 12 |
\_tmpnum=\_sfcode`\. \_advance\_tmpnum by-2 \_sfcode`\.=\_tmpnum |
| 13 |
\_sfcode`\?=\_tmpnum \_sfcode`\!=\_tmpnum |
| 14 |
\_let\:=\_maybedot % prevents from double periods |
| 15 |
\_ifx\.\_undefined \_let\.=\_maybedot \_fi % for backward compatibility |
| 16 |
|
| 17 |
% Formatting of Author/Editor lists: |
| 18 |
|
| 19 |
\_def\_authorname{% |
| 20 |
\_addauthlist |
| 21 |
\_ifnum\_NameCount>1 |
| 22 |
\_ifnum0\_namecount=\_NameCount \_mtext{bib.and}\_else , \_fi |
| 23 |
\_fi |
| 24 |
\_bprintc\_Firstname{* }\_bprintc\_Von{* }\_Lastname\_bprintc\_Junior{, *}% |
| 25 |
} |
| 26 |
\_def\_addauthlist{% |
| 27 |
\_edef\_authlist{\_ifx\_authlist\_undefined \_else \_authlist;\_fi |
| 28 |
\_Lastname,\_Firstname,\_Von,\_Junior}% |
| 29 |
} |
| 30 |
\_let\_editorname=\_authorname |
| 31 |
|
| 32 |
% Preparing bib-mark (used when \nonumcitations is set): |
| 33 |
|
| 34 |
\_def\_setbibmark{% |
| 35 |
\_ifx\_authlist\_undefined \_def\_authlist{,;}\_fi |
| 36 |
\_RetrieveFieldIn{bibmark}\_tmp |
| 37 |
\_ifx\_tmp\_empty |
| 38 |
\_RetrieveFieldIn{year}\_tmp |
| 39 |
\_edef\_tmp{\_ea\_createbibmark\_expanded{\_tmp;\_authlist;,;,;,;}\_fin}\_fi |
| 40 |
\_bibmark=\_ea{\_tmp}% |
| 41 |
} |
| 42 |
\_def\_createbibmark#1;#2,#3\_fin{#2\_ifx^#1^\_else, #1\_fi} |
| 43 |
|
| 44 |
\_def\_preurl{\_hfil\_break} |
| 45 |
\_def\_Inclause{In:~} |
| 46 |
|
| 47 |
% Non-standard fieldnames: |
| 48 |
|
| 49 |
\_CreateField {isbn} |
| 50 |
\_CreateField {doi} |
| 51 |
\_CreateField {url} |
| 52 |
\_CreateField {bibmark} |
| 53 |
|
| 54 |
% Sorting: |
| 55 |
|
| 56 |
\_SortingOrder{name,year}{lfvj} |
| 57 |
\_SpecialSort {key} |
| 58 |
|
| 59 |
% Entry types: |
| 60 |
|
| 61 |
\_sdef{_print:END}{% |
| 62 |
\_bprinta [note] {*.}{}% |
| 63 |
\_setbibmark |
| 64 |
} |
| 65 |
\_sdef{_print:book}{% |
| 66 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 67 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 68 |
\_bprinta [edition] {*\_mtext{bib.edition}\ }{}% |
| 69 |
\_bprinta [address] {*: }{\_bibwarning}% |
| 70 |
\_bprinta [publisher] {*, }{\_bibwarning}% |
| 71 |
\_bprinta [year] {*.\ }{\_bibwarning}% |
| 72 |
\_bprinta [isbn] {ISBN~*.\ }{\_bibwarning}% |
| 73 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 74 |
} |
| 75 |
\_sdef{_print:article}{% |
| 76 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 77 |
\_bprinta [title] {*\:\ }{\_bibwarning}% |
| 78 |
\_bprintb [journal] {{\_em##1}\:\ }{\_bibwarning}% |
| 79 |
\_bprinta [year] {*\_bprintv[volume,number,pages]{,}{.} }{}% |
| 80 |
\_bprinta [volume] {* }{}% |
| 81 |
\_bprinta [number] {(*)\_bprintv[pages]{,}{.} }{}% |
| 82 |
\_bprinta [pages] {*.\ }{}% |
| 83 |
\_bprintb [doi] {DOI~\_ulink[http://dx.doi.org/##1]{##1}.\ }{}% |
| 84 |
} |
| 85 |
\_sdef{_print:inbook}{% |
| 86 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 87 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 88 |
\_Inclause |
| 89 |
\_let\_addauthlist\_relax % no read authorlist again |
| 90 |
\_bprinta [!editor] {*,~eds.\ }{}% |
| 91 |
\_bprintb [booktitle] {{\_em##1}\:\ }{\_bibwarning}% |
| 92 |
\_bprinta [address] {*: }{\_bibwarning}% |
| 93 |
\_bprinta [publisher] {*, }{\_bibwarning}% |
| 94 |
\_bprinta [year] {*.\ }{\_bibwarning}% |
| 95 |
\_bprinta [chapter] {*.\ }{% |
| 96 |
\_bprinta [pages] {*.\ }{}}% |
| 97 |
\_bprinta [isbn] {ISBN~*.\ }{}% |
| 98 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 99 |
} |
| 100 |
\_slet{_print:inproceedings}{_print:inbook} |
| 101 |
|
| 102 |
\_sdef{_print:incollection}{% |
| 103 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 104 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 105 |
\_bprinta [crossreff] {In~\_cite[*]. }{% |
| 106 |
\_bprinta [booktitle] {*. }{\_bibwarning}% |
| 107 |
\_let\_addauthlist\_relax |
| 108 |
\_bprinta [!editor] {*,~eds.\ }{\_bibwarning}% |
| 109 |
\_bprinta [edition] {*\_mtext{bib.edition}\ }{\_bibwarning}% |
| 110 |
\_bprinta [address] {*: }{\_bibwarning}% |
| 111 |
\_bprinta [publisher] {*, }{\_bibwarning}% |
| 112 |
\_bprinta [year] {*.\ }{\_bibwarning}% |
| 113 |
\_bprinta [pages] {*.\ }{}% |
| 114 |
\_bprintb [url] {\_preurl\_url{####1}. }{}}% |
| 115 |
} |
| 116 |
\_sdef{_print:conference}{% |
| 117 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 118 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 119 |
\_bprinta [edition] {*\_mtext{bib.edition}\ }{}% |
| 120 |
\_bprinta [address] {*: }{\_bibwarning}% |
| 121 |
\_bprinta [publisher] {*, }{\_bibwarning}% |
| 122 |
\_bprinta [year] {*.\ }{\_bibwarning}% |
| 123 |
\_bprinta [isbn] {ISBN~*.\ }{}% |
| 124 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 125 |
} |
| 126 |
\_sdef{_print:thesis}{% |
| 127 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 128 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 129 |
\_bprinta [type] {*,\ }{\_bibwarning}% |
| 130 |
\_bprinta [school] {*.\ }{}% |
| 131 |
\_bprinta [address] {*, }{}% |
| 132 |
\_bprinta [year] {*.\ }{}% |
| 133 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 134 |
} |
| 135 |
\_sdef{_print:proceedings}{% |
| 136 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 137 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 138 |
\_bprinta [publisher] {*.\ }{% |
| 139 |
\_bprinta [organization] {*.\ }{\_bibwarning}}% |
| 140 |
} |
| 141 |
\_sdef{_print:techreport}{% |
| 142 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 143 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 144 |
\_mtext{bib.techreport}. |
| 145 |
\_bprinta [institution] {*.\ }{}% |
| 146 |
} |
| 147 |
\_sdef{_print:booklet}{% |
| 148 |
\_bprinta [!author] {*.\ }{\_bibwarning}% |
| 149 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 150 |
\_bprinta [howpublished] {*.\ }{\_bibwarning}% |
| 151 |
} |
| 152 |
\_sdef{_print:manual}{% |
| 153 |
\_bprinta [!author] {*.\ }{}% |
| 154 |
\_bprintb [title] {{\_em##1}\:\ }{\_bibwarning}% |
| 155 |
\_bprinta [year] {*.\ }{}% |
| 156 |
\_bprinta [institution] {*.\ }{}% |
| 157 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 158 |
} |
| 159 |
\_sdef{_print:online}{% |
| 160 |
\_bprinta [!author] {*.\ }{}% |
| 161 |
\_bprintb [title] {{\_em##1}\:\ }{}% |
| 162 |
\_bprinta [howpublished] {*.\ }{}% |
| 163 |
\_bprinta [institution] {*.\ }{}% |
| 164 |
\_bprinta [series] {*.\ }{}% |
| 165 |
\_bprintb [url] {\_preurl\_url{##1}. }{\_bibwarning}% |
| 166 |
} |
| 167 |
\_sdef{_print:misc}{% |
| 168 |
\_bprinta [!author] {*.\ }{}% |
| 169 |
\_bprintb [title] {{\_em##1}\:\ }{}% |
| 170 |
\_bprinta [howpublished] {*.\ }{}% |
| 171 |
\_bprinta [institution] {*.\ }{}% |
| 172 |
\_bprinta [series] {*.\ }{}% |
| 173 |
\_bprinta [year] {*.\ }{}% |
| 174 |
\_bprintb [url] {\_preurl\_url{##1}. }{}% |
| 175 |
} |
| 176 |
|
| 177 |
%%% end of the style file |
| 178 |
|
| 179 |
\_endcode |
| 180 |
|
| 181 |
You can copy this file to bib-yourname.opm and modify it by your |
| 182 |
needs... |