├── beamer.pdf ├── README.md ├── style ├── logo │ ├── QSY.pdf │ ├── ZJDX.pdf │ ├── QSY-blue.pdf │ ├── QSY-white.pdf │ ├── ZJDX.sketch │ ├── ZJDX-tight.pdf │ ├── background.pdf │ ├── ZJDX-tight-white.pdf │ └── background.graffle │ │ ├── data.plist │ │ └── image2.pdf ├── zjubeamer.sty └── gbt7714-2005.bst ├── .latexmkrc ├── content ├── references.tex ├── idea.tex ├── background.tex ├── conclusion.tex ├── figures.tex ├── title.tex ├── achievements.tex ├── content.tex └── symbols.tex ├── beamer.bib ├── LICENSE ├── beamer.tex └── .gitignore /beamer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/beamer.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zju-beamer-theme 2 | Beamer theme for oral defense in Zhejiang University. 3 | -------------------------------------------------------------------------------- /style/logo/QSY.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/QSY.pdf -------------------------------------------------------------------------------- /style/logo/ZJDX.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/ZJDX.pdf -------------------------------------------------------------------------------- /style/logo/QSY-blue.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/QSY-blue.pdf -------------------------------------------------------------------------------- /style/logo/QSY-white.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/QSY-white.pdf -------------------------------------------------------------------------------- /style/logo/ZJDX.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/ZJDX.sketch -------------------------------------------------------------------------------- /style/logo/ZJDX-tight.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/ZJDX-tight.pdf -------------------------------------------------------------------------------- /style/logo/background.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/background.pdf -------------------------------------------------------------------------------- /style/logo/ZJDX-tight-white.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/ZJDX-tight-white.pdf -------------------------------------------------------------------------------- /style/logo/background.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/background.graffle/data.plist -------------------------------------------------------------------------------- /style/logo/background.graffle/image2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corenel/zju-beamer-theme/HEAD/style/logo/background.graffle/image2.pdf -------------------------------------------------------------------------------- /.latexmkrc: -------------------------------------------------------------------------------- 1 | $pdflatex = 'xelatex -synctex=1 -interaction=nonstopmode --shell-escape %O %S'; 2 | $pdf_mode = 1; 3 | $preview_mode = 1; 4 | $postscript_mode = $dvi_mode = 0; 5 | -------------------------------------------------------------------------------- /content/references.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \begin{frame}[allowframebreaks]{参考文献} 5 | \bibliographystyle{style/gbt7714-2005} 6 | \bibliography{beamer} 7 | \end{frame} 8 | 9 | -------------------------------------------------------------------------------- /content/idea.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \section{研究思路} 5 | \label{sec:idea} 6 | 7 | \begin{comment} 8 | 全文工作思路,1-2页。理清逻辑,让观众到此明白问题轮廓和自己的工作全貌。 9 | \end{comment} 10 | 11 | \begin{frame}{思路} 12 | 摸鱼必不可少。需要学会摸鱼。如何优雅地摸鱼。 13 | \end{frame} 14 | % section 研究思路 (end) 15 | -------------------------------------------------------------------------------- /content/background.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \section{研究背景} 5 | \label{sec:background} 6 | 7 | \begin{comment} 8 | 背景介绍尽量简练,2-3页为宜,但信息量要足。 9 | 目的是给出研究背景(对应选题意义)、现状,总结当前工作的不足,从而引出自己的工作。 10 | \end{comment} 11 | 12 | \begin{frame}{摸鱼} 13 | 摸鱼是人类生存的必要条件\cite{Karras2019AnalyzingAI,Heusel2017GANsTB}。 14 | \end{frame} 15 | % section 研究背景 (end) 16 | -------------------------------------------------------------------------------- /content/conclusion.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \section{总结与展望} 5 | \label{sec:conclusion} 6 | 7 | \begin{comment} 8 | 最后一定要有总结,突出个人工作和结果 9 | 展望和工作的不足之处不宜多,淡化处理。 10 | 致谢可以写,但要简练,并且不要照着读,一句话即可,如:“最后,感谢所有关心和帮助过我的每一个人,感谢各位专家和评委老师”。 11 | \end{comment} 12 | 13 | \begin{frame}{总结} 14 | 还是摸鱼适合老子。 15 | \end{frame} 16 | 17 | \begin{frame}{展望} 18 | 今后也要做一条快乐摸鱼的咸鱼。 19 | \end{frame} 20 | % section 总结与展望 (end) 21 | 22 | -------------------------------------------------------------------------------- /content/figures.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \newcommand{\imageplaceholder}{ 5 | \begin{figure}[ht] 6 | \centering 7 | \includegraphics[width=0.95\linewidth]{example-image-duck} 8 | \caption{Image placeholder.} 9 | \end{figure} 10 | } 11 | 12 | \newcommand{\tinyimageplaceholder}{ 13 | \begin{figure}[ht] 14 | \centering 15 | \includegraphics[width=0.50\linewidth]{example-image-duck} 16 | \caption{Image placeholder.} 17 | \end{figure} 18 | } 19 | -------------------------------------------------------------------------------- /content/title.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | % 标题页 5 | \begin{frame} 6 | \titlepage 7 | 8 | \note[item]{ 9 | 各位老师、同学,上午好! 10 | 我是咸鱼。 11 | 今天我要答辩的论文题目是“基于自监督学习的摸鱼神经网络”。 12 | } 13 | \end{frame} 14 | 15 | % 提纲页 16 | \section*{目录} 17 | \label{sec:toc} 18 | 19 | \begin{comment} 20 | PPT主要内容不需照着念,略一停留就可进入背景介绍。 21 | \end{comment} 22 | 23 | \begin{frame} 24 | \frametitle{\textbf{目录}} 25 | \textbf{\tableofcontents} 26 | \end{frame} 27 | % section* 目录 (end) 28 | 29 | -------------------------------------------------------------------------------- /content/achievements.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \section*{研究成果} 5 | \label{sec:achievements} 6 | 7 | \begin{frame}{研究成果} 8 | \begin{block}{攻读学位期间取得的科研成果} 9 | \begin{itemize} 10 | \item 发明专利“一种基于自监督学习的工作摸鱼方法”已受理。发明人:老咸鱼,咸鱼。 11 | \item Salty Fish, and Old Salty Fish. "SlackNet: Slacking Off Happily via Self-Supervised Learning." IEEE Transactions on Slacking Off. TSO期刊(ZJUTop,CCF-A类), 已录用,IF 9999。 12 | \end{itemize} 13 | \end{block} 14 | \end{frame} 15 | % section* 研究成果 (end) 16 | -------------------------------------------------------------------------------- /content/content.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | \section{研究内容} 5 | \label{sec:content} 6 | 7 | \begin{comment} 8 | 讲解自己的详细工作要突出思路和重点。 9 | 不一定在语言表达上涉及太多细节,比如,用过多公式讲解他人的工作步骤应避免,属于自己的工作要在视觉和语言上进行标注和区别。实验结果的表示要精炼,让人容易理解。 10 | 对比试验要公平,有说服力,对比对象要新,要有对比意义,从而体现自己的工作价值(这是研究方法和论文写作阶段都有的问题,但是答辩时常被质问)。 11 | 讲解包含可能的额外演示。 12 | \end{comment} 13 | 14 | \begin{frame}{网络设计} 15 | 端到端的摸鱼神经网络设计。 16 | \end{frame} 17 | 18 | \begin{frame}{实验结果} 19 | 本文提出的方法使得摸鱼效率与准确率提升了50\%。 20 | \end{frame} 21 | % section 研究内容 (end) 22 | 23 | -------------------------------------------------------------------------------- /beamer.bib: -------------------------------------------------------------------------------- 1 | @article{Karras2019AnalyzingAI, 2 | title={Analyzing and Improving the Image Quality of StyleGAN}, 3 | author={Tero Karras and Samuli Laine and Miika Aittala and Janne Hellsten and Jaakko Lehtinen and Timo Aila}, 4 | journal={ArXiv}, 5 | year={2019}, 6 | volume={abs/1912.04958} 7 | } 8 | @inproceedings{Heusel2017GANsTB, 9 | title={GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium}, 10 | author={Martin Heusel and Hubert Ramsauer and Thomas Unterthiner and Bernhard Nessler and Sepp Hochreiter}, 11 | booktitle={Advances in Neural Information Processing Systems (NeurIPS)}, 12 | year={2017} 13 | } 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Yusu Pan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /beamer.tex: -------------------------------------------------------------------------------- 1 | % 设置为 Beamer 文档类型,设置字体为 10pt,长宽比为16:9,数学字体为 serif 风格 2 | \documentclass[10pt,aspectratio=169,mathserif]{ctexbeamer} 3 | 4 | %%%%-----定义演讲备注-----%%%% 5 | % These slides also contain speaker notes. You can print just the slides, 6 | % just the notes, or both, depending on the setting below. Comment out the want 7 | % you want. 8 | \usepackage{pgfpages} 9 | % \setbeameroption{hide notes} % Only slides 10 | % \setbeameroption{show only notes} % Only notes 11 | \setbeameroption{show notes on second screen=right} % Both 12 | 13 | % To give a presentation with the Skim reader (http://skim-app.sourceforge.net) on OSX so 14 | % that you see the notes on your laptop and the slides on the projector, do the following: 15 | % 16 | % 1. Generate just the presentation (hide notes) and save to slides.pdf 17 | % 2. Generate onlt the notes (show only nodes) and save to notes.pdf 18 | % 3. With Skim open both slides.pdf and notes.pdf 19 | % 4. Click on slides.pdf to bring it to front. 20 | % 5. In Skim, under "View -> Presentation Option -> Synhcronized Noted Document" 21 | % select notes.pdf. 22 | % 6. Now as you move around in slides.pdf the notes.pdf file will follow you. 23 | % 7. Arrange windows so that notes.pdf is in full screen mode on your laptop 24 | % and slides.pdf is in presentation mode on the projector. 25 | 26 | % Give a slight yellow tint to the notes page 27 | \setbeamertemplate{note page}{\pagecolor{yellow!5}\insertnote}\usepackage{palatino} 28 | 29 | % reset to normal colour at the begin of every frame 30 | % workaround for show notes on second screen 31 | \makeatletter 32 | \def\beamer@framenotesbegin{% at beginning of slide 33 | \usebeamercolor[fg]{normal text} 34 | \gdef\beamer@noteitems{}% 35 | \gdef\beamer@notes{}% 36 | } 37 | \makeatother 38 | %%%%%%%%%%%%%%%%%% 39 | 40 | %%%%-----导入宏包-----%%%% 41 | \usepackage{style/zjubeamer} 42 | \usepackage{xeCJK} 43 | \usepackage{amsmath,amsfonts,amssymb,bm} 44 | \usepackage{color} 45 | \usepackage{graphicx,hyperref,url} 46 | \usepackage{comment} 47 | \usepackage{xcolor} 48 | \usepackage{subcaption} 49 | \usepackage{booktabs} 50 | \usepackage{graphbox} 51 | \usepackage{arydshln} 52 | % disable this if 'show notes only' 53 | \usepackage[super,square]{natbib} 54 | %%%%%%%%%%%%%%%%%% 55 | 56 | %%%%-----设置字体-----%%%% 57 | \setsansfont{Helvetica} 58 | %\setsansfont{Times New Roman} 59 | \definecolor{nvidia}{RGB}{102,156,28} 60 | \definecolor{red}{RGB}{184,13,73} 61 | \definecolor{darkred}{RGB}{145,12,7} 62 | \definecolor{orange}{RGB}{242,151,36} 63 | \definecolor{darkteal}{RGB}{43,106,108} 64 | \definecolor{darkgrey}{RGB}{64,64,64} 65 | \definecolor{darkblue}{RGB}{4,37,58} 66 | \definecolor{tan}{RGB}{225,221,191} 67 | \definecolor{green}{RGB}{76,131,122} 68 | \definecolor{darkgreen}{RGB}{42,50,46} 69 | \definecolor{bluegray}{RGB}{33,36,39} 70 | \definecolor{brown}{RGB}{110,54,42} 71 | 72 | % 设置 Beamer 主题 73 | \beamertemplateballitem 74 | \AtBeginSection[] 75 | { 76 | \begin{frame} 77 | \frametitle{\textbf{目录}} 78 | \textbf{\tableofcontents[currentsection]} 79 | \end{frame} 80 | } 81 | 82 | %%%%----首页信息设置----%%%% 83 | \AtBeginDocument{% 84 | \title[基于自监督学习的摸鱼神经网络]{\fontsize{13pt}{18pt}\selectfont {基于自监督学习的摸鱼神经网络}} 85 | %%%%----标题设置 86 | \subtitle{\fontsize{9pt}{14pt}\selectfont \textbf{SlackNet: How to Slack Off Happily via Self-Supervised Learning}} 87 | %%%%----个人信息设置 88 | \author[咸鱼]{% 89 | \begin{tabular}{ll}% 90 | 答辩人: & 咸鱼 \tabularnewline% 91 | 学号: & 21700000 \tabularnewline% 92 | 专业: & 摸鱼技术与工程 \tabularnewline% 93 | 导师: & 老咸鱼 \tabularnewline% 94 | \end{tabular} 95 | } 96 | %%%%----机构信息 97 | \institute[ZJU]{老和山职业技术学院} 98 | %%%%----日期信息 99 | \date[\today]{\today} 100 | } 101 | 102 | % 图像 103 | \input{content/figures} 104 | \input{content/symbols} 105 | 106 | \begin{document} 107 | 108 | \include{content/title} 109 | \include{content/background} 110 | \include{content/idea} 111 | \include{content/content} 112 | \include{content/conclusion} 113 | \include{content/achievements} 114 | 115 | \appendix 116 | \include{content/references} 117 | 118 | \end{document} 119 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | *.fmt 10 | *.fot 11 | *.cb 12 | *.cb2 13 | .*.lb 14 | 15 | ## Intermediate documents: 16 | *.dvi 17 | *.xdv 18 | *-converted-to.* 19 | # these rules might exclude image files for figures etc. 20 | # *.ps 21 | # *.eps 22 | # *.pdf 23 | 24 | ## Generated if empty string is given at "Please type another file name for output:" 25 | .pdf 26 | 27 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 28 | *.bbl 29 | *.bcf 30 | *.blg 31 | *-blx.aux 32 | *-blx.bib 33 | *.run.xml 34 | 35 | ## Build tool auxiliary files: 36 | *.fdb_latexmk 37 | *.synctex 38 | *.synctex(busy) 39 | *.synctex.gz 40 | *.synctex.gz(busy) 41 | *.pdfsync 42 | 43 | ## Build tool directories for auxiliary files 44 | # latexrun 45 | latex.out/ 46 | 47 | ## Auxiliary and intermediate files from other packages: 48 | # algorithms 49 | *.alg 50 | *.loa 51 | 52 | # achemso 53 | acs-*.bib 54 | 55 | # amsthm 56 | *.thm 57 | 58 | # beamer 59 | *.nav 60 | *.pre 61 | *.snm 62 | *.vrb 63 | 64 | # changes 65 | *.soc 66 | 67 | # comment 68 | *.cut 69 | 70 | # cprotect 71 | *.cpt 72 | 73 | # elsarticle (documentclass of Elsevier journals) 74 | *.spl 75 | 76 | # endnotes 77 | *.ent 78 | 79 | # fixme 80 | *.lox 81 | 82 | # feynmf/feynmp 83 | *.mf 84 | *.mp 85 | *.t[1-9] 86 | *.t[1-9][0-9] 87 | *.tfm 88 | 89 | #(r)(e)ledmac/(r)(e)ledpar 90 | *.end 91 | *.?end 92 | *.[1-9] 93 | *.[1-9][0-9] 94 | *.[1-9][0-9][0-9] 95 | *.[1-9]R 96 | *.[1-9][0-9]R 97 | *.[1-9][0-9][0-9]R 98 | *.eledsec[1-9] 99 | *.eledsec[1-9]R 100 | *.eledsec[1-9][0-9] 101 | *.eledsec[1-9][0-9]R 102 | *.eledsec[1-9][0-9][0-9] 103 | *.eledsec[1-9][0-9][0-9]R 104 | 105 | # glossaries 106 | *.acn 107 | *.acr 108 | *.glg 109 | *.glo 110 | *.gls 111 | *.glsdefs 112 | *.lzo 113 | *.lzs 114 | 115 | # uncomment this for glossaries-extra (will ignore makeindex's style files!) 116 | # *.ist 117 | 118 | # gnuplottex 119 | *-gnuplottex-* 120 | 121 | # gregoriotex 122 | *.gaux 123 | *.gtex 124 | 125 | # htlatex 126 | *.4ct 127 | *.4tc 128 | *.idv 129 | *.lg 130 | *.trc 131 | *.xref 132 | 133 | # hyperref 134 | *.brf 135 | 136 | # knitr 137 | *-concordance.tex 138 | # TODO Comment the next line if you want to keep your tikz graphics files 139 | *.tikz 140 | *-tikzDictionary 141 | 142 | # listings 143 | *.lol 144 | 145 | # luatexja-ruby 146 | *.ltjruby 147 | 148 | # makeidx 149 | *.idx 150 | *.ilg 151 | *.ind 152 | 153 | # minitoc 154 | *.maf 155 | *.mlf 156 | *.mlt 157 | *.mtc[0-9]* 158 | *.slf[0-9]* 159 | *.slt[0-9]* 160 | *.stc[0-9]* 161 | 162 | # minted 163 | _minted* 164 | *.pyg 165 | 166 | # morewrites 167 | *.mw 168 | 169 | # nomencl 170 | *.nlg 171 | *.nlo 172 | *.nls 173 | 174 | # pax 175 | *.pax 176 | 177 | # pdfpcnotes 178 | *.pdfpc 179 | 180 | # sagetex 181 | *.sagetex.sage 182 | *.sagetex.py 183 | *.sagetex.scmd 184 | 185 | # scrwfile 186 | *.wrt 187 | 188 | # sympy 189 | *.sout 190 | *.sympy 191 | sympy-plots-for-*.tex/ 192 | 193 | # pdfcomment 194 | *.upa 195 | *.upb 196 | 197 | # pythontex 198 | *.pytxcode 199 | pythontex-files-*/ 200 | 201 | # tcolorbox 202 | *.listing 203 | 204 | # thmtools 205 | *.loe 206 | 207 | # TikZ & PGF 208 | *.dpth 209 | *.md5 210 | *.auxlock 211 | 212 | # todonotes 213 | *.tdo 214 | 215 | # vhistory 216 | *.hst 217 | *.ver 218 | 219 | # easy-todo 220 | *.lod 221 | 222 | # xcolor 223 | *.xcp 224 | 225 | # xmpincl 226 | *.xmpi 227 | 228 | # xindy 229 | *.xdy 230 | 231 | # xypic precompiled matrices and outlines 232 | *.xyc 233 | *.xyd 234 | 235 | # endfloat 236 | *.ttt 237 | *.fff 238 | 239 | # Latexian 240 | TSWLatexianTemp* 241 | 242 | ## Editors: 243 | # WinEdt 244 | *.bak 245 | *.sav 246 | 247 | # Texpad 248 | .texpadtmp 249 | 250 | # LyX 251 | *.lyx~ 252 | 253 | # Kile 254 | *.backup 255 | 256 | # gummi 257 | .*.swp 258 | 259 | # KBibTeX 260 | *~[0-9]* 261 | 262 | # TeXnicCenter 263 | *.tps 264 | 265 | # auto folder when using emacs and auctex 266 | ./auto/* 267 | *.el 268 | 269 | # expex forward references with \gathertags 270 | *-tags.tex 271 | 272 | # standalone packages 273 | *.sta 274 | 275 | # Makeindex log files 276 | *.lpz 277 | .tags 278 | -------------------------------------------------------------------------------- /content/symbols.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX root = ../beamer.tex 3 | 4 | % lowercase symbols 5 | \newcommand{\bzero}{\textbf{0}} 6 | \newcommand{\bone}{\textbf{1}} 7 | \newcommand{\ba}{\mathbf{a}} 8 | \newcommand{\bb}{\mathbf{b}} 9 | \newcommand{\bc}{\mathbf{c}} 10 | \newcommand{\bd}{\mathbf{d}} 11 | \newcommand{\be}{\mathbf{e}} 12 | \newcommand{\bff}{\mathbf{f}} 13 | \newcommand{\bg}{\mathbf{g}} 14 | \newcommand{\bh}{\mathbf{h}} 15 | \newcommand{\bi}{\mathbf{i}} 16 | \newcommand{\bn}{\mathbf{n}} 17 | \newcommand{\bmm}{\mathbf{m}} 18 | \newcommand{\bo}{\mathbf{o}} 19 | \newcommand{\bp}{\mathbf{p}} 20 | \newcommand{\bq}{\mathbf{q}} 21 | \newcommand{\br}{\mathbf{r}} 22 | \newcommand{\bs}{\mathbf{s}} 23 | \newcommand{\bts}{\tilde{\mathbf{s}}} 24 | \newcommand{\bt}{\mathbf{t}} 25 | \newcommand{\bu}{\mathbf{u}} 26 | \newcommand{\btu}{\tilde{\mathbf{u}}} 27 | \newcommand{\bk}{\mathbf{k}} 28 | \newcommand{\bv}{\mathbf{v}} 29 | \newcommand{\bw}{\mathbf{w}} 30 | \newcommand{\bx}{\mathbf{x}} 31 | \newcommand{\btx}{\tilde{\mathbf{x}}} 32 | \newcommand{\by}{\mathbf{y}} 33 | \newcommand{\bz}{\mathbf{z}} 34 | 35 | % uppercase symbols 36 | \newcommand{\bA}{\mathbf{A}} 37 | \newcommand{\bB}{\mathbf{B}} 38 | \newcommand{\bC}{\mathbf{C}} 39 | \newcommand{\bD}{\mathbf{D}} 40 | \newcommand{\bF}{\mathbf{F}} 41 | \newcommand{\btF}{\tilde{\mathbf{F}}} 42 | \newcommand{\bG}{\mathbf{G}} 43 | \newcommand{\bH}{\mathbf{H}} 44 | \newcommand{\bI}{\mathbf{I}} 45 | \newcommand{\bJ}{\mathbf{J}} 46 | \newcommand{\bK}{\mathbf{K}} 47 | \newcommand{\bL}{\mathbf{L}} 48 | \newcommand{\bM}{\mathbf{M}} 49 | \newcommand{\bN}{\mathbf{N}} 50 | \newcommand{\bP}{\mathbf{P}} 51 | \newcommand{\btP}{\tilde{\mathbf{P}}} 52 | \newcommand{\bQ}{\mathbf{Q}} 53 | \newcommand{\bR}{\mathbf{R}} 54 | \newcommand{\btS}{\tilde{\mathbf{S}}} 55 | \newcommand{\bS}{\mathbf{S}} 56 | \newcommand{\bT}{\mathbf{T}} 57 | \newcommand{\btT}{\tilde{\mathbf{T}}} 58 | \newcommand{\bU}{\mathbf{U}} 59 | \newcommand{\bV}{\mathbf{V}} 60 | \newcommand{\bW}{\mathbf{W}} 61 | \newcommand{\bX}{\mathbf{X}} 62 | \newcommand{\bY}{\mathbf{Y}} 63 | \newcommand{\bZ}{\mathbf{Z}} 64 | 65 | \newcommand{\1}{\bmath{1}} 66 | \newcommand{\0}{\bmath{0}} 67 | \newcommand{\bmsigma}{\bm{\sigma}} 68 | \newcommand{\bmmu}{\bm{\mu}} 69 | \newcommand{\bmepsilon}{\bm{\epsilon}} 70 | \newcommand{\bmgamma}{\bm{\gamma}} 71 | \newcommand{\bmbeta}{\bm{\beta}} 72 | 73 | % sf symbols 74 | \newcommand{\sfD}{\mathsf{D}} 75 | \newcommand{\sfU}{\mathsf{U}} 76 | 77 | % hat symbols 78 | \newcommand{\bhf}{\hat{\mathbf{f}}} 79 | \newcommand{\bhh}{\hat{\mathbf{h}}} 80 | \newcommand{\bhp}{\hat{\mathbf{p}}} 81 | \newcommand{\bhx}{\hat{\mathbf{x}}} 82 | \newcommand{\bhA}{\hat{\mathbf{A}}} 83 | \newcommand{\bhc}{\hat{\mathbf{c}}} 84 | \newcommand{\bhd}{\hat{\mathbf{d}}} 85 | \newcommand{\bhF}{\hat{\mathbf{F}}} 86 | \newcommand{\bhG}{\hat{\mathbf{G}}} 87 | \newcommand{\bhH}{\hat{\mathbf{H}}} 88 | \newcommand{\bhJ}{\hat{\mathbf{J}}} 89 | \newcommand{\bhK}{\hat{\mathbf{K}}} 90 | 91 | % mathcal symbols 92 | \newcommand{\mA}{\mathcal{A}} 93 | \newcommand{\mC}{\mathcal{C}} 94 | \newcommand{\mD}{\mathcal{D}} 95 | \newcommand{\mE}{\mathcal{E}} 96 | \newcommand{\mF}{\mathcal{F}} 97 | \newcommand{\mI}{\mathcal{I}} 98 | \newcommand{\mK}{\mathcal{K}} 99 | \newcommand{\mM}{\mathcal{M}} 100 | \newcommand{\mN}{\mathcal{N}} 101 | \newcommand{\mL}{\mathcal{L}} 102 | \newcommand{\mP}{\mathcal{P}} 103 | \newcommand{\mR}{\mathcal{R}} 104 | \newcommand{\mS}{\mathcal{S}} 105 | \newcommand{\mT}{\mathcal{T}} 106 | \newcommand{\mmt}{\mathcal{t}} 107 | \newcommand{\mU}{\mathcal{U}} 108 | \newcommand{\mW}{\mathcal{W}} 109 | \newcommand{\mmx}{\mathcal{x}} 110 | \newcommand{\mZ}{\mathcal{Z}} 111 | 112 | % mathbb symbols 113 | \newcommand{\mbR}{\mathbb{R}} %symbol for the Real numbers 114 | \newcommand{\mbE}{\mathbb{E}} %symbol for the Expectations 115 | 116 | % other symbols 117 | \newcommand{\Avvo}{\mathcal{A}} 118 | \newcommand{\Tvvo}{\mathcal{T}} 119 | \newcommand{\balpha}{\boldsymbol{\alpha}} 120 | \newcommand{\bdelta}{\boldsymbol{\delta}} 121 | \newcommand{\bDelta}{\boldsymbol{\Delta}} 122 | \newcommand{\blambda}{\boldsymbol{\lambda}} 123 | \newcommand{\bLambda}{\boldsymbol{\Lambda}} 124 | \newcommand{\bmu}{\boldsymbol{\mu}} 125 | \newcommand{\bgamma}{\boldsymbol{\gamma}} 126 | \newcommand{\bGamma}{\boldsymbol{\Gamma}} 127 | \newcommand{\bSigma}{\boldsymbol{\Sigma}} 128 | \newcommand{\btheta}{\boldsymbol{\theta}} 129 | \newcommand{\bTheta}{\boldsymbol{\Theta}} 130 | \newcommand{\brho}{\boldsymbol{\rho}} 131 | \newcommand{\bphi}{\boldsymbol{\phi}} 132 | \newcommand{\bPhi}{\boldsymbol{\Phi}} 133 | \newcommand{\bpsi}{\boldsymbol{\psi}} 134 | \newcommand{\bPsi}{\boldsymbol{\Psi}} 135 | \newcommand{\bxi}{\boldsymbol{\xi}} 136 | \newcommand{\bUpsilon}{\boldsymbol{\Upsilon}} 137 | \newcommand{\bomega}{\boldsymbol{\omega}} 138 | \newcommand{\bOmega}{\boldsymbol{\Omega}} 139 | 140 | \newcommand{\mo}{\boldsymbol{o}} 141 | 142 | \newcommand{\berror}{\boldsymbol{\varepsilon}} 143 | 144 | \newcommand{\st}{{\;t}} 145 | \newcommand{\sk}{{\;k}} 146 | \newcommand{\tms}{\hspace{-1mm}\times{\hspace{-1mm}}} 147 | \newcommand{\hh}{\hspace{-1mm}} 148 | 149 | \newcommand{\argmin}{\operatornamewithlimits{arg\,min}} 150 | \newcommand{\argmax}{\operatornamewithlimits{arg\,max}} 151 | 152 | % references 153 | \newcommand{\figref}[1]{图\,\ref{#1}\,} 154 | \newcommand{\tabref}[1]{表\,\ref{#1}\,} 155 | \newcommand{\chapref}[1]{第\ref{#1}章} 156 | \newcommand{\secref}[1]{第\,\ref{#1}\,节} 157 | \newcommand{\ssubref}[1]{第\,\ref{#1}\,小节} 158 | \newcommand{\algref}[1]{算法\,\ref{#1}\,} 159 | \newcommand{\eqnref}[1]{式\,\ref{#1}\,} 160 | \newcommand{\etal}{et al.} 161 | 162 | -------------------------------------------------------------------------------- /style/zjubeamer.sty: -------------------------------------------------------------------------------- 1 | %%% 2 | %%% Inherit definitions from existing themes (DO NOT MODIFY THESE) 3 | %%% 4 | % Layout scheme for outer elements: split header and footer 5 | \useoutertheme{split} 6 | % Color scheme for outer elements: use background colors 7 | \usecolortheme{whale} 8 | % Layout scheme for inner elements: rounded elements 9 | \useinnertheme[shadow]{rounded} 10 | % Color scheme for inner elements: use foreground colors 11 | \usecolortheme{orchid} 12 | %%% 13 | %%% Tweak definitions of inner theme to match personal preferences (MODIFY THESE) 14 | %%% 15 | % Font size in headline/footline 16 | \setbeamerfont{section in head/foot}{size=\scriptsize} 17 | % Itemize items: default (triangle), circle, square, ball 18 | \setbeamertemplate{itemize items}[circle] 19 | % Enumerate items: default, circle, square, ball 20 | \setbeamertemplate{enumerate items}[circle] 21 | % Outline: default, sections numbered, subsections numbered, circle, square, ball, ball unnumbered 22 | \setbeamertemplate{sections/subsections in toc}[default] 23 | % General blocks: 24 | \setbeamertemplate{blocks}[rounded] 25 | % Title page: 26 | \setbeamertemplate{title page}[default][colsep=-4bp,rounded=true] 27 | % Part page: 28 | \setbeamertemplate{part page}[default][colsep=-4bp,rounded=true] 29 | % Caption 30 | \setbeamertemplate{caption}[numbered] 31 | % \setbeamerfont{caption}{size=\scriptsize} 32 | \setlength\abovecaptionskip{0pt} 33 | \renewcommand\figurename{图} 34 | \renewcommand\tablename{表} 35 | % Navigation symbols: 36 | % \setbeamertemplate{navigation symbols}{} 37 | 38 | %%% 39 | %%% Tweak definitions of outer theme to match Radboud (website) style 40 | %%% 41 | % Background 42 | \pgfdeclareimage[width=\paperwidth,height=\paperheight]{bg}{style/logo/background.pdf} 43 | \setbeamertemplate{background}{\pgfuseimage{bg}} 44 | % Colors 45 | % \usecolortheme[RGB={182,11,45}]{structure} % Red 46 | % \usecolortheme[RGB={81,122,52}]{structure} % SEU 47 | \usecolortheme[RGB={0,19,77}]{structure} % ZJU dark blue 48 | % \usecolortheme[RGB={0,78,164}]{structure} % ZJU light blue 49 | \setbeamercolor{frametitle}{parent=subsection in head/foot} 50 | \setbeamercolor{frametitle right}{parent=section in head/foot} 51 | 52 | \pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{% 53 | color(0pt)=(frametitle.bg); 54 | color(\paperwidth)=(frametitle right.bg)} 55 | 56 | \AtBeginDocument{ 57 | \pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{% 58 | color(0pt)=(bg); 59 | color(4pt)=(black!50!bg)} 60 | } 61 | 62 | % Footline: AUTHOR | TITLE | DATE FRAMENUMBER 63 | \defbeamertemplate*{footline}{zjutheme}{% 64 | \leavevmode% 65 | \hbox{% 66 | \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% 67 | \usebeamerfont{author in head/foot}\insertshortauthor 68 | \end{beamercolorbox}% 69 | \begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% 70 | \usebeamerfont{author in head/foot}\insertshortdate 71 | \end{beamercolorbox}% 72 | \begin{beamercolorbox}[wd=.435\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% 73 | \usebeamerfont{title in head/foot}\insertshorttitle 74 | \end{beamercolorbox}% 75 | \begin{beamercolorbox}[wd=0.065\paperwidth,ht=2.25ex,dp=1ex,right]{title in head/foot}% 76 | \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 77 | \end{beamercolorbox}}% 78 | \vskip0pt% 79 | } 80 | 81 | % Headline 82 | \defbeamertemplate*{headline}{zjutheme}{% 83 | \leavevmode% 84 | \@tempdimb=6.4375ex% 85 | %\multiply\@tempdimb by\beamer@sectionmax% 86 | \pgfdeclareimage[height=.85\@tempdimb]{logo}{style/logo/QSY-white.pdf}% 87 | \pgfdeclareimage[height=.9\@tempdimb]{titlelogo}{style/logo/ZJDX-tight-white.pdf}% 88 | \logo{\pgfuseimage{logo}}% 89 | \ifdim\@tempdimb>0pt% 90 | \advance\@tempdimb by 1.125ex% 91 | \begin{beamercolorbox}[wd=.740\paperwidth,ht=\@tempdimb]{section in head/foot}% 92 | \vbox to\@tempdimb{\vfil\insertsectionnavigationhorizontal{.5\textwidth}{\hskip0pt plus1filll}{}\vfil}% 93 | \end{beamercolorbox}% 94 | %% \begin{beamercolorbox}[wd=.4\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% 95 | %% \vbox to\@tempdimb{\vfil\textbf{\footnotesize\insertshortinstitute~~}\vfil}% 96 | %% \end{beamercolorbox}% 97 | \begin{beamercolorbox}[wd=.195\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% 98 | \vbox to\@tempdimb{\vfil\pgfuseimage{titlelogo}\vfil}% 99 | \end{beamercolorbox}% 100 | \begin{beamercolorbox}[wd=.065\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}% 101 | \vbox to\@tempdimb{\vfil\insertlogo\vfil\vfil}% 102 | \end{beamercolorbox}% 103 | \fi% 104 | } 105 | 106 | \defbeamertemplate*{frametitle}{zjutheme}{% 107 | \nointerlineskip% 108 | %\vskip-2pt% 109 | \hbox{\leavevmode 110 | \advance\beamer@leftmargin by -12bp% 111 | \advance\beamer@rightmargin by -12bp% 112 | \beamer@tempdim=\textwidth% 113 | \advance\beamer@tempdim by \beamer@leftmargin% 114 | \advance\beamer@tempdim by \beamer@rightmargin% 115 | \hskip-\Gm@lmargin\hbox{% 116 | \setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}% 117 | \vbox{}\vskip-.75ex% 118 | \leftskip0.3cm% 119 | \rightskip0.3cm plus1fil\leavevmode 120 | \insertframetitle% 121 | \ifx\insertframesubtitle\@empty% 122 | \strut\par% 123 | \else 124 | \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}% 125 | \fi% 126 | \nointerlineskip 127 | \vbox{}% 128 | \end{minipage}}% 129 | \beamer@tempdim=\ht\beamer@tempbox% 130 | \advance\beamer@tempdim by 2pt% 131 | \begin{pgfpicture}{0.1mm}{0pt}{1.01\paperwidth}{\beamer@tempdim} 132 | \usebeamercolor{frametitle right} 133 | \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}} 134 | \pgfusepath{clip} 135 | \pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}} 136 | \end{pgfpicture} 137 | \hskip-\paperwidth% 138 | \box\beamer@tempbox% 139 | }% 140 | \hskip-\Gm@rmargin% 141 | }% 142 | % \nointerlineskip 143 | % \vskip-0.2pt 144 | % \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@topshade}\hskip-\Gm@rmargin} 145 | % \vskip-2pt 146 | } 147 | -------------------------------------------------------------------------------- /style/gbt7714-2005.bst: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % 3 | % 符合 GB/T 7714-2005 规范的 BibTeX 样式文件 4 | % 5 | % 作者: 胡海星 南京大学计算机科学与技术系 6 | % 版本: v2.1.1 2015年6月15日 7 | % 项目主页: http://haixing-hu.github.io/nju-thesis/ 8 | % 9 | % 参考资料: 10 | % [1] 中国国家标准化管理委员会. GB/T 7714-2005 文后参考文献着录规则[S]. 2005. 11 | % [2] PATASHNIK O. BiBTeXing[R/OL]. 1988[2013-08-27]. 12 | % ftp://tug.ctan.org/pub/tex-archive/biblio/bibtex/contrib/doc/btxdoc.pdf 13 | % [3] PATASHNIK O. Designing BibTeX Styles[R/OL]. 1998[2013-08-27]. 14 | % ftp://tug.ctan.org/pub/tex-archive/biblio/bibtex/contrib/doc/btxhak.pdf 15 | % 16 | % This program is free software; you can redistribute it and/or modify 17 | % it under the terms of the GNU General Public License as published by 18 | % the Free Software Foundation; either version 2 of the License, or 19 | % (at your option) any later version. 20 | % 21 | % This program is distributed in the hope that it will be useful, 22 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | % GNU General Public License for more details. 25 | % 26 | % You should have received a copy of the GNU General Public License along 27 | % with this program; if not, write to the Free Software Foundation, Inc., 28 | % 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 29 | % 30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 | % 32 | ENTRY % class Entry { 33 | { % public: 34 | author % String author; 35 | editor % String editor; 36 | translator % String translator; 37 | title % String title; 38 | edition % String edition; 39 | address % String address; 40 | publisher % String publisher; 41 | pages % String pages; 42 | year % String year; 43 | date % String date; 44 | modifydate % String modifydate; 45 | citedate % String citedate; 46 | url % String url; 47 | doi % String doi; 48 | language % String language; 49 | booktitle % String booktitle; 50 | journal % String journal; 51 | chapter % String chapter; 52 | series % String series; 53 | volume % String volume; 54 | number % String number; 55 | version % String version; 56 | month % String month; 57 | school % String school; 58 | institution % String institution; 59 | organization % String organization; 60 | type % String type; 61 | howpublished % String howpublished; 62 | eid % String eid; 63 | key % String key; 64 | country % String country; 65 | patentid % String patentid; 66 | media % String media; 67 | } { % // declare integer variables 68 | required % int required; // withther the bibfield is required 69 | } { % // declare String variables 70 | label % String label; // label for the entry 71 | mark % String mark; // mark for the entry 72 | % // there is ahidden entry variable sort.key$ 73 | % String sort_key; 74 | } % } 75 | % 76 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 77 | % 78 | INTEGERS { % // declare global int variables 79 | entry.count % static int entry_count; // number of entries 80 | longest.label.width % static int longest_label_width; // width of the longest label 81 | i % static int i; 82 | j % static int j; 83 | k % static int k; 84 | } % 85 | % 86 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 87 | % 88 | STRINGS { % // declare global String variables 89 | longest.label % static String longest_label; // the longest label 90 | s % static String s; 91 | t % static String t; 92 | } % 93 | % 94 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 95 | 96 | % define global static constants 97 | FUNCTION {true} {#1} 98 | FUNCTION {false} {#0} 99 | FUNCTION {debug.enabled} {true} 100 | FUNCTION {cap.volume.en} {"Vol~"} 101 | FUNCTION {cap.volume.zh} {"卷"} 102 | FUNCTION {cap.edition.en} {"~ed"} 103 | FUNCTION {cap.edition.zh} {"版"} 104 | FUNCTION {cap.anonymous.en} {"Anon"} 105 | FUNCTION {cap.anonymous.zh} {"佚名"} 106 | FUNCTION {cap.no.address.en} {"[S.l.]"} 107 | FUNCTION {cap.no.address.zh} {"[出版地不详]"} 108 | FUNCTION {cap.no.publisher.en} {"[s.n.]"} 109 | FUNCTION {cap.no.publisher.zh} {"[出版者不详]"} 110 | FUNCTION {cap.et.al.en} {", et~al"} 111 | FUNCTION {cap.et.al.zh} {", 等"} 112 | FUNCTION {cap.translate.en} {"~trans"} 113 | FUNCTION {cap.translate.zh} {"译"} 114 | FUNCTION {cap.doi.url} {"http://dx.doi.org/"} 115 | FUNCTION {cap.st.en} {"st"} 116 | FUNCTION {cap.nd.en} {"nd"} 117 | FUNCTION {cap.rd.en} {"rd"} 118 | FUNCTION {cap.th.en} {"th"} 119 | 120 | FUNCTION {cap.space} {" "} 121 | FUNCTION {cap.period} {"\@. "} 122 | FUNCTION {cap.comma} {"\@, "} 123 | FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"} 124 | FUNCTION {cap.double.slash} {" //\thinspace{}"} 125 | FUNCTION {cap.dash} {"\thinspace{}\textnormal{--}\thinspace{}"} 126 | 127 | % Predefined latex command used to format the style of bibitems 128 | FUNCTION {env.bibbegin} { "\begin{thebibliography}" } 129 | FUNCTION {env.bibend} { "\end{thebibliography}" } 130 | FUNCTION {cmd.bibauthor} { "\providecommand{\bibauthor}[1]{#1}" } 131 | FUNCTION {cmd.bibeditor} { "\providecommand{\bibeditor}[1]{#1}" } 132 | FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" } 133 | FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" } 134 | FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" } 135 | FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" } 136 | FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{#1}" } 137 | FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" } 138 | FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" } 139 | FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" } 140 | FUNCTION {cmd.biborganization} { "\providecommand{\biborganization}[1]{#1}" } 141 | FUNCTION {cmd.bibaddress} { "\providecommand{\bibaddress}[1]{#1}" } 142 | FUNCTION {cmd.bibpublisher} { "\providecommand{\bibpublisher}[1]{#1}" } 143 | FUNCTION {cmd.bibinstitution} { "\providecommand{\bibinstitution}[1]{#1}" } 144 | FUNCTION {cmd.bibschool} { "\providecommand{\bibschool}[1]{#1}" } 145 | FUNCTION {cmd.bibvolume} { "\providecommand{\bibvolume}[1]{#1}" } 146 | FUNCTION {cmd.bibnumber} { "\providecommand{\bibnumber}[1]{#1}" } 147 | FUNCTION {cmd.bibversion} { "\providecommand{\bibversion}[1]{#1}" } 148 | FUNCTION {cmd.bibpages} { "\providecommand{\bibpages}[1]{#1}" } 149 | FUNCTION {cmd.bibmodifydate} { "\providecommand{\bibmodifydate}[1]{#1}" } 150 | FUNCTION {cmd.bibcitedate} { "\providecommand{\bibcitedate}[1]{#1}" } 151 | FUNCTION {cmd.bibyear} { "\providecommand{\bibyear}[1]{#1}" } 152 | FUNCTION {cmd.bibdate} { "\providecommand{\bibdate}[1]{#1}" } 153 | FUNCTION {cmd.biburl} { "\providecommand{\biburl}[1]{\newline\url{#1}}" } 154 | 155 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 156 | % 157 | FUNCTION {log.str} { % void Entry::log_str(String value, String message) 158 | debug.enabled { % if (debug_enabled == 1) { 159 | "DEBUG: " swap$ * " - '" * % message = "DEBUG: " + message + " - '"; 160 | swap$ * % message = message + value; 161 | "'" * % message = message + "'"; 162 | top$ % log(message); 163 | } { % } else { 164 | pop$ pop$ % return; 165 | } if$ % } 166 | } % } 167 | % 168 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 169 | % 170 | FUNCTION {log.int} { % int Entry::log_int(int value, String message) 171 | debug.enabled { % if (debug_enabled == 1) { 172 | "DEBUG: " swap$ * " - " * % message = "DEBUG: " + message + " - "; 173 | swap$ int.to.str$ * % message = message + int_to_str(value); 174 | top$ % log(message); 175 | } { % } else { 176 | pop$ pop$ % return; 177 | } if$ % } 178 | } % } 179 | % 180 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 181 | % 182 | FUNCTION {not} { % int Entry::not(int x) { 183 | { % if (x == 1) { 184 | false % return false; 185 | } { % } else { 186 | true % return true; 187 | } if$ % } 188 | } % } 189 | % 190 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 191 | % 192 | FUNCTION {and} { % int Entry::and(int x, int y) { 193 | { % if (y == 1) { 194 | skip$ % return x; 195 | } { % } else { 196 | pop$ false % return false; 197 | } if$ % } 198 | } % } 199 | % 200 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 201 | % 202 | FUNCTION {or} { % int Entry::or(int x, int y) { 203 | { % if (y == 1) { 204 | pop$ true % return true; 205 | } { % } else { 206 | skip$ % return x; 207 | } if$ % } 208 | } % } 209 | % 210 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 211 | % // calculate the length in characters of a string 212 | % // We need this function since text.length$ is NOT 213 | % // the length in characters. 214 | INTEGERS {length.i} % static int length_i; 215 | FUNCTION {length} { % int Entry::length(String str) { 216 | duplicate$ empty$ { % if (empty(str)) { 217 | pop$ #0 % return 0; 218 | } { % } else { 219 | #1 'length.i := % length_i = 1; 220 | false % int stop = false; 221 | {not} { % while (! stop) { 222 | duplicate$ length.i #1 substring$ % String tmp = substring(str, length_i, 1); 223 | "" = { % if (tmp == "") { 224 | true % stop = true; 225 | } { % } else { 226 | length.i #1 + 'length.i := % length_i = length_i + 1; 227 | false % stop = false; 228 | } if$ % } 229 | } while$ % } 230 | pop$ length.i #1 - % return length_i - 1; 231 | } if$ % } 232 | } % } 233 | % 234 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 235 | % 236 | FUNCTION {is.digit} { % int Entry::is_digit(String ch) { 237 | chr.to.int$ % int ascii = chr_to_int(ch); 238 | duplicate$ "0" chr.to.int$ < { % if (ascii < chr_to_int("0")) { 239 | pop$ false % return false; 240 | } { % } else { 241 | "9" chr.to.int$ > { % if (ascii > chr_to_int("9")) { 242 | false % return false; 243 | } { % } else { 244 | true % return true; 245 | } if$ % } 246 | } if$ % } 247 | } % } 248 | % 249 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 250 | % // test if str is a number 251 | FUNCTION {is.number} { % int Entry::is_number(String str) { 252 | duplicate$ empty$ not swap$ % int result = (! empty(str)); 253 | { duplicate$ empty$ not} { % while (! empty(str)) { 254 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(str, 1, 1))) { 255 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 256 | } { % } else { 257 | pop$ pop$ false % result = false; 258 | "" % str = ""; 259 | } if$ % } 260 | } while$ % } 261 | pop$ % return result; 262 | } % } 263 | % 264 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 265 | % // extract the number prefix of str 266 | FUNCTION {extract.number} { % String Entry::extract_number(String str) { 267 | duplicate$ % String suffix = str; 268 | duplicate$ length swap$ % int n = length(str); 269 | duplicate$ empty$ % int stop = empty(suffix); 270 | { not } { % while (! stop) { 271 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(suffix, 1, 1))) { 272 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 273 | duplicate$ empty$ % stop = empty(suffix); 274 | } { % } else { 275 | true % stop = true; 276 | } if$ % } 277 | } while$ % } 278 | length - % int n = n - length(suffix); 279 | #1 swap$ substring$ % return substring(str, 1, n); 280 | } % } 281 | % 282 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 283 | % 284 | FUNCTION {get.last.chr} { % String Entry::get_last_chr(String str) { 285 | duplicate$ length % int n = length(str); 286 | duplicate$ #0 = { % if (n == 0) { 287 | pop$ % return str; 288 | } { % } else { 289 | #1 substring$ % return substring(str, n, 1); 290 | } if$ % } 291 | } % } 292 | % 293 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 294 | % 295 | FUNCTION {get.ordinal.suffix.en} { % String Entry::get_ordinal_suffix_en(String ch) { 296 | duplicate$ "1" = { % if (num == "1") { 297 | pop$ cap.st.en % return cap_st_en; 298 | } { % } else { 299 | duplicate$ "2" = { % if (num == "2") { 300 | pop$ cap.nd.en % return cap_nd_en; 301 | } { % } else { 302 | duplicate$ "3" = { % if (num == "3") { 303 | pop$ cap.rd.en % return cap_rd_en; 304 | } { % } else { 305 | pop$ cap.th.en % return cap_th_en; 306 | } if$ % } 307 | } if$ % } 308 | } if$ % } 309 | } % } 310 | % 311 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 312 | % 313 | FUNCTION {num.to.ordinal.en} { % String Entry::num_to_ordinal_en(String num) { 314 | duplicate$ empty$ { % if (empty(num)) { 315 | skip$ % return num; 316 | } { % } else { 317 | duplicate$ get.last.chr % String ch = get_last_chr(num); 318 | get.ordinal.suffix.en % String str = get_ordinal_suffix_en(ch); 319 | * % reutrn num + str; 320 | } if$ % } 321 | } % } 322 | % 323 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 324 | % 325 | STRINGS {remove.dots.result} % static String remove_dots_result; 326 | % 327 | FUNCTION {remove.dots} { % String Entry::remove_dots(String str) { 328 | "" 'remove.dots.result := % remove_dots_result = ""; 329 | { duplicate$ empty$ not } { % while (! empty(str)) { 330 | duplicate$ #1 #2 substring$ % String tmp = substring(str, 1, 2); 331 | "\." = { % if (tmp == "\.") { 332 | #3 global.max$ substring$ % str = substring(str, 3, global_max); 333 | } { % } else { 334 | duplicate$ #1 #1 substring$ % tmp = substring(str, 1, 1); 335 | duplicate$ "." = { % if (tmp == ".") { 336 | pop$ #2 global.max$ substring$ % str = substring(str, 2, global_max); 337 | } { % } else { 338 | remove.dots.result swap$ * % tmp = remove_dots_result + tmp; 339 | 'remove.dots.result := % remove_dots_result = tmp; 340 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 341 | } if$ % } 342 | } if$ % } 343 | } while$ % } 344 | pop$ remove.dots.result % return remove_dots_result; 345 | } % } 346 | % 347 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 348 | % 349 | FUNCTION {add.brace} { % String Entry::add_brace(String str) { 350 | "{" swap$ * "}" * % return "{" + str + "}"; 351 | } % } 352 | % 353 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 354 | % 355 | FUNCTION {add.bracket} { % String Entry::bracket(String str) { 356 | "(" swap$ * ")" * % return "(" + str + ")"; 357 | } % } 358 | % 359 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 360 | % 361 | FUNCTION {add.squarebracket} { % String Entry::add_squarebracket(String str) { 362 | "[" swap$ * "]" * % return "[" + str + "]"; 363 | } % } 364 | % 365 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 366 | % 367 | FUNCTION {add.textit} { % String Entry::add_textit(String str) { 368 | "\textit{" swap$ * "}" * % return "\textit{" + str + "}"; 369 | } % } 370 | % 371 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 372 | % 373 | FUNCTION {add.textbf} { % String Entry::add_textbf(String str) { 374 | "\textbf{" swap$ * "}" * % return "\textbf{" + str + "}"; 375 | } % } 376 | % 377 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 378 | % // test if str contains a dash '-' 379 | FUNCTION {contain.dash} { % int Entry::contain_dash(String str) { 380 | false swap$ % int result = false; 381 | { duplicate$ empty$ not} { % while (! empty(str)) { 382 | duplicate$ #1 #1 substring$ "-" = { % if (substring(str, 1, 1) == "-") { 383 | pop$ pop$ true % result = true; 384 | "" % str = ""; 385 | } { % } else { 386 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 387 | } if$ % } 388 | } while$ % } 389 | pop$ % return result; 390 | } % } 391 | % 392 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 393 | % // extract the substring before the first '-' 394 | % // returns the string itself if no '-' 395 | FUNCTION {extract.before.first.dash} { % String Entry::extract_before_first_dash(String str) { 396 | duplicate$ % String suffix = str; 397 | duplicate$ length swap$ % int n = length(str); 398 | duplicate$ empty$ % int stop = empty(suffix); 399 | { not } { % while (! stop) { 400 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 401 | true % stop = true; 402 | } { % } else {4r 403 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 404 | duplicate$ empty$ % stop = empty(suffix); 405 | } if$ % } 406 | } while$ % } 407 | length - % int n = n - length(suffix); 408 | #1 swap$ substring$ % return substring(str, 1, n); 409 | } % } 410 | % 411 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 412 | % // extract the substring after the first '-' 413 | % // returns the string itself if no '-' 414 | FUNCTION {extract.after.first.dash} { % String Entry::extract_after_first_dash(String str) { 415 | duplicate$ % String suffix = str; 416 | duplicate$ empty$ % int stop = empty(suffix); 417 | { not } { % while (! stop) { 418 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 419 | true % stop = true; 420 | } { % } else {4r 421 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 422 | duplicate$ empty$ % stop = empty(suffix); 423 | } if$ % } 424 | } while$ % } 425 | duplicate$ empty$ { % if (empty(suffix)) { 426 | pop$ % return str; 427 | } { % } else { 428 | swap$ pop$ #2 global.max$ substring$ % return substring(suffix, 2, global_max); 429 | } if$ % } 430 | } % } 431 | % 432 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 433 | % // extract the substring after the last '-' 434 | % // returns the empty string if no '-' 435 | FUNCTION {extract.after.last.dash} { % String Entry::extract_after_last_dash(String str) { 436 | duplicate$ contain.dash not { % if (! contain_dash(str)) { 437 | pop$ "" % return ""; 438 | } { % } else { 439 | {duplicate$ contain.dash} { % while (contain_dash(str)) { 440 | extract.after.first.dash % str = extract_after_first_dash(str); 441 | } while$ % } 442 | % return str; 443 | } if$ % } 444 | } % } 445 | % 446 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 447 | % 448 | FUNCTION {trim.start} { % String Entry::trim_start(String str) { 449 | {duplicate$ #1 #1 substring$ " " =} { % while (substring(str, 1, 1) == " ") { 450 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 451 | } while$ % } 452 | % return str; 453 | } % } 454 | % 455 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 456 | % 457 | FUNCTION {trim.end} { % String Entry::trim_end(String str) { 458 | {duplicate$ get.last.chr " " =} { % while (get_last_chr(str) == " ") { 459 | duplicate$ length #1 - % int n = length(str) - 1; 460 | #1 swap$ substring$ % str = substring(str, 1, n); 461 | } while$ % } 462 | % return str; 463 | } % } 464 | % 465 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 466 | % 467 | FUNCTION {trim} { % String Entry::trim(String str) { 468 | trim.start % str = trim_start(str); 469 | trim.end % return trim_end(str); 470 | } % } 471 | % 472 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 473 | % 474 | FUNCTION {start.bibitem} { % void Entry::start_bibitem() { 475 | newline$ % writeln(); 476 | "\bibitem{" cite$ * "}" * write$ % write("\bibitem{" + this.cite + "}"); 477 | newline$ % writeln(); 478 | } % } 479 | % 480 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 481 | % 482 | FUNCTION {end.bibitem} { % void Entry::end_bibitem() { 483 | cap.period write$ % write(cap_period); 484 | newline$ % writeln(); 485 | } % } 486 | % 487 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 488 | % 489 | FUNCTION {is.in.chinese} { % int Entry::is_in_chinese() { 490 | language empty$ { % if (empty(this.language)) { 491 | false % return false; 492 | } { % } else { 493 | language "zh" = { % if (this.language == "zh") { 494 | true % return true; 495 | } { % } else { 496 | false % return false; 497 | } if$ % } 498 | } if$ % } 499 | } % } 500 | % 501 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 502 | % 503 | FUNCTION {is.online} { % int Entry::is_online() { 504 | url empty$ not { % if (! empty(this.url)) { 505 | true % return true; 506 | } { % } else { 507 | doi empty$ not { % if (! empty(this.doi)) { 508 | true % return true; 509 | } { % } else { 510 | false % return false; 511 | } if$ % } 512 | } if$ % } 513 | } % } 514 | % 515 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 516 | % 517 | FUNCTION {set.mark} { % void Entry::set_mark(String mark) { 518 | 'mark := % this.mark = mark; 519 | is.online { % if (is_online()) { 520 | mark "/OL" * 'mark := % this.mark = this.mark + "/OL"; 521 | } { % } else { 522 | media empty$ not { % if (! empty(this.media)) { 523 | mark "/" * media * 'mark := % this.mark = this.mark + "/" + this.media; 524 | } 'skip$ if$ % } 525 | } if$ % } 526 | } % } 527 | % 528 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 529 | % 530 | FUNCTION {cap.volume} { % String Entry::cap_volume() { 531 | is.in.chinese { % if (is_in_chinese()) { 532 | cap.volume.zh % return cap_volume_zh; 533 | } { % } else { 534 | cap.volume.en % return cap_volume_en; 535 | } if$ % } 536 | } % } 537 | % 538 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 539 | % 540 | FUNCTION {cap.edition} { % String Entry::cap_edition() { 541 | is.in.chinese { % if (is_in_chinese()) { 542 | cap.edition.zh % return cap_edition_zh; 543 | } { % } else { 544 | cap.edition.en % return cap_edition_en; 545 | } if$ % } 546 | } % } 547 | % 548 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 549 | % 550 | FUNCTION {cap.anonymous} { % String Entry::cap_anonymous() { 551 | is.in.chinese { % if (is_in_chinese()) { 552 | cap.anonymous.zh % return cap_anonymous_zh; 553 | } { % } else { 554 | cap.anonymous.en % return cap_anonymous_en; 555 | } if$ % } 556 | } % } 557 | % 558 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 559 | % 560 | FUNCTION {cap.no.address} { % String Entry::cap_no_address() { 561 | is.in.chinese { % if (is_in_chinese()) { 562 | cap.no.address.zh % return cap_no_address_zh; 563 | } { % } else { 564 | cap.no.address.en % return cap_no_address_en; 565 | } if$ % } 566 | } % } 567 | % 568 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 569 | % 570 | FUNCTION {cap.no.publisher} { % String Entry::cap_no_publisher() { 571 | is.in.chinese { % if (is_in_chinese()) { 572 | cap.no.publisher.zh % return cap_no_publisher_zh; 573 | } { % } else { 574 | cap.no.publisher.en % return cap_no_publisher_en; 575 | } if$ % } 576 | } % } 577 | % 578 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 579 | % 580 | FUNCTION {cap.et.al} { % String Entry::cap_et_al() { 581 | is.in.chinese { % if (is_in_chinese()) { 582 | cap.et.al.zh % return cap_et_al_zh; 583 | } { % } else { 584 | cap.et.al.en % return cap_et_al_en; 585 | } if$ % } 586 | } % } 587 | % 588 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 589 | % 590 | FUNCTION {cap.translate} { % String Entry::cap_translate() { 591 | is.in.chinese { % if (is_in_chinese()) { 592 | cap.translate.zh % return cap_translate_zh; 593 | } { % } else { 594 | cap.translate.en % return cap_translate_en; 595 | } if$ % } 596 | } % } 597 | % 598 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 599 | % 600 | FUNCTION {format.bibinfo} { % String Entry::format_bibinfo(String info, String type) { 601 | swap$ add.brace swap$ % info = add_brace(info); 602 | "\bib" swap$ * swap$ * % return "\bib" + type + info; 603 | } % } 604 | % 605 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 606 | INTEGERS { nameindex namecount } % static int nameindex, namecount; 607 | STRINGS { namelist nameformat } % static String namelist, nameformat; 608 | STRINGS { firstname lastname jrname vonname} % static String firstname, lastname, jrname, vonname; 609 | % 610 | FUNCTION {format.names} { % String Entry::format_names(String names) { 611 | 'namelist := % namelist = names; 612 | namelist num.names$ 'namecount := % namecount = num_names(namelist); 613 | "" % String result = ""; 614 | #0 'nameindex := % nameindex = 0; 615 | {nameindex namecount < nameindex #3 < and} { % while ((nameindex < namecount) && (nameindex < 3)) { 616 | nameindex #1 + 'nameindex := % nameindex = nameindex + 1; 617 | nameindex #1 > { % if (nameindex > 1) { 618 | cap.comma * % result = result + cap_comma; 619 | } 'skip$ if$ % } 620 | namelist nameindex "{vv}" format.name$ % String tmp = format_name(namelist, nameindex, "{vv}"); 621 | 'vonname := % vonname = tmp; 622 | namelist nameindex "{jj}" format.name$ % tmp = format_name(namelist, nameindex, "{jj}"); 623 | remove.dots 'jrname := % jrname = remove_dots(tmp); 624 | namelist nameindex "{f}" format.name$ % tmp = format_name(namelist, nameindex, "{f}"); 625 | remove.dots % tmp = remove_dots(tmp); 626 | "u" change.case$ 'firstname := % firstname = change_case(tmp, "u"); 627 | namelist nameindex "{ll}" format.name$ % tmp = format_name(namelist, nameindex, "{ll}"); 628 | "u" change.case$ 'lastname := % lastname = change_case(tmp, "u"); 629 | jrname empty$ not { % if (! empty(jrname)) { 630 | jrname * " " * % result = result + jrname + " " 631 | } 'skip$ if$ % } 632 | vonname empty$ not { % if (! empty(vonname)) { 633 | vonname * " " * % result = result + vonname + " " 634 | } 'skip$ if$ % } 635 | lastname empty$ not { % if (! empty(lastname)) { 636 | lastname * " " * % result = result + lastname + " " 637 | } 'skip$ if$ % } 638 | firstname empty$ not { % if (! empty(firstname)) { 639 | firstname * " " * % result = result + firstname + " " 640 | } 'skip$ if$ % } 641 | trim.end % result = trim_end(result); 642 | } while$ % } 643 | nameindex namecount < { % if (nameindex < namecount) { 644 | cap.et.al * % result = result + cap_et_al(); 645 | } 'skip$ if$ % } 646 | } % } 647 | % 648 | % 649 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 650 | % // format English names 651 | FUNCTION {format.names.en} { % String Entry::format_names_en(String names) { 652 | format.names % format_names(names); 653 | } % } 654 | % 655 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 656 | % // format Chinese names 657 | FUNCTION {format.names.zh} { % String Entry::format_names_zh(String names) { 658 | format.names % format_names(names); 659 | } % } 660 | % 661 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 662 | % 663 | FUNCTION {format.author} { % String Emtry::format_author(String authors) { 664 | is.in.chinese { % if (is_in_chinese) { 665 | format.names.zh % authors = format_names_zh(authors); 666 | } { % } else { 667 | format.names.en % authors = format_names_en(authors); 668 | } if$ % } 669 | "author" format.bibinfo % return format_bibinfo(authors, "author"); 670 | } % } 671 | % 672 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 673 | % 674 | FUNCTION {format.editor} { % String Emtry::format_author(String editors) { 675 | is.in.chinese { % if (is_in_chinese) { 676 | format.names.zh % editors = format_names_zh(editors); 677 | } { % } else { 678 | format.names.en % editors = format_names_en(editors); 679 | } if$ % } 680 | "editor" format.bibinfo % return format_bibinfo(editors, "editor"); 681 | } % } 682 | % 683 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 684 | % 685 | FUNCTION {format.translator} { % String Emtry::format_translator(String translators) { 686 | is.in.chinese { % if (is_in_chinese) { 687 | duplicate$ % String names = translators; 688 | format.names.zh % translators = format_names_zh(translators); 689 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 690 | cap.translate.zh * % translators = translators + cap_translate_zh; 691 | } { % } else { 692 | cap.comma * cap.translate.zh * % translators = translators + cap_comma + cap_translate_zh; 693 | } if$ % } 694 | } { % } else { 695 | duplicate$ % String names = translators; 696 | format.names.en % translators = format_names_en(translators); 697 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 698 | cap.translate.en * % translators = translators + cap_translate_en; 699 | } { % } else { 700 | cap.comma * cap.translate.en * % translators = translators + cap_comma + cap_translate_en; 701 | } if$ % } 702 | } if$ % } 703 | "translator" format.bibinfo % return format_bibinfo(translator, "translator"); 704 | } % } 705 | % 706 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 707 | % 708 | FUNCTION {format.title} { % String Emtry::format_title(String title) { 709 | "title" format.bibinfo % return format_bibinfo(title, "title"); 710 | } % } 711 | % 712 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 713 | % 714 | FUNCTION {format.booktitle} { % String Emtry::format_booktitle(String booktitle) { 715 | "booktitle" format.bibinfo % return format_bibinfo(booktitle, "booktitle"); 716 | } % } 717 | % 718 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 719 | % 720 | FUNCTION {format.mark} { % String Emtry::format_mark(String mark) { 721 | "[" swap$ * "]" * % mark = "[" + mark + "]"; 722 | "mark" format.bibinfo % return format_bibinfo(mark, "mark"); 723 | } % } 724 | % 725 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 726 | % 727 | FUNCTION {format.country} { % String Emtry::format_country(String country) { 728 | "country" format.bibinfo % return format_bibinfo(country, "country"); 729 | } % } 730 | % 731 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 732 | % 733 | FUNCTION {format.patentid} { % String Emtry::format_patentid(String patentid) { 734 | "patentid" format.bibinfo % return format_bibinfo(patentid, "patentid"); 735 | } % } 736 | % 737 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 738 | % 739 | FUNCTION {format.edition} { % String Emtry::format_edition(String edition) { 740 | duplicate$ is.number { % if (is_number(edition)) { 741 | is.in.chinese { % if (is_in_chinese()) { 742 | cap.edition.zh * % edition = edition + cap_edition_zh; 743 | } { % } else { 744 | num.to.ordinal.en cap.edition.en * % edition = num_to_ordinal_en(edition) + cap_edition_en; 745 | } if$ % } 746 | } 'skip$ if$ % } 747 | % // use a \mbox{} to prevent line break within edition 748 | "\mbox{" swap$ * "}" * % edition = "\mbox{" + edition + "}"; 749 | "edition" format.bibinfo % return format_bibinfo(edition, "edition"); 750 | } % } 751 | % 752 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 753 | % 754 | FUNCTION {format.organization} { % String Emtry::format_organization(String organization) { 755 | "organization" format.bibinfo % return format_bibinfo(organization, "organization"); 756 | } % } 757 | % 758 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 759 | % 760 | FUNCTION {format.address} { % String Emtry::format_address(String address) { 761 | "address" format.bibinfo % return format_bibinfo(address, "address"); 762 | } % } 763 | % 764 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 765 | % 766 | FUNCTION {format.publisher} { % String Emtry::format_publisher(String publisher) { 767 | "publisher" format.bibinfo % return format_bibinfo(publisher, "publisher"); 768 | } % } 769 | % 770 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 771 | % 772 | FUNCTION {format.institution} { % String Emtry::format_institution(String institution) { 773 | "institution" format.bibinfo % return format_bibinfo(institution, "institution"); 774 | } % } 775 | % 776 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 777 | % 778 | FUNCTION {format.school} { % String Emtry::format_school(String school) { 779 | "school" format.bibinfo % return format_bibinfo(school, "school"); 780 | } % } 781 | % 782 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 783 | % 784 | FUNCTION {format.year} { % String Emtry::format_year(String year) { 785 | "year" format.bibinfo % return format_bibinfo(year, "year"); 786 | } % } 787 | % 788 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 789 | % 790 | FUNCTION {format.date} { % String Emtry::format_date(String date) { 791 | "date" format.bibinfo % return format_bibinfo(date, "date"); 792 | } % } 793 | % 794 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 795 | % 796 | FUNCTION {format.journal} { % String Emtry::format_journal(String journal) { 797 | "journal" format.bibinfo % return format_bibinfo(journal, "journal"); 798 | } % } 799 | % 800 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 801 | % 802 | FUNCTION {format.volume} { % String Emtry::format_volume(String volume) { 803 | "volume" format.bibinfo % return format_bibinfo(volume, "volume"); 804 | } % } 805 | % 806 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 807 | % 808 | FUNCTION {format.number} { % String Emtry::format_number(String number) { 809 | add.bracket % number = add_bracket(number); 810 | "number" format.bibinfo % return format_bibinfo(number, "number"); 811 | } % } 812 | % 813 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 814 | % 815 | FUNCTION {format.report.number} { % String Emtry::format_report_number(String number) { 816 | "number" format.bibinfo % return format_bibinfo(number, "number"); 817 | } % } 818 | % 819 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 820 | % 821 | FUNCTION {format.version} { % String Emtry::format_version(String version) { 822 | "version" format.bibinfo % return format_bibinfo(version, "version"); 823 | } % } 824 | % 825 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 826 | % 827 | FUNCTION {format.pages} { % String Emtry::format_pages(String pages) { 828 | "pages" format.bibinfo % return format_bibinfo(pages, "pages"); 829 | } % } 830 | % 831 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 832 | % 833 | FUNCTION {format.modifydate} { % String Emtry::format_modifydate(String modifydate) { 834 | add.bracket % modifydate = add_bracket(modifydate); 835 | "modifydate" format.bibinfo % return format_bibinfo(modifydate, "modifydate"); 836 | } % } 837 | % 838 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 839 | % 840 | FUNCTION {format.citedate} { % String Emtry::format_citedate(String citedate) { 841 | add.squarebracket % citedate = add_squarebracket(citedate); 842 | "citedate" format.bibinfo % return format_bibinfo(citedate, "citedate"); 843 | } % } 844 | % 845 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 846 | % 847 | % // NOTE: do not use the format_bibinfo() for URL, 848 | % // since if the URL contains special symbols such 849 | % // as '%', the \biburl{} will be broken. 850 | FUNCTION {format.url} { % String Emtry::format_url(String url) { 851 | "\newline\url{" swap$ * "}" * % return "\newline\url{" + url + "}"; 852 | } % } 853 | % 854 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 855 | % 856 | FUNCTION {get.full.title} { % String Entry::get_full_title() { 857 | series empty$ { % if (empty(this.series)) { 858 | volume empty$ { % if (empty(this.volume)) { 859 | title % return this.title; 860 | } { % } else { 861 | title cap.colon * cap.volume * volume * % return this.title + cap_colon + cap_volume() + this.volume; 862 | } if$ % } 863 | } { % } else { 864 | volume empty$ { % if (empty(this.volume)) { 865 | series cap.colon * title * % return this.series + cap_colon + this.title; 866 | } { % } else { 867 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 868 | cap.colon * title * % return str + cap_colon + this.title; 869 | } if$ % } 870 | } if$ % } 871 | } % } 872 | % 873 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 874 | % 875 | FUNCTION {get.full.booktitle} { % String Entry::get_full_booktitle() { 876 | series empty$ { % if (empty(this.series)) { 877 | volume empty$ { % if (empty(this.volume)) { 878 | booktitle % return this.booktitle; 879 | } { % } else { 880 | booktitle cap.colon * cap.volume * volume * % return this.booktitle + cap_colon + cap_volume() + this.volume; 881 | } if$ % } 882 | } { % } else { 883 | volume empty$ { % if (empty(this.volume)) { 884 | series cap.colon * booktitle * % return this.series + cap_colon + this.booktitle; 885 | } { % } else { 886 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 887 | cap.colon * booktitle * % return str + cap_colon + this.booktitle; 888 | } if$ % } 889 | } if$ % } 890 | } % } 891 | % 892 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 893 | % 894 | FUNCTION {get.pages} { % String Entry::get_pages() { 895 | pages contain.dash { % if (contain_dash(this.pages)) { 896 | pages extract.before.first.dash % String p1 = extract_before_first_dash(this.pages); 897 | pages extract.after.last.dash % String p2 = extract_after_last_dash(this.pages); 898 | cap.dash swap$ * * % return p1 + cap_dash + p2; 899 | } { % } else { 900 | pages % return this.pages; 901 | } if$ % } 902 | } % } 903 | % 904 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 905 | % 906 | FUNCTION {output.author.or.editor} { % void Entry::output_author_or_editor(int required) { 907 | 'required := % this.required = required; 908 | author empty$ not { % if (! empty(this.author)) { 909 | author format.author write$ % write(format_author(this.author)); 910 | cap.period write$ % write(cap_period); 911 | } { % } else { 912 | editor empty$ not { % if (! empty(this.editor)) { 913 | editor format.editor write$ % write(format_editor(this.editor)); 914 | cap.period write$ % write(cap_period); 915 | } { % } else { 916 | required { % if (required == 1) { 917 | "Require author/editor: " cite$ * warning$% warning("Require author/editor: " + this.cite); 918 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 919 | cap.period write$ % write(cap_period); 920 | } 'skip$ if$ % } 921 | } if$ % } 922 | } if$ % } 923 | } % } 924 | % 925 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 926 | % 927 | FUNCTION {output.author} { % void Entry::output_author(int required) { 928 | 'required := % this.required = required; 929 | author empty$ not { % if (! empty(this.author)) { 930 | author format.author write$ % write(format_author(this.author)); 931 | cap.period write$ % write(cap_period); 932 | } { % } else { 933 | required { % if (required == 1) { 934 | "Require author: " cite$ * warning$ % warning("Require author: " + this.cite); 935 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 936 | cap.period write$ % write(cap_period); 937 | } 'skip$ if$ % } 938 | } if$ % } 939 | } % } 940 | % 941 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 942 | % 943 | FUNCTION {output.editor} { % void Entry::output_editor(int required) { 944 | 'required := % this.required = required; 945 | editor empty$ not { % if (! empty(this.editor)) { 946 | editor format.editor write$ % write(format_editor(this.editor)); 947 | cap.period write$ % write(cap_period); 948 | } { % } else { 949 | required { % if (required == 1) { 950 | "Require editor: " cite$ * warning$ % warning("Require editor: " + this.cite); 951 | cap.anonymous format.editor write$ % write(format_editor(cap_anonymous())); 952 | cap.period write$ % write(cap_period); 953 | } 'skip$ if$ % } 954 | } if$ % } 955 | } % } 956 | % 957 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 958 | % 959 | FUNCTION {output.title} { % void Entry::output_title(int required) { 960 | 'required := % this.required = required; 961 | title empty$ not { % if (! empty(this.title)) { 962 | title format.title write$ % write(format_title(this.title)); 963 | } { % } else { 964 | required { % if (required == 1) { 965 | "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); 966 | } 'skip$ if$ % } 967 | } if$ % } 968 | } % } 969 | % 970 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 971 | % 972 | FUNCTION {output.series.volume.title} { % void Entry::output_series_volume_title(int required) { 973 | 'required := % this.required = required; 974 | title empty$ not { % if (! empty(this.title)) { 975 | get.full.title format.booktitle write$ % write(format_booktitle(get_full_title())); 976 | } { % } else { 977 | required { % if (required == 1) { 978 | "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); 979 | } 'skip$ if$ % } 980 | } if$ % } 981 | } % } 982 | % 983 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 984 | % 985 | FUNCTION {output.series.volume.booktitle} { % void Entry::output_series_volume_booktitle(int required) { 986 | 'required := % this.required = required; 987 | booktitle empty$ not { % if (! empty(this.booktitle)) { 988 | get.full.booktitle format.booktitle write$ % write(format_booktitle(get_full_booktitle()); 989 | } { % } else { 990 | required { % if (required == 1) { 991 | "Require booktitle: " cite$ * warning$ % warning("Require booktitle: " + this.cite); 992 | } 'skip$ if$ % } 993 | } if$ % } 994 | } % } 995 | % 996 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 997 | % 998 | FUNCTION {output.journal} { % void Entry::output_journal(int required) { 999 | 'required := % this.required = required; 1000 | journal empty$ not { % if (! empty(this.journal)) { 1001 | cap.period write$ % write(cap_period); 1002 | journal format.journal write$ % write(format_journal(this.journal)); 1003 | } { % } else { 1004 | required { % if (required == 1) { 1005 | "Require journal: " cite$ * warning$ % warning("Require journal: " + this.cite); 1006 | } 'skip$ if$ % } 1007 | } if$ % } 1008 | } % } 1009 | % 1010 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1011 | % 1012 | FUNCTION {output.mark} { % void Entry::output_mark(int required) { 1013 | 'required := % this.required = required; 1014 | mark empty$ not { % if (! empty(this.mark)) { 1015 | mark format.mark write$ % write(format_mark(this.mark)); 1016 | } { % } else { 1017 | required { % if (required == 1) { 1018 | "Require mark: " cite$ * warning$ % warning("Require mark: " + this.cite); 1019 | } 'skip$ if$ % } 1020 | } if$ % } 1021 | } % } 1022 | % 1023 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1024 | % 1025 | FUNCTION {output.translator} { % void Entry::output_translator(int required) { 1026 | 'required := % this.required = required; 1027 | translator empty$ not { % if (! empty(this.translator)) { 1028 | cap.period write$ % write(cap_period); 1029 | translator format.translator write$ % write(format_translator(this.translator)); 1030 | } { % } else { 1031 | required { % if (required == 1) { 1032 | "Require translator: " cite$ * warning$ % warning("Require translator: " + this.cite); 1033 | } 'skip$ if$ % } 1034 | } if$ % } 1035 | } % } 1036 | % 1037 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1038 | % 1039 | FUNCTION {output.edition} { % void Entry::output_edition(int required) { 1040 | 'required := % this.required = required; 1041 | edition empty$ not { % if (! empty(this.edition)) { 1042 | cap.period write$ % write(cap_period); 1043 | edition format.edition write$ % write(format_edition(this.edition)); 1044 | } { % } else { 1045 | required { % if (required == 1) { 1046 | "Require edition: " cite$ * warning$ % warning("Require edition: " + this.cite); 1047 | } 'skip$ if$ % } 1048 | } if$ % } 1049 | } % } 1050 | % 1051 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1052 | % 1053 | FUNCTION {output.address} { % void Entry::output_address(int required) { 1054 | 'required := % this.required = required; 1055 | address empty$ not { % if (! empty(this.address)) { 1056 | cap.period write$ % write(cap_period); 1057 | address format.address write$ % write(format_address(this.address)); 1058 | } { % } else { 1059 | required { % if (required == 1) { 1060 | "Require address: " cite$ * warning$ % warning("Require address: " + this.cite); 1061 | cap.period write$ % write(cap_period); 1062 | cap.no.address format.address write$ % write(format_address(cap_no_address())); 1063 | } 'skip$ if$ % } 1064 | } if$ % } 1065 | } % } 1066 | % 1067 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1068 | % 1069 | FUNCTION {output.publisher} { % void Entry::output_publisher(int required) { 1070 | 'required := % this.required = required; 1071 | publisher empty$ not { % if (! empty(this.publisher)) { 1072 | cap.colon write$ % write(cap_colon); 1073 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1074 | } { % } else { 1075 | required { % if (required == 1) { 1076 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1077 | cap.colon write$ % write(cap_colon); 1078 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1079 | } 'skip$ if$ % } 1080 | } if$ % } 1081 | } % } 1082 | % 1083 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1084 | % 1085 | FUNCTION {output.publisher.no.address} { % void Entry::output_publisher_no_address(int required) { 1086 | 'required := % this.required = required; 1087 | publisher empty$ not { % if (! empty(this.publisher)) { 1088 | cap.period write$ % write(cap_period); 1089 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1090 | } { % } else { 1091 | required { % if (required == 1) { 1092 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1093 | cap.period write$ % write(cap_period); 1094 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1095 | } 'skip$ if$ % } 1096 | } if$ % } 1097 | } % } 1098 | % 1099 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1100 | % 1101 | FUNCTION {output.school} { % void Entry::output_school(int required) { 1102 | 'required := % this.required = required; 1103 | school empty$ not { % if (! empty(this.school)) { 1104 | cap.colon write$ % write(cap_colon); 1105 | school format.school write$ % write(format_school(this.school)); 1106 | } { % } else { 1107 | required { % if (required == 1) { 1108 | "Require school: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1109 | cap.colon write$ % write(cap_colon); 1110 | cap.no.publisher format.school write$ % write(format_school(cap_no_publisher())); 1111 | } 'skip$ if$ % } 1112 | } if$ % } 1113 | } % } 1114 | % 1115 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1116 | % 1117 | FUNCTION {output.institution} { % void Entry::output_institution(int required) { 1118 | 'required := % this.required = required; 1119 | institution empty$ not { % if (! empty(this.institution)) { 1120 | cap.colon write$ % write(cap_colon); 1121 | institution format.institution write$ % write(format_publisher(this.institution)); 1122 | } { % } else { 1123 | required { % if (required == 1) { 1124 | "Require institution: " cite$ * warning$ % warning("Require institution: " + this.cite); 1125 | cap.colon write$ % write(cap_colon); 1126 | cap.no.publisher format.institution write$ % write(format_institution(cap_no_publisher())); 1127 | } 'skip$ if$ % } 1128 | } if$ % } 1129 | } % } 1130 | % 1131 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1132 | % 1133 | FUNCTION {output.year} { % void Entry::output_year(int required) { 1134 | 'required := % this.required = required; 1135 | year empty$ not { % if (! empty(this.year)) { 1136 | year format.year write$ % write(format_year(this.year)); 1137 | } { % } else { 1138 | required { % if (required == 1) { 1139 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1140 | } 'skip$ if$ % } 1141 | } if$ % } 1142 | } % } 1143 | % 1144 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1145 | % 1146 | FUNCTION {output.pages} { % void Entry::output_pages(int required) { 1147 | 'required := % this.required = required; 1148 | pages empty$ not { % if (! empty(this.pages)) { 1149 | cap.colon write$ % write(cap_colon); 1150 | get.pages format.pages write$ % write(format_pages(get_pages())); 1151 | } { % } else { 1152 | required { % if (required == 1) { 1153 | "Require pages: " cite$ * warning$ % warning("Require pages: " + this.cite); 1154 | } 'skip$ if$ % } 1155 | } if$ % } 1156 | } % } 1157 | % 1158 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1159 | % 1160 | FUNCTION {output.modifydate} { % void Entry::output_modifydate(int required) { 1161 | 'required := % this.required = required; 1162 | modifydate empty$ not { % if (! empty(this.modifydate)) { 1163 | cap.space write$ % write(cap_space); 1164 | modifydate format.modifydate write$ % write(format_modifydate(this.modifydate)); 1165 | } { % } else { 1166 | required { % if (required == 1) { 1167 | "Require modifydate: " cite$ * warning$ % warning("Require modifydate: " + this.cite); 1168 | } 'skip$ if$ % } 1169 | } if$ % } 1170 | } % } 1171 | % 1172 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1173 | % 1174 | FUNCTION {output.citedate} { % void Entry::output_citedate(int required) { 1175 | 'required := % this.required = required; 1176 | citedate empty$ not { % if (! empty(this.citedate)) { 1177 | cap.space write$ % write(cap_space); 1178 | citedate format.citedate write$ % write(format_citedate(this.citedate)); 1179 | } { % } else { 1180 | required is.online or { % if ((required == 1) || (is_online())) { 1181 | "Require citedate: " cite$ * warning$ % warning("Require citedate: " + this.cite); 1182 | } 'skip$ if$ % } 1183 | } if$ % } 1184 | } % } 1185 | % 1186 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1187 | % 1188 | FUNCTION {output.date} { % void Entry::output_date(int required) { 1189 | 'required := % this.required = required; 1190 | date empty$ not { % if (! empty(this.date)) { 1191 | date format.date write$ % write(format_date(this.date)); 1192 | } { % } else { 1193 | required { % if (required == 1) { 1194 | "Require date: " cite$ * warning$ % warning("Require date: " + this.cite); 1195 | } 'skip$ if$ % } 1196 | } if$ % } 1197 | } % } 1198 | % 1199 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1200 | % 1201 | FUNCTION {output.volume} { % void Entry::output_volume(int required) { 1202 | 'required := % this.required = required; 1203 | volume empty$ not { % if (! empty(this.volume)) { 1204 | cap.comma write$ % write(cap_comma); 1205 | volume format.volume write$ % write(format_volume(this.volume)); 1206 | } { % } else { 1207 | required { % if (required == 1) { 1208 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1209 | } 'skip$ if$ % } 1210 | } if$ % } 1211 | } % } 1212 | % 1213 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1214 | % 1215 | FUNCTION {output.number} { % void Entry::output_number(int required) { 1216 | 'required := % this.required = required; 1217 | number empty$ not { % if (! empty(this.number)) { 1218 | number format.number write$ % write(format_number(this.number)); 1219 | } { % } else { 1220 | required { % if (required == 1) { 1221 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1222 | } 'skip$ if$ % } 1223 | } if$ % } 1224 | } % } 1225 | % 1226 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1227 | % 1228 | FUNCTION {output.report.number} { % void Entry::output_report_number(int required) { 1229 | 'required := % this.required = required; 1230 | number empty$ not { % if (! empty(this.number)) { 1231 | cap.colon write$ % write(cap_colon); 1232 | number format.report.number write$ % write(format_report_number(this.number)); 1233 | } { % } else { 1234 | required { % if (required == 1) { 1235 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1236 | } 'skip$ if$ % } 1237 | } if$ % } 1238 | } % } 1239 | % 1240 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1241 | % 1242 | FUNCTION {output.country} { % void Entry::output_country(int required) { 1243 | 'required := % this.required = required; 1244 | country empty$ not { % if (! empty(this.country)) { 1245 | cap.colon write$ % write(cap_colon); 1246 | country format.country write$ % write(format_country(this.country)); 1247 | } { % } else { 1248 | required { % if (required == 1) { 1249 | "Require country: " cite$ * warning$ % warning("Require country: " + this.cite); 1250 | } 'skip$ if$ % } 1251 | } if$ % } 1252 | } % } 1253 | % 1254 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1255 | % 1256 | FUNCTION {output.patentid} { % void Entry::output_patentid(int required) { 1257 | 'required := % this.required = required; 1258 | patentid empty$ not { % if (! empty(this.patentid)) { 1259 | cap.comma write$ % write(cap_comma); 1260 | patentid format.patentid write$ % write(format_patentid(this.patentid)); 1261 | } { % } else { 1262 | required { % if (required == 1) { 1263 | "Require patentid: " cite$ * warning$ % warning("Require patentid: " + this.cite); 1264 | } 'skip$ if$ % } 1265 | } if$ % } 1266 | } % } 1267 | % 1268 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1269 | % 1270 | FUNCTION {output.start.year} { % void Entry::output_start_year(int required) { 1271 | 'required := % this.required = required; 1272 | year empty$ not { % if (! empty(this.year)) { 1273 | year extract.before.first.dash % String str = extract_before_first_dash(this.year); 1274 | format.year write$ % write(format_year(str)); 1275 | } { % } else { 1276 | required { % if (required == 1) { 1277 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1278 | } 'skip$ if$ % } 1279 | } if$ % } 1280 | } % } 1281 | % 1282 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1283 | % 1284 | FUNCTION {output.start.volume} { % void Entry::output_start_volume(int required) { 1285 | 'required := % this.required = required; 1286 | volume empty$ not { % if (! empty(this.volume)) { 1287 | cap.comma write$ % write(cap_comma); 1288 | volume extract.before.first.dash % String str = extract_before_first_dash(this.volume); 1289 | format.volume write$ % write(format_volume(str)); 1290 | } { % } else { 1291 | required { % if (required == 1) { 1292 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1293 | } 'skip$ if$ % } 1294 | } if$ % } 1295 | } % } 1296 | % 1297 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1298 | % 1299 | FUNCTION {output.start.number} { % void Entry::output_start_number(int required) { 1300 | 'required := % this.required = required; 1301 | number empty$ not { % if (! empty(this.number)) { 1302 | number extract.before.first.dash % String str = extract_before_first_dash(this.number); 1303 | format.number write$ % write(format_number(str)); 1304 | } { % } else { 1305 | required { % if (required == 1) { 1306 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1307 | } 'skip$ if$ % } 1308 | } if$ % } 1309 | } % } 1310 | % 1311 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1312 | % 1313 | FUNCTION {output.end.year} { % void Entry::output_end_year(int required) { 1314 | 'required := % this.required = required; 1315 | year empty$ not { % if (! empty(this.year)) { 1316 | year extract.after.last.dash % String str = extract_after_last_dash(this.year); 1317 | format.year write$ % write(format_year(str)); 1318 | } { % } else { 1319 | required { % if (required == 1) { 1320 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1321 | } 'skip$ if$ % } 1322 | } if$ % } 1323 | } % } 1324 | % 1325 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1326 | % 1327 | FUNCTION {output.end.volume} { % void Entry::output_end_volume(int required) { 1328 | 'required := % this.required = required; 1329 | volume empty$ not { % if (! empty(this.volume)) { 1330 | cap.comma write$ % write(cap_comma); 1331 | volume extract.after.last.dash % String str = extract_after_last_dash(this.volume); 1332 | format.volume write$ % write(format_volume(str)); 1333 | } { % } else { 1334 | required { % if (required == 1) { 1335 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1336 | } 'skip$ if$ % } 1337 | } if$ % } 1338 | } % } 1339 | % 1340 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1341 | % 1342 | FUNCTION {output.end.number} { % void Entry::output_end_number(int required) { 1343 | 'required := % this.required = required; 1344 | number empty$ not { % if (! empty(this.number)) { 1345 | number extract.after.last.dash % String str = extract_after_last_dash(this.number); 1346 | format.number write$ % write(format_number(str)); 1347 | } { % } else { 1348 | required { % if (required == 1) { 1349 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1350 | } 'skip$ if$ % } 1351 | } if$ % } 1352 | } % } 1353 | % 1354 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1355 | % 1356 | FUNCTION {output.url.or.doi} { % void Entry::output_url_or_doi(int required) { 1357 | 'required := % this.required = required; 1358 | url empty$ not { % if (! empty(this.url)) { 1359 | cap.period write$ % write(cap_period); 1360 | url format.url write$ % write(format_url(this.url)); 1361 | } { % } else { 1362 | doi empty$ not { % if (! empty(this.doi)) { 1363 | cap.period write$ % write(cap_period); 1364 | cap.doi.url doi * format.url write$ % write(format_url(cap_doi_url + this.doi)); 1365 | } { % } else { 1366 | required { % if (required == 1) { 1367 | "Require URL or DOI: " cite$ * warning$ % warning("Require URL or DOI: " + this.cite); 1368 | } 'skip$ if$ % } 1369 | } if$ % } 1370 | } if$ % } 1371 | } % } 1372 | % 1373 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1374 | % 1375 | FUNCTION {output.url} { % void Entry::output_url(int required) { 1376 | 'required := % this.required = required; 1377 | url empty$ not { % if (! empty(this.url)) { 1378 | cap.period write$ % write(cap_period); 1379 | url format.url write$ % write(format_url(this.url)); 1380 | } { % } else { 1381 | required { % if (required == 1) { 1382 | "Require URL: " cite$ * warning$ % warning("Require URL: " + this.cite); 1383 | } 'skip$ if$ % } 1384 | } if$ % } 1385 | } % } 1386 | % 1387 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1388 | % 1389 | FUNCTION {output.version} { % void Entry::output_version(int required) { 1390 | 'required := % this.required = required; 1391 | version empty$ not { % if (! empty(this.version)) { 1392 | cap.period write$ % write(cap_period); 1393 | version format.version write$ % write(format_version(this.version)); 1394 | } { % } else { 1395 | required { % if (required == 1) { 1396 | "Require version: " cite$ * warning$ % warning("Require version: " + this.cite); 1397 | } 'skip$ if$ % } 1398 | } if$ % } 1399 | } % } 1400 | % 1401 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1402 | % 1403 | FUNCTION {book.impl} { % void Entry::book_impl() { 1404 | start.bibitem % start_bibitem(); 1405 | true output.author.or.editor % output_author_or_editor(true); 1406 | true output.series.volume.title % output_series_volume_title(true); 1407 | true output.mark % output_mark(true); 1408 | false output.translator % output_translator(false); 1409 | false output.edition % output_edition(false); 1410 | publisher empty$ not { % if (! empty(this.publisher)) { 1411 | true output.address % output_address(true); 1412 | true output.publisher % output_publisher(true); 1413 | cap.comma write$ % write(cap_comma); 1414 | } { % } else { 1415 | cap.period write$ % write(cap_period); 1416 | } if$ % } 1417 | true output.year % output_year(true); 1418 | false output.pages % output_pages(false); 1419 | false output.citedate % output_citedate(false); 1420 | false output.url.or.doi % output_url_or_doi(false); 1421 | end.bibitem % end_bibitem(); 1422 | } % } 1423 | % 1424 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1425 | % 1426 | FUNCTION {book} { % void Entry::book() { 1427 | "M" set.mark % set_mark("M"); 1428 | book.impl % book_impl(); 1429 | } % } 1430 | % 1431 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1432 | % 1433 | FUNCTION {collection} { % void Entry::collection() { 1434 | "G" set.mark % set_mark("G"); 1435 | book.impl % book_impl(); 1436 | } % } 1437 | % 1438 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1439 | % 1440 | FUNCTION {proceedings} { % void Entry::proceedings() { 1441 | "C" set.mark % set_mark("C"); 1442 | start.bibitem % start_bibitem(); 1443 | true output.editor % output_editor(true); 1444 | true output.series.volume.title % output_series_volume_title(true); 1445 | true output.mark % output_mark(true); 1446 | false output.translator % output_translator(false); 1447 | false output.edition % output_edition(false); 1448 | publisher empty$ not { % if (! empty(this.publisher)) { 1449 | true output.address % output_address(true); 1450 | true output.publisher % output_publisher(true); 1451 | cap.comma write$ % write(cap_comma); 1452 | } { % } else { 1453 | cap.period write$ % write(cap_period); 1454 | } if$ % } 1455 | true output.year % output_year(true); 1456 | false output.pages % output_pages(false); 1457 | false output.citedate % output_citedate(false); 1458 | false output.url.or.doi % output_url_or_doi(false); 1459 | end.bibitem % end_bibitem(); 1460 | } % } 1461 | % 1462 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1463 | % 1464 | FUNCTION {conference} { % void Entry::conference() { 1465 | proceedings % proceedings(); 1466 | } % } 1467 | % 1468 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1469 | % 1470 | FUNCTION {thesis.impl} { % void Entry::thesis_impl() { 1471 | start.bibitem % start_bibitem(); 1472 | true output.author % output_author(true); 1473 | true output.title % output_title(true); 1474 | true output.mark % output_mark(true); 1475 | false output.translator % output_translator(false); 1476 | true output.address % output_address(true); 1477 | true output.school % output_school(true); 1478 | cap.comma write$ % write(cap_comma); 1479 | true output.year % output_year(true); 1480 | false output.pages % output_pages(false); 1481 | false output.citedate % output_citedate(false); 1482 | false output.url.or.doi % output_url_or_doi(false); 1483 | end.bibitem % end_bibitem(); 1484 | } % } 1485 | % 1486 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1487 | % 1488 | FUNCTION {phdthesis} { % void Entry::phdthesis() { 1489 | "D" set.mark % set_mark("D"); 1490 | thesis.impl % thesis_impl(); 1491 | } % } 1492 | % 1493 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1494 | % 1495 | FUNCTION {masterthesis} { % void Entry::masterthesis() { 1496 | "D" set.mark % set_mark("D"); 1497 | thesis.impl % thesis_impl(); 1498 | } % } 1499 | % 1500 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1501 | % 1502 | FUNCTION {bachelorthesis} { % void Entry::bachelorthesis() { 1503 | "D" set.mark % set_mark("D"); 1504 | thesis.impl % thesis_impl(); 1505 | } % } 1506 | % 1507 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1508 | % 1509 | FUNCTION {techreport} { % void Entry::techreport() { 1510 | "R" set.mark % set_mark("R"); 1511 | start.bibitem % start_bibitem(); 1512 | true output.author % output_author(true); 1513 | true output.title % output_title(true); 1514 | false output.report.number % output_report_number(false); 1515 | true output.mark % output_mark(true); 1516 | false output.translator % output_translator(false); 1517 | false output.edition % output_edition(false); 1518 | false output.version % output_version(false); 1519 | institution empty$ not { % if (! empty(this.institution)) { 1520 | true output.address % output_address(true); 1521 | true output.institution % output_institution(true); 1522 | cap.comma write$ % write(cap_comma); 1523 | } { % } else { 1524 | cap.period write$ % write(cap_period); 1525 | } if$ % } 1526 | true output.year % output_year(true); 1527 | false output.pages % output_pages(false); 1528 | false output.citedate % output_citedate(false); 1529 | false output.url.or.doi % output_url_or_doi(false); 1530 | end.bibitem % end_bibitem(); 1531 | } % } 1532 | % 1533 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1534 | % 1535 | FUNCTION {standard} { % void Entry::standard() { 1536 | "S" set.mark % set_mark("S"); 1537 | start.bibitem % start_bibitem(); 1538 | true output.author % output_author(true); 1539 | true output.title % output_title(true); 1540 | true output.mark % output_mark(true); 1541 | false output.translator % output_translator(false); 1542 | false output.edition % output_edition(false); 1543 | publisher empty$ not { % if (! empty(this.publisher)) { 1544 | true output.address % output_address(true); 1545 | true output.publisher % output_publisher(true); 1546 | cap.comma write$ % write(cap_comma); 1547 | } { % } else { 1548 | cap.period write$ % write(cap_period); 1549 | } if$ % } 1550 | true output.year % output_year(true); 1551 | false output.pages % output_pages(false); 1552 | false output.citedate % output_citedate(false); 1553 | false output.url.or.doi % output_url_or_doi(false); 1554 | end.bibitem % end_bibitem(); 1555 | } % } 1556 | % 1557 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1558 | % 1559 | FUNCTION {reference} { % void Entry::reference() { 1560 | "K" set.mark % set_mark("K"); 1561 | start.bibitem % start_bibitem(); 1562 | false output.author.or.editor % output_author_or_editor(false); 1563 | true output.series.volume.title % output_series_volume_title(true); 1564 | true output.mark % output_mark(true); 1565 | false output.translator % output_translator(false); 1566 | false output.edition % output_edition(false); 1567 | publisher empty$ not { % if (! empty(this.publisher)) { 1568 | true output.address % output_address(true); 1569 | true output.publisher % output_publisher(true); 1570 | cap.comma write$ % write(cap_comma); 1571 | } { % } else { 1572 | cap.period write$ % write(cap_period); 1573 | } if$ % } 1574 | true output.year % output_year(true); 1575 | false output.pages % output_pages(false); 1576 | false output.citedate % output_citedate(false); 1577 | false output.url.or.doi % output_url_or_doi(false); 1578 | end.bibitem % end_bibitem(); 1579 | } % } 1580 | % 1581 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1582 | % 1583 | FUNCTION {manual} { % void Entry::manual() { 1584 | reference % reference(); 1585 | } % } 1586 | % 1587 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1588 | % 1589 | FUNCTION {periodical.impl} { % void Entry::periodical_impl() { 1590 | start.bibitem % start_bibitem(); 1591 | false output.editor % output_editor(false); 1592 | true output.title % output_title(true); 1593 | true output.mark % output_mark(true); 1594 | cap.period write$ % write(cap_period); 1595 | true output.start.year % output_start_year(true); 1596 | false output.start.volume % output_start_volume(false); 1597 | false output.start.number % output_start_number(false); 1598 | cap.dash write$ % write(cap_dash); 1599 | year contain.dash { % if (contain_dash(this.year)) { 1600 | true output.end.year % output_end_year(true); 1601 | false output.end.volume % output_end_volume(false); 1602 | false output.end.number % output_end_number(false); 1603 | } 'skip$ if$ % } 1604 | publisher empty$ not { % if (! empty(this.publisher)) { 1605 | true output.address % output_address(true); 1606 | true output.publisher % output_publisher(true); 1607 | cap.comma write$ % write(cap_comma); 1608 | } { % } else { 1609 | cap.period write$ % write(cap_period); 1610 | } if$ % } 1611 | true output.start.year % output_start_year(true); 1612 | cap.dash write$ % write(cap_dash); 1613 | year contain.dash { % if (contain_dash(this.year)) { 1614 | true output.end.year % output_end_year(true); 1615 | } 'skip$ if$ % } 1616 | false output.citedate % output_citedate(false); 1617 | false output.url.or.doi % output_url_or_doi(false); 1618 | end.bibitem % end_bibitem(); 1619 | } % } 1620 | % 1621 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1622 | % 1623 | FUNCTION {periodical} { % void Entry::periodical() { 1624 | "J" set.mark % set_mark("J"); 1625 | periodical.impl % periodical_impl(); 1626 | } % } 1627 | % 1628 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1629 | % 1630 | FUNCTION {newspaper} { % void Entry::newspaper() { 1631 | "N" set.mark % set_mark("N"); 1632 | periodical.impl % periodical_impl(); 1633 | } % } 1634 | % 1635 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1636 | % 1637 | FUNCTION {patent} { % void Entry::patent() { 1638 | "P" set.mark % set_mark("P"); 1639 | start.bibitem % start_bibitem(); 1640 | true output.author % output_author(true); 1641 | true output.title % output_title(true); 1642 | true output.country % output_country(true); 1643 | true output.patentid % output_patentid(true); 1644 | true output.mark % output_mark(true); 1645 | cap.period write$ % write(cap_period); 1646 | true output.date % output_date(true); 1647 | false output.citedate % output_citedate(false); 1648 | false output.url.or.doi % output_url_or_doi(false); 1649 | end.bibitem % end_bibitem(); 1650 | } % } 1651 | % 1652 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1653 | % 1654 | FUNCTION {online} { % void Entry::online() { 1655 | "EB" set.mark % set_mark("EB"); 1656 | start.bibitem % start_bibitem(); 1657 | false output.author % output_author(false); 1658 | true output.title % output_title(true); 1659 | true output.mark % output_mark(true); 1660 | publisher empty$ not { % if (! empty(this.publisher)) { 1661 | address empty$ not { % if (! empty(this.address)) { 1662 | true output.address % output_address(true); 1663 | true output.publisher % output_publisher(true); 1664 | cap.comma write$ % write(cap_comma); 1665 | } { % } else { 1666 | true output.publisher.no.address % output_publisher_no_address(true); 1667 | cap.comma write$ % write(cap_comma); 1668 | } if$ % } 1669 | } { % } else { 1670 | cap.period write$ % write(cap_period); 1671 | } if$ % } 1672 | true output.year % output_year(true); 1673 | false output.modifydate % output_modifydate(false); 1674 | true output.citedate % output_citedate(true); 1675 | true output.url % output_url(true); 1676 | end.bibitem % end_bibitem(); 1677 | } % } 1678 | % 1679 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1680 | % 1681 | FUNCTION {webpage} { % void Entry::online() { 1682 | online % online(); 1683 | } % } 1684 | % 1685 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1686 | % 1687 | FUNCTION {program.impl} { % void Entry::program_impl() { 1688 | start.bibitem % start_bibitem(); 1689 | false output.author % output_author(false); 1690 | true output.title % output_title(true); 1691 | true output.mark % output_mark(true); 1692 | publisher empty$ not { % if (! empty(this.publisher)) { 1693 | true output.address % output_address(true); 1694 | true output.publisher % output_publisher(true); 1695 | cap.comma write$ % write(cap_comma); 1696 | } { % } else { 1697 | cap.period write$ % write(cap_period); 1698 | } if$ % } 1699 | true output.year % output_year(true); 1700 | false output.citedate % output_citedate(false); 1701 | false output.url.or.doi % output_url_or_doi(false); 1702 | end.bibitem % end_bibitem(); 1703 | } % } 1704 | % 1705 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1706 | % 1707 | FUNCTION {program} { % void Entry::program() { 1708 | "CP" set.mark % set_mark("CP"); 1709 | program.impl % program_impl(); 1710 | } % } 1711 | % 1712 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1713 | % 1714 | FUNCTION {database} { % void Entry::database() { 1715 | "DB" set.mark % set_mark("DB"); 1716 | program.impl % program_impl(); 1717 | } % } 1718 | % 1719 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1720 | % 1721 | FUNCTION {unpublished} { % void Entry::unpublished() { 1722 | "H" set.mark % set_mark("H"); 1723 | start.bibitem % start_bibitem(); 1724 | true output.author % output_author(true); 1725 | true output.title % output_title(true); 1726 | true output.mark % output_mark(true); 1727 | cap.period write$ % write(cap_period); 1728 | true output.year % output_year(true); 1729 | false output.citedate % output_citedate(false); 1730 | false output.url.or.doi % output_url_or_doi(false); 1731 | end.bibitem % end_bibitem(); 1732 | } % } 1733 | % 1734 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1735 | % 1736 | FUNCTION {manuscript} { % void Entry::manuscript() { 1737 | unpublished % unpublished(); 1738 | } % } 1739 | % 1740 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1741 | % 1742 | FUNCTION {inbook.impl} { % void Entry::inbook_impl() { 1743 | start.bibitem % start_bibitem(); 1744 | true output.author % output_author(true); 1745 | true output.title % output_title(true); 1746 | true output.mark % output_mark(true); 1747 | false output.translator % output_translator(false); 1748 | cap.double.slash write$ % write(cap_double_slash); 1749 | false output.editor % output_editor(false); 1750 | true output.series.volume.booktitle % output_series_volume_booktitle(true); 1751 | false output.edition % output_edition(false); 1752 | publisher empty$ not { % if (! empty(this.publisher)) { 1753 | true output.address % output_address(true); 1754 | true output.publisher % output_publisher(true); 1755 | cap.comma write$ % write(cap_comma); 1756 | } { % } else { 1757 | cap.period write$ % write(cap_period); 1758 | } if$ % } 1759 | true output.year % output_year(true); 1760 | false output.pages % output_pages(false); 1761 | false output.citedate % output_citedate(false); 1762 | false output.url.or.doi % output_url_or_doi(false); 1763 | end.bibitem % end_bibitem(); 1764 | } % } 1765 | % 1766 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1767 | % 1768 | FUNCTION {inbook} { % void Entry::inbook() { 1769 | "M" set.mark % set_mark("M"); 1770 | inbook.impl % inbook_impl(); 1771 | } % } 1772 | % 1773 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1774 | % 1775 | FUNCTION {incollection} { % void Entry::incollection() { 1776 | "G" set.mark % set_mark("G"); 1777 | inbook.impl % inbook_impl(); 1778 | } % } 1779 | % 1780 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1781 | % 1782 | FUNCTION {inproceedings} { % void Entry::inproceedings() { 1783 | "C" set.mark % set_mark("C"); 1784 | inbook.impl % inbook_impl(); 1785 | } % } 1786 | % 1787 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1788 | % 1789 | FUNCTION {article} { % void Entry::article() { 1790 | "J" set.mark % set_mark("J"); 1791 | start.bibitem % start_bibitem(); 1792 | true output.author % output_author(true); 1793 | true output.title % output_title(true); 1794 | true output.mark % output_mark(true); 1795 | true output.journal % output_journal(true); 1796 | cap.comma write$ % write(cap_comma); 1797 | true output.year % output_year(true); 1798 | false output.volume % output_volume(false); 1799 | false output.number % output_number(false); 1800 | false output.pages % output_pages(false); 1801 | false output.citedate % output_citedate(false); 1802 | false output.url.or.doi % output_url_or_doi(false); 1803 | end.bibitem % end_bibitem(); 1804 | } % } 1805 | % 1806 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1807 | % 1808 | FUNCTION {news} { % void Entry::news() { 1809 | "N" set.mark % set_mark("N"); 1810 | start.bibitem % start_bibitem(); 1811 | true output.author % output_author(true); 1812 | true output.title % output_title(true); 1813 | true output.mark % output_mark(true); 1814 | true output.journal % output_journal(true); 1815 | cap.comma write$ % write(cap_comma); 1816 | true output.date % output_date(true); 1817 | false output.number % output_number(false); 1818 | false output.citedate % output_citedate(false); 1819 | false output.url.or.doi % output_url_or_doi(false); 1820 | end.bibitem % end_bibitem(); 1821 | } % } 1822 | % 1823 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1824 | % 1825 | FUNCTION {default.type} { % void Entry::default_type() { 1826 | "Unsupported entry type for " cite$ * warning$ % warning("Unsupported entry type for " + this.cite); 1827 | } % } 1828 | % 1829 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1830 | % 1831 | FUNCTION {longest.label.pass} { % void longest_label_pass(Entry entry) { 1832 | entry.count #1 + 'entry.count := % entry_count = entry_count + 1; 1833 | entry.count int.to.str$ 'label := % this.label = int_to_str(entry_count); 1834 | label width$ longest.label.width > { % if (width(this.label) > longest_label_width) { 1835 | label 'longest.label := % longest_label = this.label; 1836 | label width$ 'longest.label.width := % longest_label_width = width(this.label); 1837 | } 'skip$ if$ % } 1838 | } % } 1839 | % 1840 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1841 | % 1842 | FUNCTION {write.style.commands} { % void write_style_commands() { 1843 | cmd.bibauthor write$ % write(cmd_bibauthor); 1844 | newline$ % writeln(); 1845 | cmd.bibeditor write$ % write(cmd_bibeditor); 1846 | newline$ % writeln(); 1847 | cmd.bibtranslator write$ % write(cmd_bibtranslator); 1848 | newline$ % writeln(); 1849 | cmd.bibtitle write$ % write(cmd_bibtitle); 1850 | newline$ % writeln(); 1851 | cmd.bibbooktitle write$ % write(cmd_bibbooktitle); 1852 | newline$ % writeln(); 1853 | cmd.bibjournal write$ % write(cmd_bibjournal); 1854 | newline$ % writeln(); 1855 | cmd.bibmark write$ % write(cmd_bibmark); 1856 | newline$ % writeln(); 1857 | cmd.bibcountry write$ % write(cmd_bibcountry); 1858 | newline$ % writeln(); 1859 | cmd.bibpatentid write$ % write(cmd_bibpatentid); 1860 | newline$ % writeln(); 1861 | cmd.bibedition write$ % write(cmd_bibedition); 1862 | newline$ % writeln(); 1863 | cmd.biborganization write$ % write(cmd_biborganization); 1864 | newline$ % writeln(); 1865 | cmd.bibaddress write$ % write(cmd_bibaddress); 1866 | newline$ % writeln(); 1867 | cmd.bibpublisher write$ % write(cmd_bibpublisher); 1868 | newline$ % writeln(); 1869 | cmd.bibinstitution write$ % write(cmd_bibinstitution); 1870 | newline$ % writeln(); 1871 | cmd.bibschool write$ % write(cmd_bibschool); 1872 | newline$ % writeln(); 1873 | cmd.bibvolume write$ % write(cmd_bibvolume); 1874 | newline$ % writeln(); 1875 | cmd.bibnumber write$ % write(cmd_bibnumber); 1876 | newline$ % writeln(); 1877 | cmd.bibversion write$ % write(cmd_bibversion); 1878 | newline$ % writeln(); 1879 | cmd.bibpages write$ % write(cmd_bibpages); 1880 | newline$ % writeln(); 1881 | cmd.bibmodifydate write$ % write(cmd_bibmodifydate); 1882 | newline$ % writeln(); 1883 | cmd.bibcitedate write$ % write(cmd_bibcitedate); 1884 | newline$ % writeln(); 1885 | cmd.bibyear write$ % write(cmd_bibyear); 1886 | newline$ % writeln(); 1887 | cmd.bibdate write$ % write(cmd_bibdate); 1888 | newline$ % writeln(); 1889 | cmd.biburl write$ % write(cmd_biburl); 1890 | newline$ % writeln(); 1891 | } % } 1892 | % 1893 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1894 | % 1895 | FUNCTION {begin.bib} { % void begin_bib() { 1896 | preamble$ empty$ not { % if (! empty(premble)) { 1897 | preamble$ write$ % write(premeable); 1898 | newline$ % writeln(); 1899 | } 'skip$ if$ % } 1900 | env.bibbegin write$ % write(env_bibbegin); 1901 | "{" longest.label * "}" * write$ % write("{" + longest.label + "}"); 1902 | newline$ % writeln(); 1903 | write.style.commands % write_style_commands(); 1904 | } % } 1905 | % 1906 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1907 | % 1908 | FUNCTION {end.bib} { % void end_bib() { 1909 | newline$ % writeln(); 1910 | env.bibend write$ % write(env_bibend); 1911 | newline$ % writeln(); 1912 | } % } 1913 | % 1914 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1915 | % 1916 | FUNCTION {initialize} { % void initialize() { 1917 | #0 'entry.count := % entry_count = 0; 1918 | #0 'longest.label.width := % longest_label_width = 0; 1919 | "" 'longest.label := % longest_label = ""; 1920 | } % } 1921 | % 1922 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1923 | % 1924 | % void main() { 1925 | READ % List entryList = read(".bib"); 1926 | EXECUTE {initialize} % initialize(); 1927 | ITERATE {longest.label.pass} % for (Entry entry : entryList) { 1928 | % longest_label_pass(entry); 1929 | % } 1930 | EXECUTE {begin.bib} % begin_bib(); 1931 | ITERATE {call.type$} % for (Entry entry : entryList) { 1932 | % switch (typeof(entry)) { 1933 | % case "book": 1934 | % entry.book(); 1935 | % break; 1936 | % case "article": 1937 | % entry.article(); 1938 | % break; 1939 | % . 1940 | % . 1941 | % . 1942 | % case "incollection": 1943 | % entry.incollection(); 1944 | % break; 1945 | % case "misc": 1946 | % entry.misc(); 1947 | % break; 1948 | % default: 1949 | % entry.default_type(); 1950 | % } 1951 | % } 1952 | EXECUTE {end.bib} % end_bib(); 1953 | % } 1954 | % 1955 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1956 | %% End of file `GBT7714-2005.bst' 1957 | --------------------------------------------------------------------------------