├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── cites ├── IEEEtran.bst └── mycite.bib ├── fonts ├── Main │ ├── Fontin-SmallCaps.otf │ ├── texgyretermes-bold.otf │ ├── texgyretermes-bolditalic.otf │ ├── texgyretermes-italic.otf │ └── texgyretermes-regular.otf ├── NotoSansSC │ ├── NotoSansSC-Bold.otf │ └── NotoSansSC-Regular.otf ├── NotoSerifCJKsc │ ├── NotoSerifCJKsc-Bold.otf │ └── NotoSerifCJKsc-Regular.otf ├── fontawesome │ ├── metadata │ │ └── icons.json │ └── otfs │ │ ├── Font Awesome 6 Brands-Regular-400.otf │ │ ├── Font Awesome 6 Free-Regular-400.otf │ │ └── Font Awesome 6 Free-Solid-900.otf └── zh_CN-Adobe │ ├── AdobeFangsongStd-Regular.otf │ ├── AdobeHeitiStd-Regular.otf │ ├── AdobeKaitiStd-Regular.otf │ └── AdobeSongStd-Light.otf ├── images ├── avatar.jpg └── resume_example.jpg ├── latexmkrc ├── resume-zh_CN.tex ├── resume.cls ├── stys ├── NotoSansSC_external.sty ├── NotoSerifCJKsc_external.sty ├── create_fontawesome_sty.py ├── fontawesome6.sty ├── linespacing_fix.sty ├── zh_CN-Adobefonts_external.sty └── zh_CN-Adobefonts_internal.sty └── texs ├── header.tex ├── header_with_photo.tex └── sections.tex /.gitignore: -------------------------------------------------------------------------------- 1 | # Copy this file to the Git repository and rename it ".gitignore". 2 | # Lines starting with '#' are treated as comments. 3 | 4 | ############################################ 5 | ## USER SCRIPTS AND NOTES 6 | ############################################ 7 | 8 | /*.bat 9 | /\!* 10 | .DS_Store 11 | *.pdf 12 | 13 | ############################################ 14 | ## LATEX TEMPORARY FILES 15 | ############################################ 16 | 17 | *.log 18 | *.aux 19 | *.bbl 20 | *.blg 21 | *.tex.undo 22 | *.tex.bak 23 | *.~te 24 | *.$te 25 | *.DVX 26 | *.DDF 27 | *.synctex.gz 28 | *.synctex.gz(busy) 29 | *.fdb_latexmk 30 | *.fls 31 | *.out 32 | *.toc 33 | *.lof 34 | *.lot 35 | *.idx 36 | *.ilg 37 | *.ind 38 | 39 | *.dvi 40 | *.ps 41 | 42 | ############################################ 43 | # do not upload secret infomation 44 | myresume.tex 45 | myresume.pdf 46 | myresume-zh_CN.tex 47 | myresume-zh_CN.pdf 48 | 49 | build/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SRC = $(wildcard *.tex) 2 | 3 | PDFS = $(SRC:.tex=.pdf) 4 | 5 | all: clean pdf 6 | 7 | en: clean 8 | mkdir -p build 9 | xelatex -output-directory=build resume.tex 10 | 11 | zh_CN: clean 12 | mkdir -p build 13 | xelatex -output-directory=build resume-zh_CN.tex 14 | 15 | # UNCOMMENT the 2 lines below if you want to use bibliographic references 16 | # bibtex build/resume-zh_CN 17 | # xelatex -output-directory=build resume-zh_CN.tex 18 | 19 | xelatex -output-directory=build resume-zh_CN.tex 20 | mv build/resume-zh_CN.pdf build/xxx-xxx.pdf 21 | 22 | pdf: clean $(PDFS) 23 | 24 | %.pdf: %.tex 25 | xelatex $< 26 | 27 | ifeq ($(OS),Windows_NT) 28 | # on Windows 29 | RM = cmd //C del 30 | else 31 | # on Unix/Linux 32 | RM = rm -f 33 | endif 34 | 35 | clean: 36 | # $(RM) *.log *.aux *.bbl *.blg *.synctex.gz *.out *.toc *.lof *.idx *.ilg *.ind *.pdf 37 | $(RM) build/* 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 本仓库 Fork 自 [billryan/resume: An elegant \LaTeX\ résumé template.](https://github.com/billryan/resume) 2 | 3 | 原仓库已经多年没有更新了,我在使用其中文版本的时候遇到一些新的需求,也即本仓库所做的主要修改: 4 | - 支持 FontAwesome 6.6.0,新增几个基本信息 5 | - 修改了带图片的简历样式 6 | - 支持了多种标题行样式 7 | - 支持定义高亮色 `accentcolor`,命令 `\texthl{}` 8 | - 优化 PDF 目录生成:解决了乱码的问题,新增了 bookmark 9 | - 优化仓库文件组织结构 10 | - 优化 MakeFile 11 | 12 | 使用: 13 | `make zh_CN` 14 | 15 | ## 效果图 16 | ![效果图](./images/resume_example.jpg) 17 | 18 | ## 支持 FontAwesome 6.6.0 19 | 20 | - 目前直接在 [Font Awesome 官网](https://fontawesome.com/search) 已经无法直接搜索 4.6.3 版本的 icon 了,默认是搜索 6.6.0 版本的 icon 21 | - `./stys/create_fontawesome_sty.py` 源于此仓库:[gvgramazio/latex-fontawesome6: Bindings for FontAwesome 6 icons to be used in XeLaTeX.](https://github.com/gvgramazio/latex-fontawesome6),在此基础上改了一些东西,这里其实还可以继续优化一下 22 | - `fonts/fontawesome` 文件夹源于 [Font Awesome 官网下载 6.6.0 Free For The Desktop](https://fontawesome.com/download) 23 | - 旧版本的相关文件都删了(可以兼容,但没必要) 24 | 25 | 目前已经提供了简历所需的大部分 icon,但也可以修改或新增 26 | 27 | 使用: 28 | 1. 在 [Font Awesome Search](https://fontawesome.com/search) 搜索你想要的 icon,比如 thumbs 29 | 2. 根据搜索结果,找到对应 icon 的名字,比如 thumbs-up 30 | 3. 根据版本(Free/Brand or Pro)以及样式(是否 Solid),决定最终的代码,比如 `\faiconsixbf{thumbs-up}`(Free Solid), `\faiconsix{thumbs-up}`(Free Regular) 31 | 32 | ## 修改了带图片的简历样式 33 | 通过在 `resume-zh_CN.tex` 中指定: 34 | - `\input{texs/header_with_photo}` 35 | - `\input{texs/header}` 36 | 37 | 来选择是否带图片,注意带图片的话要使用 `graphicx` 包和 `tabularray` 包 38 | 39 | 使用了 [tabularray](https://github.com/lvjr/tabularray) 包,要求 TexLive2021 及以上的版本 40 | 41 | ## 支持了多种标题行样式 42 | 通过 `resume-zh_CN.tex` 中的 `\settitlelinestyle{default}` 进行设置 43 | 44 | 三种: 45 | 1. `default`:标题行有下划线,无背景色,标题和下划线同色 `fgcolor` 46 | 2. `partialbg`:标题行有下划线,标题内容部分有背景色 `bgcolor`,标题和下划线同色 `fgcolor` 47 | 3. `fullbg`:标题行无下划线,标题行背景色 `bgcolor`,标题 `fgcolor` 48 | 49 | 具体的颜色和样式可调,需要修改 `resume.cls` 文件 50 | 51 | ## 其他修改 52 | - 支持定义高亮色 `accentcolor`,命令 `\texthl{}` 53 | - 优化 PDF 目录生成:解决了乱码的问题,新增了 bookmark 54 | - 优化仓库文件组织结构 55 | - 优化 MakeFile 56 | 57 | ## **以下是原仓库的 README** 一个简洁优雅的 XeLaTeX 简历模板 58 | 59 | Hit branch [master](https://github.com/billryan/resume/tree/master) if you wanna an English résumé. 60 | 61 | 每年的9月10月是求职的高峰季,除了简历上充实的干货之外,一份美美的简历自然是能助你一臂之力的啦。 62 | 63 | \LaTeX 的简历模板其实是有不少的,坊间流传较广的有 `moderncv`, 这货使用起来比较简单,样式改起来也很方便,但是不太适合作为一页纸简历模板,因为空白太多了。传统的 `resume` 宏包虽然适合用作一页纸简历,但是定制起来比较麻烦,需要懂不少 \TeX 语法。看过不少模板,老是觉得有什么地方不满意(处女座改变世界...),思来想去俺就自己从 ShareLaTeX 网站上找了个极简教程自己鼓捣了一个还算优雅的简历模板出来。 64 | 65 | 受以下项目启发: 66 | 67 | - [zachscrivena/simple-resume-cv](https://github.com/zachscrivena/simple-resume-cv) 68 | - [res](https://www.ctan.org/pkg/res) 69 | - [JianXu's CV](http://www.jianxu.net/en/files/JianXu_CV.pdf) 70 | - [Web Front-End Wenli Zhang.pdf](http://zhangwenli.com/cv/Web%20Front-End%20Wenli%20Zhang.pdf) 71 | - [paciorek's CV/Resume template](http://www.stat.berkeley.edu/~paciorek/computingTips/Latex_template_creating_CV_.html) 72 | - [How to write a LaTeX class file and design your own CV (Part 1) - ShareLaTeX](https://www.sharelatex.com/blog/2011/03/27/how-to-write-a-latex-class-file-and-design-your-own-cv.html) 73 | 74 | 其中最后一条 shareLaTeX 的总结清晰易懂,强烈建议围观。接下来介绍模板使用细节和定制说明。 75 | 76 | ## 简介 77 | 78 | 该简历模板使用 `\XeLaTeX` 编译,无痛支持中文,开箱即用(几乎不需要懂 `\LaTeX` 语法),除了本地编译外也可使用 Overleaf **在线编译**,无需在本机安装 TeX 发行版。 79 | 80 | 主要的功能如下: 81 | 82 | - 极其容易定制和扩展。 83 | - 完善的 Unicode 字体支持,因为用的是 XeLaTeX 嘛 84 | - 完美的简体中文支持,默认使用 adobefonts 的四套简体中文字型,其他字型可自行添加。 85 | - 支持图标字体 FontAwesome 4.6.3 86 | 87 | ### 样例输出 88 | 89 | ![English](https://user-images.githubusercontent.com/1292567/62409353-3fecfc00-b608-11e9-8e83-84962912c956.png) 90 | ![English with photo](https://user-images.githubusercontent.com/1292567/62409351-3f546580-b608-11e9-9f6d-d232a68c5451.png) 91 | ![简体中文](https://user-images.githubusercontent.com/1292567/62409352-3fecfc00-b608-11e9-8d9e-76243ca3052a.png) 92 | 93 | - [英文 PDF](https://github.com/billryan/resume/files/3463503/resume.pdf) 94 | - [加入照片的英文 PDF](https://github.com/billryan/resume/files/3463501/resume_photo.pdf) 95 | - [简体中文 PDF](https://github.com/billryan/resume/files/3463502/resume-zh_CN.pdf) 96 | 97 | ## 使用方法 98 | 99 | ### Overleaf 在线编译 100 | 101 | 感谢万能的『云计算』,`\LaTeX` 编译也可以放到云端了!使用这种方法无需在本机安装诸如 `CTeX/TeXlive/MacTeX` 等发行版,网站上还能有历史版本记录,十分方便!最简单的方法,浏览器中打开 [模板链接](https://www.overleaf.com/latex/templates/bill-ryans-elegant-latex-resume/xcqmhktmzmsw), 按需更改自己的名字和联系方式等。 102 | 在线预览时需要注意 Overleaf 自带的 PDF 阅读器对中文支持不太好(可能会显示乱码),这时在编辑界面的左侧菜单选择使用 native 阅读器即可。 103 | 104 | 中文模板的文件为 `resume-zh_CN.tex`, 英文模板的文件为 `resume.tex`, 带照片的模板文件为 `resume_photo.tex`. 105 | 106 | ### latexonline.cc 107 | 108 | 使用 [LaTeX.Online](https://latexonline.cc/) 在线编译 109 | 110 | ### 使用较新的 TeX 发行版在本地计算机编译 111 | 112 | 除了在线编译外,该模板当然也支持传统的本地编译,从 上克隆下来使用 XeLaTeX 编译即可。 113 | 114 | ```tex 115 | xelatex resume.tex % 编译英文简历 116 | xelatex resume_photo.tex % 编译带照片的简历 117 | xelatex resume-zh_CN.tex % 编译中文简历 118 | ``` 119 | 120 | ### 中英文双语支持 121 | 122 | \LaTeX 的中文支持一直是不少 TeX 新手心中的梦魇,该简历模板最大的特色就是『无痛』支持中英文双语,『无痛』的含义是指开箱即用——在线或者克隆到本地后只需要更改自己的信息即可,不需要自己设置中文字体支持等操作。 123 | 124 | 对 git 不了解或使用不方便的朋友可单独下载压缩包,解压即用。下载地址见 [GitHub 官网](https://github.com/billryan/resume/archive/zh_CN.zip), [大陆镜像加速](https://gods.coding.net/p/resume/git) 125 | 126 | 对 git 比较了解的朋友可选择克隆后切换到`zh_CN`分支,`zh_CN` 是`master`分支的超集,即`zh_CN`包含`master`分支所有的文件。 127 | 需要注意的是`zh_CN`分支包含 Adobe 的宋楷黑仿四套中文字体,体积较大(40 MB+),如果只需要英文简历的可单独克隆`master`分支。 128 | 129 | 中文使用UTF-8编码,对于大多数 Windows 用户来说,只要使用的不是太老的 CTeX 发行版,WinEdt 的中文支持也是毫无压力的。 130 | 编译时务必使用 \XeLaTeX,其他编译方式会报错,因为依赖了 \XeTeX 的一些东西。 131 | 132 | ### 中英文切换 133 | 134 | 英文模板范例见 135 | 中文模板范例见 136 | 137 | 中文模板与英文模板的区别仅有两行——使用中文时仅需反注释以下两行,模板中已默认启用,第一次编译时耗时相对较长(引入了外部中文字型),耐心等待下。 138 | 139 | ```tex 140 | \usepackage{zh_CN-Adobefonts_external} % Simplified Chinese Support using external fonts (./fonts/zh_CN-Adobe/) 141 | %\usepackage{zh_CN-Adobefonts_internal} % Simplified Chinese Support using system fonts 142 | \usepackage{linespacing_fix} % disable extra space before next section 143 | ``` 144 | 145 | 对于高级用户:如果系统已确定安装有 Adobe 的四套中文字型,在文档的开始处使用包`zh_CN-Adobefonts_internal`,这样第一次编译时也会很快。 146 | 147 | ### 参考文献 148 | 149 | 参考文献的引用采用 bib + bst 的方式管理,bib 中存放 BibTeX 格式的引用文本,bst 用于控制 bib 文件的展示形式,默认为 IEEEtran. 编译方式可选如下: 150 | 151 | 1. OSX/Linux 用户 `latexmk -pdf -pvc -silent myresume-zh_CN.tex` latexmkrc 配置文件可参考我的 [dotfiles/latexmkrc](https://github.com/billryan/dotfiles/blob/master/latex/latexmkrc) 152 | 2. Windows 用户可使用 WinEdt 中的 TeXify 选项编译(未测试) 153 | 154 | 除了以上两种编译方式,你还可以使用传统的编译方式: 155 | 156 | ```shell 157 | xelatex myresume-zh_CN 158 | bibtex myresume-zh_CN 159 | xelatex myresume-zh_CN 160 | xelatex myresume-zh_CN 161 | ``` 162 | 163 | 范例文档中默认Reference 另起一页,想留在当前页的可注释掉`\newpage` 164 | 165 | ### 宏 166 | 167 | 普通用户直接使用模板中的宏即可,具体排版使用可直接参考范例 tex 文档,已经十分简洁了。 168 | 想自己添加新的宏的可以先看看 [How to write a LaTeX class file and design your own CV (Part 1) - ShareLaTeX](https://www.sharelatex.com/blog/2011/03/27/how-to-write-a-latex-class-file-and-design-your-own-cv.html) 和 [How to write a LaTeX class file and design your own CV (Part 2) - ShareLaTeX](https://www.sharelatex.com/blog/2013/06/28/how-to-write-a-latex-class-file-and-design-your-own-cv.html) 了解下该模板的简单背景。 169 | 170 | - `\name`: 姓名 171 | - `\email`: 邮箱 172 | - `\linkedin`: LinkedIn 173 | - `\basicInfo`: 联系信息, 按需加入 174 | - `\section`: 用于分节, 如教育背景, 实习/项目经历等 175 | - `\subsection`: 用于小节标题, 无日期选项 176 | - `\datedsubsection`: 用于小节标题, 简历中使用最广,第二项为时间区间,自动右对齐 177 | - `\itemize`: 清单列表,简历中应用最广 178 | - `\enumerate`: 枚举列表,数字标号 179 | 180 | ### FontAwesome 181 | 182 | 首先在 [Font Awesome Icons](http://fortawesome.github.io/Font-Awesome/icons/) 上选中自己想使用的图标,然后在 [fontawesomesymbols-generic.tex](https://github.com/billryan/resume/blob/zh_CN/fontawesomesymbols-generic.tex) 中找到相应的宏, 将其作为普通文本一样使用。 183 | 如果不需要使用 FontAwesome 字体的把那些宏去掉即可。 184 | 其他的可以自行参考相应 cls 和 tex 文件。 185 | 186 | ### 实践参考 187 | 188 | 这里列举一下其他同学基于本模板的具体**实践心得**, 大家可以自行参考, 也欢迎提交贡献, 分享你的心得: 189 | 190 | - [用 Tex 书写优雅的简历 – Jin’s Blog](https://www.imbajin.com/2018-01-20-%E4%BD%BF%E7%94%A8Tex%E4%B9%A6%E5%86%99%E4%BC%98%E9%9B%85%E7%9A%84%E7%AE%80%E5%8E%86/) (简单介绍tex + 常见样式调整) 191 | 192 | ## License 193 | 194 | [The MIT License (MIT)](http://opensource.org/licenses/MIT) 195 | 196 | Copyrighted fonts are not subjected to this License. 197 | 198 | ## 总结 199 | 200 | \LaTeX 的中文支持除了在系统配置文件内指定外还可以在当前项目内指定,这种方式适合大范围分发,正是这个模板中采用的方式,缺点就是大部分中文字型都是有版权的,使用上需要注意。在制作这个模板的过程中还发现合理使用 \LaTeX 现代宏包能大大减轻后期维护和升级的工作,需要使用的命令更少更清晰。ShareLaTeX 网站上有很多简单易懂的范例,当教材来使都不过分。\LaTeX 中文方面的教程精品的不多,刘海洋老师的《LaTeX 入门》 算是精品中的精品! 201 | 202 | 这个模板看似复杂,其实使用上极其省心,想在我这个模板的基础上改动样式的可以看相应的 cls 文件和详细说明,只是简单使用的话直接在范例文档的基础上改改即可。 203 | 总的来说这个模板适合找工作用,而且是偏技术型的一页纸简历。 204 | 205 | 祝大家玩的开心 :) 206 | -------------------------------------------------------------------------------- /cites/IEEEtran.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% IEEEtran.bst 3 | %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted) 4 | %% Version 1.12 (2007/01/11) 5 | %% 6 | %% Copyright (c) 2003-2007 Michael Shell 7 | %% 8 | %% Original starting code base and algorithms obtained from the output of 9 | %% Patrick W. Daly's makebst package as well as from prior versions of 10 | %% IEEE BibTeX styles: 11 | %% 12 | %% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988) 13 | %% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993) 14 | %% 15 | %% Support sites: 16 | %% http://www.michaelshell.org/tex/ieeetran/ 17 | %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ 18 | %% and/or 19 | %% http://www.ieee.org/ 20 | %% 21 | %% For use with BibTeX version 0.99a or later 22 | %% 23 | %% This is a numerical citation style. 24 | %% 25 | %%************************************************************************* 26 | %% Legal Notice: 27 | %% This code is offered as-is without any warranty either expressed or 28 | %% implied; without even the implied warranty of MERCHANTABILITY or 29 | %% FITNESS FOR A PARTICULAR PURPOSE! 30 | %% User assumes all risk. 31 | %% In no event shall IEEE or any contributor to this code be liable for 32 | %% any damages or losses, including, but not limited to, incidental, 33 | %% consequential, or any other damages, resulting from the use or misuse 34 | %% of any information contained here. 35 | %% 36 | %% All comments are the opinions of their respective authors and are not 37 | %% necessarily endorsed by the IEEE. 38 | %% 39 | %% This work is distributed under the LaTeX Project Public License (LPPL) 40 | %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, 41 | %% distributed and modified. A copy of the LPPL, version 1.3, is included 42 | %% in the base LaTeX documentation of all distributions of LaTeX released 43 | %% 2003/12/01 or later. 44 | %% Retain all contribution notices and credits. 45 | %% ** Modified files should be clearly indicated as such, including ** 46 | %% ** renaming them and changing author support contact information. ** 47 | %% 48 | %% File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib, 49 | %% IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst, 50 | %% IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf 51 | %%************************************************************************* 52 | % 53 | % 54 | % Changelog: 55 | % 56 | % 1.00 (2002/08/13) Initial release 57 | % 58 | % 1.10 (2002/09/27) 59 | % 1. Corrected minor bug for improperly formed warning message when a 60 | % book was not given a title. Thanks to Ming Kin Lai for reporting this. 61 | % 2. Added support for CTLname_format_string and CTLname_latex_cmd fields 62 | % in the BST control entry type. 63 | % 64 | % 1.11 (2003/04/02) 65 | % 1. Fixed bug with URLs containing underscores when using url.sty. Thanks 66 | % to Ming Kin Lai for reporting this. 67 | % 68 | % 1.12 (2007/01/11) 69 | % 1. Fixed bug with unwanted comma before "et al." when an entry contained 70 | % more than two author names. Thanks to Pallav Gupta for reporting this. 71 | % 2. Fixed bug with anomalous closing quote in tech reports that have a 72 | % type, but without a number or address. Thanks to Mehrdad Mirreza for 73 | % reporting this. 74 | % 3. Use braces in \providecommand in begin.bib to better support 75 | % latex2html. TeX style length assignments OK with recent versions 76 | % of latex2html - 1.71 (2002/2/1) or later is strongly recommended. 77 | % Use of the language field still causes trouble with latex2html. 78 | % Thanks to Federico Beffa for reporting this. 79 | % 4. Added IEEEtran.bst ID and version comment string to .bbl output. 80 | % 5. Provide a \BIBdecl hook that allows the user to execute commands 81 | % just prior to the first entry. 82 | % 6. Use default urlstyle (is using url.sty) of "same" rather than rm to 83 | % better work with a wider variety of bibliography styles. 84 | % 7. Changed month abbreviations from Sept., July and June to Sep., Jul., 85 | % and Jun., respectively, as IEEE now does. Thanks to Moritz Borgmann 86 | % for reporting this. 87 | % 8. Control entry types should not be considered when calculating longest 88 | % label width. 89 | % 9. Added alias www for electronic/online. 90 | % 10. Added CTLname_url_prefix control entry type. 91 | 92 | 93 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 94 | %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %% 95 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 96 | 97 | % These are the defaults for the user adjustable controls. The values used 98 | % here can be overridden by the user via IEEEtranBSTCTL entry type. 99 | 100 | % NOTE: The recommended LaTeX command to invoke a control entry type is: 101 | % 102 | %\makeatletter 103 | %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}} 104 | %\def\@bstctlcite[#1]#2{\@bsphack 105 | % \@for\@citeb:=#2\do{% 106 | % \edef\@citeb{\expandafter\@firstofone\@citeb}% 107 | % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}% 108 | % \@esphack} 109 | %\makeatother 110 | % 111 | % It is called at the start of the document, before the first \cite, like: 112 | % \bstctlcite{IEEEexample:BSTcontrol} 113 | % 114 | % IEEEtran.cls V1.6 and later does provide this command. 115 | 116 | 117 | 118 | % #0 turns off the display of the number for articles. 119 | % #1 enables 120 | FUNCTION {default.is.use.number.for.article} { #1 } 121 | 122 | 123 | % #0 turns off the display of the paper and type fields in @inproceedings. 124 | % #1 enables 125 | FUNCTION {default.is.use.paper} { #1 } 126 | 127 | 128 | % #0 turns off the forced use of "et al." 129 | % #1 enables 130 | FUNCTION {default.is.forced.et.al} { #0 } 131 | 132 | % The maximum number of names that can be present beyond which an "et al." 133 | % usage is forced. Be sure that num.names.shown.with.forced.et.al (below) 134 | % is not greater than this value! 135 | % Note: There are many instances of references in IEEE journals which have 136 | % a very large number of authors as well as instances in which "et al." is 137 | % used profusely. 138 | FUNCTION {default.max.num.names.before.forced.et.al} { #10 } 139 | 140 | % The number of names that will be shown with a forced "et al.". 141 | % Must be less than or equal to max.num.names.before.forced.et.al 142 | FUNCTION {default.num.names.shown.with.forced.et.al} { #1 } 143 | 144 | 145 | % #0 turns off the alternate interword spacing for entries with URLs. 146 | % #1 enables 147 | FUNCTION {default.is.use.alt.interword.spacing} { #1 } 148 | 149 | % If alternate interword spacing for entries with URLs is enabled, this is 150 | % the interword spacing stretch factor that will be used. For example, the 151 | % default "4" here means that the interword spacing in entries with URLs can 152 | % stretch to four times normal. Does not have to be an integer. Note that 153 | % the value specified here can be overridden by the user in their LaTeX 154 | % code via a command such as: 155 | % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to 156 | % that via the IEEEtranBSTCTL entry type. 157 | FUNCTION {default.ALTinterwordstretchfactor} { "4" } 158 | 159 | 160 | % #0 turns off the "dashification" of repeated (i.e., identical to those 161 | % of the previous entry) names. IEEE normally does this. 162 | % #1 enables 163 | FUNCTION {default.is.dash.repeated.names} { #1 } 164 | 165 | 166 | % The default name format control string. 167 | FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" } 168 | 169 | 170 | % The default LaTeX font command for the names. 171 | FUNCTION {default.name.latex.cmd}{ "" } 172 | 173 | 174 | % The default URL prefix. 175 | FUNCTION {default.name.url.prefix}{ "[Online]. Available:" } 176 | 177 | 178 | % Other controls that cannot be accessed via IEEEtranBSTCTL entry type. 179 | 180 | % #0 turns off the terminal startup banner/completed message so as to 181 | % operate more quietly. 182 | % #1 enables 183 | FUNCTION {is.print.banners.to.terminal} { #1 } 184 | 185 | 186 | 187 | 188 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 189 | %% FILE VERSION AND BANNER %% 190 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 191 | 192 | FUNCTION{bst.file.version} { "1.12" } 193 | FUNCTION{bst.file.date} { "2007/01/11" } 194 | FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" } 195 | 196 | FUNCTION {banner.message} 197 | { is.print.banners.to.terminal 198 | { "-- IEEEtran.bst version" " " * bst.file.version * 199 | " (" * bst.file.date * ") " * "by Michael Shell." * 200 | top$ 201 | "-- " bst.file.website * 202 | top$ 203 | "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." * 204 | top$ 205 | } 206 | { skip$ } 207 | if$ 208 | } 209 | 210 | FUNCTION {completed.message} 211 | { is.print.banners.to.terminal 212 | { "" 213 | top$ 214 | "Done." 215 | top$ 216 | } 217 | { skip$ } 218 | if$ 219 | } 220 | 221 | 222 | 223 | 224 | %%%%%%%%%%%%%%%%%%%%%% 225 | %% STRING CONSTANTS %% 226 | %%%%%%%%%%%%%%%%%%%%%% 227 | 228 | FUNCTION {bbl.and}{ "and" } 229 | FUNCTION {bbl.etal}{ "et~al." } 230 | FUNCTION {bbl.editors}{ "eds." } 231 | FUNCTION {bbl.editor}{ "ed." } 232 | FUNCTION {bbl.edition}{ "ed." } 233 | FUNCTION {bbl.volume}{ "vol." } 234 | FUNCTION {bbl.of}{ "of" } 235 | FUNCTION {bbl.number}{ "no." } 236 | FUNCTION {bbl.in}{ "in" } 237 | FUNCTION {bbl.pages}{ "pp." } 238 | FUNCTION {bbl.page}{ "p." } 239 | FUNCTION {bbl.chapter}{ "ch." } 240 | FUNCTION {bbl.paper}{ "paper" } 241 | FUNCTION {bbl.part}{ "pt." } 242 | FUNCTION {bbl.patent}{ "Patent" } 243 | FUNCTION {bbl.patentUS}{ "U.S." } 244 | FUNCTION {bbl.revision}{ "Rev." } 245 | FUNCTION {bbl.series}{ "ser." } 246 | FUNCTION {bbl.standard}{ "Std." } 247 | FUNCTION {bbl.techrep}{ "Tech. Rep." } 248 | FUNCTION {bbl.mthesis}{ "Master's thesis" } 249 | FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" } 250 | FUNCTION {bbl.st}{ "st" } 251 | FUNCTION {bbl.nd}{ "nd" } 252 | FUNCTION {bbl.rd}{ "rd" } 253 | FUNCTION {bbl.th}{ "th" } 254 | 255 | 256 | % This is the LaTeX spacer that is used when a larger than normal space 257 | % is called for (such as just before the address:publisher). 258 | FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " } 259 | 260 | % The LaTeX code for dashes that are used to represent repeated names. 261 | % Note: Some older IEEE journals used something like 262 | % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along 263 | % the baseline. However, IEEE now uses a thinner, above baseline, 264 | % six dash long sequence. 265 | FUNCTION {repeated.name.dashes} { "------" } 266 | 267 | 268 | 269 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 270 | %% PREDEFINED STRING MACROS %% 271 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 272 | 273 | MACRO {jan} {"Jan."} 274 | MACRO {feb} {"Feb."} 275 | MACRO {mar} {"Mar."} 276 | MACRO {apr} {"Apr."} 277 | MACRO {may} {"May"} 278 | MACRO {jun} {"Jun."} 279 | MACRO {jul} {"Jul."} 280 | MACRO {aug} {"Aug."} 281 | MACRO {sep} {"Sep."} 282 | MACRO {oct} {"Oct."} 283 | MACRO {nov} {"Nov."} 284 | MACRO {dec} {"Dec."} 285 | 286 | 287 | 288 | %%%%%%%%%%%%%%%%%% 289 | %% ENTRY FIELDS %% 290 | %%%%%%%%%%%%%%%%%% 291 | 292 | ENTRY 293 | { address 294 | assignee 295 | author 296 | booktitle 297 | chapter 298 | day 299 | dayfiled 300 | edition 301 | editor 302 | howpublished 303 | institution 304 | intype 305 | journal 306 | key 307 | language 308 | month 309 | monthfiled 310 | nationality 311 | note 312 | number 313 | organization 314 | pages 315 | paper 316 | publisher 317 | school 318 | series 319 | revision 320 | title 321 | type 322 | url 323 | volume 324 | year 325 | yearfiled 326 | CTLuse_article_number 327 | CTLuse_paper 328 | CTLuse_forced_etal 329 | CTLmax_names_forced_etal 330 | CTLnames_show_etal 331 | CTLuse_alt_spacing 332 | CTLalt_stretch_factor 333 | CTLdash_repeated_names 334 | CTLname_format_string 335 | CTLname_latex_cmd 336 | CTLname_url_prefix 337 | } 338 | {} 339 | { label } 340 | 341 | 342 | 343 | 344 | %%%%%%%%%%%%%%%%%%%%%%% 345 | %% INTEGER VARIABLES %% 346 | %%%%%%%%%%%%%%%%%%%%%%% 347 | 348 | INTEGERS { prev.status.punct this.status.punct punct.std 349 | punct.no punct.comma punct.period 350 | prev.status.space this.status.space space.std 351 | space.no space.normal space.large 352 | prev.status.quote this.status.quote quote.std 353 | quote.no quote.close 354 | prev.status.nline this.status.nline nline.std 355 | nline.no nline.newblock 356 | status.cap cap.std 357 | cap.no cap.yes} 358 | 359 | INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames } 360 | 361 | INTEGERS { is.use.number.for.article 362 | is.use.paper 363 | is.forced.et.al 364 | max.num.names.before.forced.et.al 365 | num.names.shown.with.forced.et.al 366 | is.use.alt.interword.spacing 367 | is.dash.repeated.names} 368 | 369 | 370 | %%%%%%%%%%%%%%%%%%%%%% 371 | %% STRING VARIABLES %% 372 | %%%%%%%%%%%%%%%%%%%%%% 373 | 374 | STRINGS { bibinfo 375 | longest.label 376 | oldname 377 | s 378 | t 379 | ALTinterwordstretchfactor 380 | name.format.string 381 | name.latex.cmd 382 | name.url.prefix} 383 | 384 | 385 | 386 | 387 | %%%%%%%%%%%%%%%%%%%%%%%%% 388 | %% LOW LEVEL FUNCTIONS %% 389 | %%%%%%%%%%%%%%%%%%%%%%%%% 390 | 391 | FUNCTION {initialize.controls} 392 | { default.is.use.number.for.article 'is.use.number.for.article := 393 | default.is.use.paper 'is.use.paper := 394 | default.is.forced.et.al 'is.forced.et.al := 395 | default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := 396 | default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al := 397 | default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing := 398 | default.is.dash.repeated.names 'is.dash.repeated.names := 399 | default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor := 400 | default.name.format.string 'name.format.string := 401 | default.name.latex.cmd 'name.latex.cmd := 402 | default.name.url.prefix 'name.url.prefix := 403 | } 404 | 405 | 406 | % This IEEEtran.bst features a very powerful and flexible mechanism for 407 | % controlling the capitalization, punctuation, spacing, quotation, and 408 | % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need 409 | % or use the newline/newblock feature, but it has been implemented for 410 | % possible future use.) The output states of IEEEtran.bst consist of 411 | % multiple independent attributes and, as such, can be thought of as being 412 | % vectors, rather than the simple scalar values ("before.all", 413 | % "mid.sentence", etc.) used in most other .bst files. 414 | % 415 | % The more flexible and complex design used here was motivated in part by 416 | % IEEE's rather unusual bibliography style. For example, IEEE ends the 417 | % previous field item with a period and large space prior to the publisher 418 | % address; the @electronic entry types use periods as inter-item punctuation 419 | % rather than the commas used by the other entry types; and URLs are never 420 | % followed by periods even though they are the last item in the entry. 421 | % Although it is possible to accommodate these features with the conventional 422 | % output state system, the seemingly endless exceptions make for convoluted, 423 | % unreliable and difficult to maintain code. 424 | % 425 | % IEEEtran.bst's output state system can be easily understood via a simple 426 | % illustration of two most recently formatted entry fields (on the stack): 427 | % 428 | % CURRENT_ITEM 429 | % "PREVIOUS_ITEM 430 | % 431 | % which, in this example, is to eventually appear in the bibliography as: 432 | % 433 | % "PREVIOUS_ITEM," CURRENT_ITEM 434 | % 435 | % It is the job of the output routine to take the previous item off of the 436 | % stack (while leaving the current item at the top of the stack), apply its 437 | % trailing punctuation (including closing quote marks) and spacing, and then 438 | % to write the result to BibTeX's output buffer: 439 | % 440 | % "PREVIOUS_ITEM," 441 | % 442 | % Punctuation (and spacing) between items is often determined by both of the 443 | % items rather than just the first one. The presence of quotation marks 444 | % further complicates the situation because, in standard English, trailing 445 | % punctuation marks are supposed to be contained within the quotes. 446 | % 447 | % IEEEtran.bst maintains two output state (aka "status") vectors which 448 | % correspond to the previous and current (aka "this") items. Each vector 449 | % consists of several independent attributes which track punctuation, 450 | % spacing, quotation, and newlines. Capitalization status is handled by a 451 | % separate scalar because the format routines, not the output routine, 452 | % handle capitalization and, therefore, there is no need to maintain the 453 | % capitalization attribute for both the "previous" and "this" items. 454 | % 455 | % When a format routine adds a new item, it copies the current output status 456 | % vector to the previous output status vector and (usually) resets the 457 | % current (this) output status vector to a "standard status" vector. Using a 458 | % "standard status" vector in this way allows us to redefine what we mean by 459 | % "standard status" at the start of each entry handler and reuse the same 460 | % format routines under the various inter-item separation schemes. For 461 | % example, the standard status vector for the @book entry type may use 462 | % commas for item separators, while the @electronic type may use periods, 463 | % yet both entry handlers exploit many of the exact same format routines. 464 | % 465 | % Because format routines have write access to the output status vector of 466 | % the previous item, they can override the punctuation choices of the 467 | % previous format routine! Therefore, it becomes trivial to implement rules 468 | % such as "Always use a period and a large space before the publisher." By 469 | % pushing the generation of the closing quote mark to the output routine, we 470 | % avoid all the problems caused by having to close a quote before having all 471 | % the information required to determine what the punctuation should be. 472 | % 473 | % The IEEEtran.bst output state system can easily be expanded if needed. 474 | % For instance, it is easy to add a "space.tie" attribute value if the 475 | % bibliography rules mandate that two items have to be joined with an 476 | % unbreakable space. 477 | 478 | FUNCTION {initialize.status.constants} 479 | { #0 'punct.no := 480 | #1 'punct.comma := 481 | #2 'punct.period := 482 | #0 'space.no := 483 | #1 'space.normal := 484 | #2 'space.large := 485 | #0 'quote.no := 486 | #1 'quote.close := 487 | #0 'cap.no := 488 | #1 'cap.yes := 489 | #0 'nline.no := 490 | #1 'nline.newblock := 491 | } 492 | 493 | FUNCTION {std.status.using.comma} 494 | { punct.comma 'punct.std := 495 | space.normal 'space.std := 496 | quote.no 'quote.std := 497 | nline.no 'nline.std := 498 | cap.no 'cap.std := 499 | } 500 | 501 | FUNCTION {std.status.using.period} 502 | { punct.period 'punct.std := 503 | space.normal 'space.std := 504 | quote.no 'quote.std := 505 | nline.no 'nline.std := 506 | cap.yes 'cap.std := 507 | } 508 | 509 | FUNCTION {initialize.prev.this.status} 510 | { punct.no 'prev.status.punct := 511 | space.no 'prev.status.space := 512 | quote.no 'prev.status.quote := 513 | nline.no 'prev.status.nline := 514 | punct.no 'this.status.punct := 515 | space.no 'this.status.space := 516 | quote.no 'this.status.quote := 517 | nline.no 'this.status.nline := 518 | cap.yes 'status.cap := 519 | } 520 | 521 | FUNCTION {this.status.std} 522 | { punct.std 'this.status.punct := 523 | space.std 'this.status.space := 524 | quote.std 'this.status.quote := 525 | nline.std 'this.status.nline := 526 | } 527 | 528 | FUNCTION {cap.status.std}{ cap.std 'status.cap := } 529 | 530 | FUNCTION {this.to.prev.status} 531 | { this.status.punct 'prev.status.punct := 532 | this.status.space 'prev.status.space := 533 | this.status.quote 'prev.status.quote := 534 | this.status.nline 'prev.status.nline := 535 | } 536 | 537 | 538 | FUNCTION {not} 539 | { { #0 } 540 | { #1 } 541 | if$ 542 | } 543 | 544 | FUNCTION {and} 545 | { { skip$ } 546 | { pop$ #0 } 547 | if$ 548 | } 549 | 550 | FUNCTION {or} 551 | { { pop$ #1 } 552 | { skip$ } 553 | if$ 554 | } 555 | 556 | 557 | % convert the strings "yes" or "no" to #1 or #0 respectively 558 | FUNCTION {yes.no.to.int} 559 | { "l" change.case$ duplicate$ 560 | "yes" = 561 | { pop$ #1 } 562 | { duplicate$ "no" = 563 | { pop$ #0 } 564 | { "unknown boolean " quote$ * swap$ * quote$ * 565 | " in " * cite$ * warning$ 566 | #0 567 | } 568 | if$ 569 | } 570 | if$ 571 | } 572 | 573 | 574 | % pushes true if the single char string on the stack is in the 575 | % range of "0" to "9" 576 | FUNCTION {is.num} 577 | { chr.to.int$ 578 | duplicate$ "0" chr.to.int$ < not 579 | swap$ "9" chr.to.int$ > not and 580 | } 581 | 582 | % multiplies the integer on the stack by a factor of 10 583 | FUNCTION {bump.int.mag} 584 | { #0 'multiresult := 585 | { duplicate$ #0 > } 586 | { #1 - 587 | multiresult #10 + 588 | 'multiresult := 589 | } 590 | while$ 591 | pop$ 592 | multiresult 593 | } 594 | 595 | % converts a single character string on the stack to an integer 596 | FUNCTION {char.to.integer} 597 | { duplicate$ 598 | is.num 599 | { chr.to.int$ "0" chr.to.int$ - } 600 | {"noninteger character " quote$ * swap$ * quote$ * 601 | " in integer field of " * cite$ * warning$ 602 | #0 603 | } 604 | if$ 605 | } 606 | 607 | % converts a string on the stack to an integer 608 | FUNCTION {string.to.integer} 609 | { duplicate$ text.length$ 'namesleft := 610 | #1 'nameptr := 611 | #0 'numnames := 612 | { nameptr namesleft > not } 613 | { duplicate$ nameptr #1 substring$ 614 | char.to.integer numnames bump.int.mag + 615 | 'numnames := 616 | nameptr #1 + 617 | 'nameptr := 618 | } 619 | while$ 620 | pop$ 621 | numnames 622 | } 623 | 624 | 625 | 626 | 627 | % The output routines write out the *next* to the top (previous) item on the 628 | % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains 629 | % the output status for the top two items on the stack, these output 630 | % routines have to consider the previous output status (which corresponds to 631 | % the item that is being output). Full independent control of punctuation, 632 | % closing quote marks, spacing, and newblock is provided. 633 | % 634 | % "output.nonnull" does not check for the presence of a previous empty 635 | % item. 636 | % 637 | % "output" does check for the presence of a previous empty item and will 638 | % remove an empty item rather than outputing it. 639 | % 640 | % "output.warn" is like "output", but will issue a warning if it detects 641 | % an empty item. 642 | 643 | FUNCTION {output.nonnull} 644 | { swap$ 645 | prev.status.punct punct.comma = 646 | { "," * } 647 | { skip$ } 648 | if$ 649 | prev.status.punct punct.period = 650 | { add.period$ } 651 | { skip$ } 652 | if$ 653 | prev.status.quote quote.close = 654 | { "''" * } 655 | { skip$ } 656 | if$ 657 | prev.status.space space.normal = 658 | { " " * } 659 | { skip$ } 660 | if$ 661 | prev.status.space space.large = 662 | { large.space * } 663 | { skip$ } 664 | if$ 665 | write$ 666 | prev.status.nline nline.newblock = 667 | { newline$ "\newblock " write$ } 668 | { skip$ } 669 | if$ 670 | } 671 | 672 | FUNCTION {output} 673 | { duplicate$ empty$ 674 | 'pop$ 675 | 'output.nonnull 676 | if$ 677 | } 678 | 679 | FUNCTION {output.warn} 680 | { 't := 681 | duplicate$ empty$ 682 | { pop$ "empty " t * " in " * cite$ * warning$ } 683 | 'output.nonnull 684 | if$ 685 | } 686 | 687 | % "fin.entry" is the output routine that handles the last item of the entry 688 | % (which will be on the top of the stack when "fin.entry" is called). 689 | 690 | FUNCTION {fin.entry} 691 | { this.status.punct punct.no = 692 | { skip$ } 693 | { add.period$ } 694 | if$ 695 | this.status.quote quote.close = 696 | { "''" * } 697 | { skip$ } 698 | if$ 699 | write$ 700 | newline$ 701 | } 702 | 703 | 704 | FUNCTION {is.last.char.not.punct} 705 | { duplicate$ 706 | "}" * add.period$ 707 | #-1 #1 substring$ "." = 708 | } 709 | 710 | FUNCTION {is.multiple.pages} 711 | { 't := 712 | #0 'multiresult := 713 | { multiresult not 714 | t empty$ not 715 | and 716 | } 717 | { t #1 #1 substring$ 718 | duplicate$ "-" = 719 | swap$ duplicate$ "," = 720 | swap$ "+" = 721 | or or 722 | { #1 'multiresult := } 723 | { t #2 global.max$ substring$ 't := } 724 | if$ 725 | } 726 | while$ 727 | multiresult 728 | } 729 | 730 | FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ } 731 | 732 | FUNCTION {emphasize} 733 | { duplicate$ empty$ 734 | { pop$ "" } 735 | { "\emph{" swap$ * "}" * } 736 | if$ 737 | } 738 | 739 | FUNCTION {do.name.latex.cmd} 740 | { name.latex.cmd 741 | empty$ 742 | { skip$ } 743 | { name.latex.cmd "{" * swap$ * "}" * } 744 | if$ 745 | } 746 | 747 | % IEEEtran.bst uses its own \BIBforeignlanguage command which directly 748 | % invokes the TeX hyphenation patterns without the need of the Babel 749 | % package. Babel does a lot more than switch hyphenation patterns and 750 | % its loading can cause unintended effects in many class files (such as 751 | % IEEEtran.cls). 752 | FUNCTION {select.language} 753 | { duplicate$ empty$ 'pop$ 754 | { language empty$ 'skip$ 755 | { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * } 756 | if$ 757 | } 758 | if$ 759 | } 760 | 761 | FUNCTION {tie.or.space.prefix} 762 | { duplicate$ text.length$ #3 < 763 | { "~" } 764 | { " " } 765 | if$ 766 | swap$ 767 | } 768 | 769 | FUNCTION {get.bbl.editor} 770 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 771 | 772 | FUNCTION {space.word}{ " " swap$ * " " * } 773 | 774 | 775 | % Field Conditioners, Converters, Checkers and External Interfaces 776 | 777 | FUNCTION {empty.field.to.null.string} 778 | { duplicate$ empty$ 779 | { pop$ "" } 780 | { skip$ } 781 | if$ 782 | } 783 | 784 | FUNCTION {either.or.check} 785 | { empty$ 786 | { pop$ } 787 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 788 | if$ 789 | } 790 | 791 | FUNCTION {empty.entry.warn} 792 | { author empty$ title empty$ howpublished empty$ 793 | month empty$ year empty$ note empty$ url empty$ 794 | and and and and and and 795 | { "all relevant fields are empty in " cite$ * warning$ } 796 | 'skip$ 797 | if$ 798 | } 799 | 800 | 801 | % The bibinfo system provides a way for the electronic parsing/acquisition 802 | % of a bibliography's contents as is done by ReVTeX. For example, a field 803 | % could be entered into the bibliography as: 804 | % \bibinfo{volume}{2} 805 | % Only the "2" would show up in the document, but the LaTeX \bibinfo command 806 | % could do additional things with the information. IEEEtran.bst does provide 807 | % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is 808 | % currently not used as the bogus bibinfo functions defined here output the 809 | % entry values directly without the \bibinfo wrapper. The bibinfo functions 810 | % themselves (and the calls to them) are retained for possible future use. 811 | % 812 | % bibinfo.check avoids acting on missing fields while bibinfo.warn will 813 | % issue a warning message if a missing field is detected. Prior to calling 814 | % the bibinfo functions, the user should push the field value and then its 815 | % name string, in that order. 816 | 817 | FUNCTION {bibinfo.check} 818 | { swap$ duplicate$ missing$ 819 | { pop$ pop$ "" } 820 | { duplicate$ empty$ 821 | { swap$ pop$ } 822 | { swap$ pop$ } 823 | if$ 824 | } 825 | if$ 826 | } 827 | 828 | FUNCTION {bibinfo.warn} 829 | { swap$ duplicate$ missing$ 830 | { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } 831 | { duplicate$ empty$ 832 | { swap$ "empty " swap$ * " in " * cite$ * warning$ } 833 | { swap$ pop$ } 834 | if$ 835 | } 836 | if$ 837 | } 838 | 839 | 840 | % IEEE separates large numbers with more than 4 digits into groups of 841 | % three. IEEE uses a small space to separate these number groups. 842 | % Typical applications include patent and page numbers. 843 | 844 | % number of consecutive digits required to trigger the group separation. 845 | FUNCTION {large.number.trigger}{ #5 } 846 | 847 | % For numbers longer than the trigger, this is the blocksize of the groups. 848 | % The blocksize must be less than the trigger threshold, and 2 * blocksize 849 | % must be greater than the trigger threshold (can't do more than one 850 | % separation on the initial trigger). 851 | FUNCTION {large.number.blocksize}{ #3 } 852 | 853 | % What is actually inserted between the number groups. 854 | FUNCTION {large.number.separator}{ "\," } 855 | 856 | % So as to save on integer variables by reusing existing ones, numnames 857 | % holds the current number of consecutive digits read and nameptr holds 858 | % the number that will trigger an inserted space. 859 | FUNCTION {large.number.separate} 860 | { 't := 861 | "" 862 | #0 'numnames := 863 | large.number.trigger 'nameptr := 864 | { t empty$ not } 865 | { t #-1 #1 substring$ is.num 866 | { numnames #1 + 'numnames := } 867 | { #0 'numnames := 868 | large.number.trigger 'nameptr := 869 | } 870 | if$ 871 | t #-1 #1 substring$ swap$ * 872 | t #-2 global.max$ substring$ 't := 873 | numnames nameptr = 874 | { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$ 875 | nameptr large.number.blocksize - #1 + global.max$ substring$ 876 | large.number.separator swap$ * * 877 | nameptr large.number.blocksize - 'numnames := 878 | large.number.blocksize #1 + 'nameptr := 879 | } 880 | { skip$ } 881 | if$ 882 | } 883 | while$ 884 | } 885 | 886 | % Converts all single dashes "-" to double dashes "--". 887 | FUNCTION {n.dashify} 888 | { large.number.separate 889 | 't := 890 | "" 891 | { t empty$ not } 892 | { t #1 #1 substring$ "-" = 893 | { t #1 #2 substring$ "--" = not 894 | { "--" * 895 | t #2 global.max$ substring$ 't := 896 | } 897 | { { t #1 #1 substring$ "-" = } 898 | { "-" * 899 | t #2 global.max$ substring$ 't := 900 | } 901 | while$ 902 | } 903 | if$ 904 | } 905 | { t #1 #1 substring$ * 906 | t #2 global.max$ substring$ 't := 907 | } 908 | if$ 909 | } 910 | while$ 911 | } 912 | 913 | 914 | % This function detects entries with names that are identical to that of 915 | % the previous entry and replaces the repeated names with dashes (if the 916 | % "is.dash.repeated.names" user control is nonzero). 917 | FUNCTION {name.or.dash} 918 | { 's := 919 | oldname empty$ 920 | { s 'oldname := s } 921 | { s oldname = 922 | { is.dash.repeated.names 923 | { repeated.name.dashes } 924 | { s 'oldname := s } 925 | if$ 926 | } 927 | { s 'oldname := s } 928 | if$ 929 | } 930 | if$ 931 | } 932 | 933 | % Converts the number string on the top of the stack to 934 | % "numerical ordinal form" (e.g., "7" to "7th"). There is 935 | % no artificial limit to the upper bound of the numbers as the 936 | % least significant digit always determines the ordinal form. 937 | FUNCTION {num.to.ordinal} 938 | { duplicate$ #-1 #1 substring$ "1" = 939 | { bbl.st * } 940 | { duplicate$ #-1 #1 substring$ "2" = 941 | { bbl.nd * } 942 | { duplicate$ #-1 #1 substring$ "3" = 943 | { bbl.rd * } 944 | { bbl.th * } 945 | if$ 946 | } 947 | if$ 948 | } 949 | if$ 950 | } 951 | 952 | % If the string on the top of the stack begins with a number, 953 | % (e.g., 11th) then replace the string with the leading number 954 | % it contains. Otherwise retain the string as-is. s holds the 955 | % extracted number, t holds the part of the string that remains 956 | % to be scanned. 957 | FUNCTION {extract.num} 958 | { duplicate$ 't := 959 | "" 's := 960 | { t empty$ not } 961 | { t #1 #1 substring$ 962 | t #2 global.max$ substring$ 't := 963 | duplicate$ is.num 964 | { s swap$ * 's := } 965 | { pop$ "" 't := } 966 | if$ 967 | } 968 | while$ 969 | s empty$ 970 | 'skip$ 971 | { pop$ s } 972 | if$ 973 | } 974 | 975 | % Converts the word number string on the top of the stack to 976 | % Arabic string form. Will be successful up to "tenth". 977 | FUNCTION {word.to.num} 978 | { duplicate$ "l" change.case$ 's := 979 | s "first" = 980 | { pop$ "1" } 981 | { skip$ } 982 | if$ 983 | s "second" = 984 | { pop$ "2" } 985 | { skip$ } 986 | if$ 987 | s "third" = 988 | { pop$ "3" } 989 | { skip$ } 990 | if$ 991 | s "fourth" = 992 | { pop$ "4" } 993 | { skip$ } 994 | if$ 995 | s "fifth" = 996 | { pop$ "5" } 997 | { skip$ } 998 | if$ 999 | s "sixth" = 1000 | { pop$ "6" } 1001 | { skip$ } 1002 | if$ 1003 | s "seventh" = 1004 | { pop$ "7" } 1005 | { skip$ } 1006 | if$ 1007 | s "eighth" = 1008 | { pop$ "8" } 1009 | { skip$ } 1010 | if$ 1011 | s "ninth" = 1012 | { pop$ "9" } 1013 | { skip$ } 1014 | if$ 1015 | s "tenth" = 1016 | { pop$ "10" } 1017 | { skip$ } 1018 | if$ 1019 | } 1020 | 1021 | 1022 | % Converts the string on the top of the stack to numerical 1023 | % ordinal (e.g., "11th") form. 1024 | FUNCTION {convert.edition} 1025 | { duplicate$ empty$ 'skip$ 1026 | { duplicate$ #1 #1 substring$ is.num 1027 | { extract.num 1028 | num.to.ordinal 1029 | } 1030 | { word.to.num 1031 | duplicate$ #1 #1 substring$ is.num 1032 | { num.to.ordinal } 1033 | { "edition ordinal word " quote$ * edition * quote$ * 1034 | " may be too high (or improper) for conversion" * " in " * cite$ * warning$ 1035 | } 1036 | if$ 1037 | } 1038 | if$ 1039 | } 1040 | if$ 1041 | } 1042 | 1043 | 1044 | 1045 | 1046 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1047 | %% LATEX BIBLIOGRAPHY CODE %% 1048 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1049 | 1050 | FUNCTION {start.entry} 1051 | { newline$ 1052 | "\bibitem{" write$ 1053 | cite$ write$ 1054 | "}" write$ 1055 | newline$ 1056 | "" 1057 | initialize.prev.this.status 1058 | } 1059 | 1060 | % Here we write out all the LaTeX code that we will need. The most involved 1061 | % code sequences are those that control the alternate interword spacing and 1062 | % foreign language hyphenation patterns. The heavy use of \providecommand 1063 | % gives users a way to override the defaults. Special thanks to Javier Bezos, 1064 | % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all 1065 | % the other gurus on comp.text.tex for their help and advice on the topic of 1066 | % \selectlanguage, Babel and BibTeX. 1067 | FUNCTION {begin.bib} 1068 | { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" * 1069 | write$ newline$ 1070 | preamble$ empty$ 'skip$ 1071 | { preamble$ write$ newline$ } 1072 | if$ 1073 | "\begin{thebibliography}{" longest.label * "}" * 1074 | write$ newline$ 1075 | "\providecommand{\url}[1]{#1}" 1076 | write$ newline$ 1077 | "\csname url@samestyle\endcsname" 1078 | write$ newline$ 1079 | "\providecommand{\newblock}{\relax}" 1080 | write$ newline$ 1081 | "\providecommand{\bibinfo}[2]{#2}" 1082 | write$ newline$ 1083 | "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}" 1084 | write$ newline$ 1085 | "\providecommand{\BIBentryALTinterwordstretchfactor}{" 1086 | ALTinterwordstretchfactor * "}" * 1087 | write$ newline$ 1088 | "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus " 1089 | write$ newline$ 1090 | "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}" 1091 | write$ newline$ 1092 | "\providecommand{\BIBforeignlanguage}[2]{{%" 1093 | write$ newline$ 1094 | "\expandafter\ifx\csname l@#1\endcsname\relax" 1095 | write$ newline$ 1096 | "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%" 1097 | write$ newline$ 1098 | "\typeout{** loaded for the language `#1'. Using the pattern for}%" 1099 | write$ newline$ 1100 | "\typeout{** the default language instead.}%" 1101 | write$ newline$ 1102 | "\else" 1103 | write$ newline$ 1104 | "\language=\csname l@#1\endcsname" 1105 | write$ newline$ 1106 | "\fi" 1107 | write$ newline$ 1108 | "#2}}" 1109 | write$ newline$ 1110 | "\providecommand{\BIBdecl}{\relax}" 1111 | write$ newline$ 1112 | "\BIBdecl" 1113 | write$ newline$ 1114 | } 1115 | 1116 | FUNCTION {end.bib} 1117 | { newline$ "\end{thebibliography}" write$ newline$ } 1118 | 1119 | FUNCTION {if.url.alt.interword.spacing} 1120 | { is.use.alt.interword.spacing 1121 | {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$} 1122 | { skip$ } 1123 | if$ 1124 | } 1125 | 1126 | FUNCTION {if.url.std.interword.spacing} 1127 | { is.use.alt.interword.spacing 1128 | {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$} 1129 | { skip$ } 1130 | if$ 1131 | } 1132 | 1133 | 1134 | 1135 | 1136 | %%%%%%%%%%%%%%%%%%%%%%%% 1137 | %% LONGEST LABEL PASS %% 1138 | %%%%%%%%%%%%%%%%%%%%%%%% 1139 | 1140 | FUNCTION {initialize.longest.label} 1141 | { "" 'longest.label := 1142 | #1 'number.label := 1143 | #0 'longest.label.width := 1144 | } 1145 | 1146 | FUNCTION {longest.label.pass} 1147 | { type$ "ieeetranbstctl" = 1148 | { skip$ } 1149 | { number.label int.to.str$ 'label := 1150 | number.label #1 + 'number.label := 1151 | label width$ longest.label.width > 1152 | { label 'longest.label := 1153 | label width$ 'longest.label.width := 1154 | } 1155 | { skip$ } 1156 | if$ 1157 | } 1158 | if$ 1159 | } 1160 | 1161 | 1162 | 1163 | 1164 | %%%%%%%%%%%%%%%%%%%%% 1165 | %% FORMAT HANDLERS %% 1166 | %%%%%%%%%%%%%%%%%%%%% 1167 | 1168 | %% Lower Level Formats (used by higher level formats) 1169 | 1170 | FUNCTION {format.address.org.or.pub.date} 1171 | { 't := 1172 | "" 1173 | year empty$ 1174 | { "empty year in " cite$ * warning$ } 1175 | { skip$ } 1176 | if$ 1177 | address empty$ t empty$ and 1178 | year empty$ and month empty$ and 1179 | { skip$ } 1180 | { this.to.prev.status 1181 | this.status.std 1182 | cap.status.std 1183 | address "address" bibinfo.check * 1184 | t empty$ 1185 | { skip$ } 1186 | { punct.period 'prev.status.punct := 1187 | space.large 'prev.status.space := 1188 | address empty$ 1189 | { skip$ } 1190 | { ": " * } 1191 | if$ 1192 | t * 1193 | } 1194 | if$ 1195 | year empty$ month empty$ and 1196 | { skip$ } 1197 | { t empty$ address empty$ and 1198 | { skip$ } 1199 | { ", " * } 1200 | if$ 1201 | month empty$ 1202 | { year empty$ 1203 | { skip$ } 1204 | { year "year" bibinfo.check * } 1205 | if$ 1206 | } 1207 | { month "month" bibinfo.check * 1208 | year empty$ 1209 | { skip$ } 1210 | { " " * year "year" bibinfo.check * } 1211 | if$ 1212 | } 1213 | if$ 1214 | } 1215 | if$ 1216 | } 1217 | if$ 1218 | } 1219 | 1220 | 1221 | FUNCTION {format.names} 1222 | { 'bibinfo := 1223 | duplicate$ empty$ 'skip$ { 1224 | this.to.prev.status 1225 | this.status.std 1226 | 's := 1227 | "" 't := 1228 | #1 'nameptr := 1229 | s num.names$ 'numnames := 1230 | numnames 'namesleft := 1231 | { namesleft #0 > } 1232 | { s nameptr 1233 | name.format.string 1234 | format.name$ 1235 | bibinfo bibinfo.check 1236 | 't := 1237 | nameptr #1 > 1238 | { nameptr num.names.shown.with.forced.et.al #1 + = 1239 | numnames max.num.names.before.forced.et.al > 1240 | is.forced.et.al and and 1241 | { "others" 't := 1242 | #1 'namesleft := 1243 | } 1244 | { skip$ } 1245 | if$ 1246 | namesleft #1 > 1247 | { ", " * t do.name.latex.cmd * } 1248 | { s nameptr "{ll}" format.name$ duplicate$ "others" = 1249 | { 't := } 1250 | { pop$ } 1251 | if$ 1252 | t "others" = 1253 | { " " * bbl.etal emphasize * } 1254 | { numnames #2 > 1255 | { "," * } 1256 | { skip$ } 1257 | if$ 1258 | bbl.and 1259 | space.word * t do.name.latex.cmd * 1260 | } 1261 | if$ 1262 | } 1263 | if$ 1264 | } 1265 | { t do.name.latex.cmd } 1266 | if$ 1267 | nameptr #1 + 'nameptr := 1268 | namesleft #1 - 'namesleft := 1269 | } 1270 | while$ 1271 | cap.status.std 1272 | } if$ 1273 | } 1274 | 1275 | 1276 | 1277 | 1278 | %% Higher Level Formats 1279 | 1280 | %% addresses/locations 1281 | 1282 | FUNCTION {format.address} 1283 | { address duplicate$ empty$ 'skip$ 1284 | { this.to.prev.status 1285 | this.status.std 1286 | cap.status.std 1287 | } 1288 | if$ 1289 | } 1290 | 1291 | 1292 | 1293 | %% author/editor names 1294 | 1295 | FUNCTION {format.authors}{ author "author" format.names } 1296 | 1297 | FUNCTION {format.editors} 1298 | { editor "editor" format.names duplicate$ empty$ 'skip$ 1299 | { ", " * 1300 | get.bbl.editor 1301 | capitalize 1302 | * 1303 | } 1304 | if$ 1305 | } 1306 | 1307 | 1308 | 1309 | %% date 1310 | 1311 | FUNCTION {format.date} 1312 | { 1313 | month "month" bibinfo.check duplicate$ empty$ 1314 | year "year" bibinfo.check duplicate$ empty$ 1315 | { swap$ 'skip$ 1316 | { this.to.prev.status 1317 | this.status.std 1318 | cap.status.std 1319 | "there's a month but no year in " cite$ * warning$ } 1320 | if$ 1321 | * 1322 | } 1323 | { this.to.prev.status 1324 | this.status.std 1325 | cap.status.std 1326 | swap$ 'skip$ 1327 | { 1328 | swap$ 1329 | " " * swap$ 1330 | } 1331 | if$ 1332 | * 1333 | } 1334 | if$ 1335 | } 1336 | 1337 | FUNCTION {format.date.electronic} 1338 | { month "month" bibinfo.check duplicate$ empty$ 1339 | year "year" bibinfo.check duplicate$ empty$ 1340 | { swap$ 1341 | { pop$ } 1342 | { "there's a month but no year in " cite$ * warning$ 1343 | pop$ ")" * "(" swap$ * 1344 | this.to.prev.status 1345 | punct.no 'this.status.punct := 1346 | space.normal 'this.status.space := 1347 | quote.no 'this.status.quote := 1348 | cap.yes 'status.cap := 1349 | } 1350 | if$ 1351 | } 1352 | { swap$ 1353 | { swap$ pop$ ")" * "(" swap$ * } 1354 | { "(" swap$ * ", " * swap$ * ")" * } 1355 | if$ 1356 | this.to.prev.status 1357 | punct.no 'this.status.punct := 1358 | space.normal 'this.status.space := 1359 | quote.no 'this.status.quote := 1360 | cap.yes 'status.cap := 1361 | } 1362 | if$ 1363 | } 1364 | 1365 | 1366 | 1367 | %% edition/title 1368 | 1369 | % Note: IEEE considers the edition to be closely associated with 1370 | % the title of a book. So, in IEEEtran.bst the edition is normally handled 1371 | % within the formatting of the title. The format.edition function is 1372 | % retained here for possible future use. 1373 | FUNCTION {format.edition} 1374 | { edition duplicate$ empty$ 'skip$ 1375 | { this.to.prev.status 1376 | this.status.std 1377 | convert.edition 1378 | status.cap 1379 | { "t" } 1380 | { "l" } 1381 | if$ change.case$ 1382 | "edition" bibinfo.check 1383 | "~" * bbl.edition * 1384 | cap.status.std 1385 | } 1386 | if$ 1387 | } 1388 | 1389 | % This is used to format the booktitle of a conference proceedings. 1390 | % Here we use the "intype" field to provide the user a way to 1391 | % override the word "in" (e.g., with things like "presented at") 1392 | % Use of intype stops the emphasis of the booktitle to indicate that 1393 | % we no longer mean the written conference proceedings, but the 1394 | % conference itself. 1395 | FUNCTION {format.in.booktitle} 1396 | { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ 1397 | { this.to.prev.status 1398 | this.status.std 1399 | select.language 1400 | intype missing$ 1401 | { emphasize 1402 | bbl.in " " * 1403 | } 1404 | { intype " " * } 1405 | if$ 1406 | swap$ * 1407 | cap.status.std 1408 | } 1409 | if$ 1410 | } 1411 | 1412 | % This is used to format the booktitle of collection. 1413 | % Here the "intype" field is not supported, but "edition" is. 1414 | FUNCTION {format.in.booktitle.edition} 1415 | { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ 1416 | { this.to.prev.status 1417 | this.status.std 1418 | select.language 1419 | emphasize 1420 | edition empty$ 'skip$ 1421 | { ", " * 1422 | edition 1423 | convert.edition 1424 | "l" change.case$ 1425 | * "~" * bbl.edition * 1426 | } 1427 | if$ 1428 | bbl.in " " * swap$ * 1429 | cap.status.std 1430 | } 1431 | if$ 1432 | } 1433 | 1434 | FUNCTION {format.article.title} 1435 | { title duplicate$ empty$ 'skip$ 1436 | { this.to.prev.status 1437 | this.status.std 1438 | "t" change.case$ 1439 | } 1440 | if$ 1441 | "title" bibinfo.check 1442 | duplicate$ empty$ 'skip$ 1443 | { quote.close 'this.status.quote := 1444 | is.last.char.not.punct 1445 | { punct.std 'this.status.punct := } 1446 | { punct.no 'this.status.punct := } 1447 | if$ 1448 | select.language 1449 | "``" swap$ * 1450 | cap.status.std 1451 | } 1452 | if$ 1453 | } 1454 | 1455 | FUNCTION {format.article.title.electronic} 1456 | { title duplicate$ empty$ 'skip$ 1457 | { this.to.prev.status 1458 | this.status.std 1459 | cap.status.std 1460 | "t" change.case$ 1461 | } 1462 | if$ 1463 | "title" bibinfo.check 1464 | duplicate$ empty$ 1465 | { skip$ } 1466 | { select.language } 1467 | if$ 1468 | } 1469 | 1470 | FUNCTION {format.book.title.edition} 1471 | { title "title" bibinfo.check 1472 | duplicate$ empty$ 1473 | { "empty title in " cite$ * warning$ } 1474 | { this.to.prev.status 1475 | this.status.std 1476 | select.language 1477 | emphasize 1478 | edition empty$ 'skip$ 1479 | { ", " * 1480 | edition 1481 | convert.edition 1482 | status.cap 1483 | { "t" } 1484 | { "l" } 1485 | if$ 1486 | change.case$ 1487 | * "~" * bbl.edition * 1488 | } 1489 | if$ 1490 | cap.status.std 1491 | } 1492 | if$ 1493 | } 1494 | 1495 | FUNCTION {format.book.title} 1496 | { title "title" bibinfo.check 1497 | duplicate$ empty$ 'skip$ 1498 | { this.to.prev.status 1499 | this.status.std 1500 | cap.status.std 1501 | select.language 1502 | emphasize 1503 | } 1504 | if$ 1505 | } 1506 | 1507 | 1508 | 1509 | %% journal 1510 | 1511 | FUNCTION {format.journal} 1512 | { journal duplicate$ empty$ 'skip$ 1513 | { this.to.prev.status 1514 | this.status.std 1515 | cap.status.std 1516 | select.language 1517 | emphasize 1518 | } 1519 | if$ 1520 | } 1521 | 1522 | 1523 | 1524 | %% how published 1525 | 1526 | FUNCTION {format.howpublished} 1527 | { howpublished duplicate$ empty$ 'skip$ 1528 | { this.to.prev.status 1529 | this.status.std 1530 | cap.status.std 1531 | } 1532 | if$ 1533 | } 1534 | 1535 | 1536 | 1537 | %% institutions/organization/publishers/school 1538 | 1539 | FUNCTION {format.institution} 1540 | { institution duplicate$ empty$ 'skip$ 1541 | { this.to.prev.status 1542 | this.status.std 1543 | cap.status.std 1544 | } 1545 | if$ 1546 | } 1547 | 1548 | FUNCTION {format.organization} 1549 | { organization duplicate$ empty$ 'skip$ 1550 | { this.to.prev.status 1551 | this.status.std 1552 | cap.status.std 1553 | } 1554 | if$ 1555 | } 1556 | 1557 | FUNCTION {format.address.publisher.date} 1558 | { publisher "publisher" bibinfo.warn format.address.org.or.pub.date } 1559 | 1560 | FUNCTION {format.address.publisher.date.nowarn} 1561 | { publisher "publisher" bibinfo.check format.address.org.or.pub.date } 1562 | 1563 | FUNCTION {format.address.organization.date} 1564 | { organization "organization" bibinfo.check format.address.org.or.pub.date } 1565 | 1566 | FUNCTION {format.school} 1567 | { school duplicate$ empty$ 'skip$ 1568 | { this.to.prev.status 1569 | this.status.std 1570 | cap.status.std 1571 | } 1572 | if$ 1573 | } 1574 | 1575 | 1576 | 1577 | %% volume/number/series/chapter/pages 1578 | 1579 | FUNCTION {format.volume} 1580 | { volume empty.field.to.null.string 1581 | duplicate$ empty$ 'skip$ 1582 | { this.to.prev.status 1583 | this.status.std 1584 | bbl.volume 1585 | status.cap 1586 | { capitalize } 1587 | { skip$ } 1588 | if$ 1589 | swap$ tie.or.space.prefix 1590 | "volume" bibinfo.check 1591 | * * 1592 | cap.status.std 1593 | } 1594 | if$ 1595 | } 1596 | 1597 | FUNCTION {format.number} 1598 | { number empty.field.to.null.string 1599 | duplicate$ empty$ 'skip$ 1600 | { this.to.prev.status 1601 | this.status.std 1602 | status.cap 1603 | { bbl.number capitalize } 1604 | { bbl.number } 1605 | if$ 1606 | swap$ tie.or.space.prefix 1607 | "number" bibinfo.check 1608 | * * 1609 | cap.status.std 1610 | } 1611 | if$ 1612 | } 1613 | 1614 | FUNCTION {format.number.if.use.for.article} 1615 | { is.use.number.for.article 1616 | { format.number } 1617 | { "" } 1618 | if$ 1619 | } 1620 | 1621 | % IEEE does not seem to tie the series so closely with the volume 1622 | % and number as is done in other bibliography styles. Instead the 1623 | % series is treated somewhat like an extension of the title. 1624 | FUNCTION {format.series} 1625 | { series empty$ 1626 | { "" } 1627 | { this.to.prev.status 1628 | this.status.std 1629 | bbl.series " " * 1630 | series "series" bibinfo.check * 1631 | cap.status.std 1632 | } 1633 | if$ 1634 | } 1635 | 1636 | 1637 | FUNCTION {format.chapter} 1638 | { chapter empty$ 1639 | { "" } 1640 | { this.to.prev.status 1641 | this.status.std 1642 | type empty$ 1643 | { bbl.chapter } 1644 | { type "l" change.case$ 1645 | "type" bibinfo.check 1646 | } 1647 | if$ 1648 | chapter tie.or.space.prefix 1649 | "chapter" bibinfo.check 1650 | * * 1651 | cap.status.std 1652 | } 1653 | if$ 1654 | } 1655 | 1656 | 1657 | % The intended use of format.paper is for paper numbers of inproceedings. 1658 | % The paper type can be overridden via the type field. 1659 | % We allow the type to be displayed even if the paper number is absent 1660 | % for things like "postdeadline paper" 1661 | FUNCTION {format.paper} 1662 | { is.use.paper 1663 | { paper empty$ 1664 | { type empty$ 1665 | { "" } 1666 | { this.to.prev.status 1667 | this.status.std 1668 | type "type" bibinfo.check 1669 | cap.status.std 1670 | } 1671 | if$ 1672 | } 1673 | { this.to.prev.status 1674 | this.status.std 1675 | type empty$ 1676 | { bbl.paper } 1677 | { type "type" bibinfo.check } 1678 | if$ 1679 | " " * paper 1680 | "paper" bibinfo.check 1681 | * 1682 | cap.status.std 1683 | } 1684 | if$ 1685 | } 1686 | { "" } 1687 | if$ 1688 | } 1689 | 1690 | 1691 | FUNCTION {format.pages} 1692 | { pages duplicate$ empty$ 'skip$ 1693 | { this.to.prev.status 1694 | this.status.std 1695 | duplicate$ is.multiple.pages 1696 | { 1697 | bbl.pages swap$ 1698 | n.dashify 1699 | } 1700 | { 1701 | bbl.page swap$ 1702 | } 1703 | if$ 1704 | tie.or.space.prefix 1705 | "pages" bibinfo.check 1706 | * * 1707 | cap.status.std 1708 | } 1709 | if$ 1710 | } 1711 | 1712 | 1713 | 1714 | %% technical report number 1715 | 1716 | FUNCTION {format.tech.report.number} 1717 | { number "number" bibinfo.check 1718 | this.to.prev.status 1719 | this.status.std 1720 | cap.status.std 1721 | type duplicate$ empty$ 1722 | { pop$ 1723 | bbl.techrep 1724 | } 1725 | { skip$ } 1726 | if$ 1727 | "type" bibinfo.check 1728 | swap$ duplicate$ empty$ 1729 | { pop$ } 1730 | { tie.or.space.prefix * * } 1731 | if$ 1732 | } 1733 | 1734 | 1735 | 1736 | %% note 1737 | 1738 | FUNCTION {format.note} 1739 | { note empty$ 1740 | { "" } 1741 | { this.to.prev.status 1742 | this.status.std 1743 | punct.period 'this.status.punct := 1744 | note #1 #1 substring$ 1745 | duplicate$ "{" = 1746 | { skip$ } 1747 | { status.cap 1748 | { "u" } 1749 | { "l" } 1750 | if$ 1751 | change.case$ 1752 | } 1753 | if$ 1754 | note #2 global.max$ substring$ * "note" bibinfo.check 1755 | cap.yes 'status.cap := 1756 | } 1757 | if$ 1758 | } 1759 | 1760 | 1761 | 1762 | %% patent 1763 | 1764 | FUNCTION {format.patent.date} 1765 | { this.to.prev.status 1766 | this.status.std 1767 | year empty$ 1768 | { monthfiled duplicate$ empty$ 1769 | { "monthfiled" bibinfo.check pop$ "" } 1770 | { "monthfiled" bibinfo.check } 1771 | if$ 1772 | dayfiled duplicate$ empty$ 1773 | { "dayfiled" bibinfo.check pop$ "" * } 1774 | { "dayfiled" bibinfo.check 1775 | monthfiled empty$ 1776 | { "dayfiled without a monthfiled in " cite$ * warning$ 1777 | * 1778 | } 1779 | { " " swap$ * * } 1780 | if$ 1781 | } 1782 | if$ 1783 | yearfiled empty$ 1784 | { "no year or yearfiled in " cite$ * warning$ } 1785 | { yearfiled "yearfiled" bibinfo.check 1786 | swap$ 1787 | duplicate$ empty$ 1788 | { pop$ } 1789 | { ", " * swap$ * } 1790 | if$ 1791 | } 1792 | if$ 1793 | } 1794 | { month duplicate$ empty$ 1795 | { "month" bibinfo.check pop$ "" } 1796 | { "month" bibinfo.check } 1797 | if$ 1798 | day duplicate$ empty$ 1799 | { "day" bibinfo.check pop$ "" * } 1800 | { "day" bibinfo.check 1801 | month empty$ 1802 | { "day without a month in " cite$ * warning$ 1803 | * 1804 | } 1805 | { " " swap$ * * } 1806 | if$ 1807 | } 1808 | if$ 1809 | year "year" bibinfo.check 1810 | swap$ 1811 | duplicate$ empty$ 1812 | { pop$ } 1813 | { ", " * swap$ * } 1814 | if$ 1815 | } 1816 | if$ 1817 | cap.status.std 1818 | } 1819 | 1820 | FUNCTION {format.patent.nationality.type.number} 1821 | { this.to.prev.status 1822 | this.status.std 1823 | nationality duplicate$ empty$ 1824 | { "nationality" bibinfo.warn pop$ "" } 1825 | { "nationality" bibinfo.check 1826 | duplicate$ "l" change.case$ "united states" = 1827 | { pop$ bbl.patentUS } 1828 | { skip$ } 1829 | if$ 1830 | " " * 1831 | } 1832 | if$ 1833 | type empty$ 1834 | { bbl.patent "type" bibinfo.check } 1835 | { type "type" bibinfo.check } 1836 | if$ 1837 | * 1838 | number duplicate$ empty$ 1839 | { "number" bibinfo.warn pop$ } 1840 | { "number" bibinfo.check 1841 | large.number.separate 1842 | swap$ " " * swap$ * 1843 | } 1844 | if$ 1845 | cap.status.std 1846 | } 1847 | 1848 | 1849 | 1850 | %% standard 1851 | 1852 | FUNCTION {format.organization.institution.standard.type.number} 1853 | { this.to.prev.status 1854 | this.status.std 1855 | organization duplicate$ empty$ 1856 | { pop$ 1857 | institution duplicate$ empty$ 1858 | { "institution" bibinfo.warn } 1859 | { "institution" bibinfo.warn " " * } 1860 | if$ 1861 | } 1862 | { "organization" bibinfo.warn " " * } 1863 | if$ 1864 | type empty$ 1865 | { bbl.standard "type" bibinfo.check } 1866 | { type "type" bibinfo.check } 1867 | if$ 1868 | * 1869 | number duplicate$ empty$ 1870 | { "number" bibinfo.check pop$ } 1871 | { "number" bibinfo.check 1872 | large.number.separate 1873 | swap$ " " * swap$ * 1874 | } 1875 | if$ 1876 | cap.status.std 1877 | } 1878 | 1879 | FUNCTION {format.revision} 1880 | { revision empty$ 1881 | { "" } 1882 | { this.to.prev.status 1883 | this.status.std 1884 | bbl.revision 1885 | revision tie.or.space.prefix 1886 | "revision" bibinfo.check 1887 | * * 1888 | cap.status.std 1889 | } 1890 | if$ 1891 | } 1892 | 1893 | 1894 | %% thesis 1895 | 1896 | FUNCTION {format.master.thesis.type} 1897 | { this.to.prev.status 1898 | this.status.std 1899 | type empty$ 1900 | { 1901 | bbl.mthesis 1902 | } 1903 | { 1904 | type "type" bibinfo.check 1905 | } 1906 | if$ 1907 | cap.status.std 1908 | } 1909 | 1910 | FUNCTION {format.phd.thesis.type} 1911 | { this.to.prev.status 1912 | this.status.std 1913 | type empty$ 1914 | { 1915 | bbl.phdthesis 1916 | } 1917 | { 1918 | type "type" bibinfo.check 1919 | } 1920 | if$ 1921 | cap.status.std 1922 | } 1923 | 1924 | 1925 | 1926 | %% URL 1927 | 1928 | FUNCTION {format.url} 1929 | { url empty$ 1930 | { "" } 1931 | { this.to.prev.status 1932 | this.status.std 1933 | cap.yes 'status.cap := 1934 | name.url.prefix " " * 1935 | "\url{" * url * "}" * 1936 | punct.no 'this.status.punct := 1937 | punct.period 'prev.status.punct := 1938 | space.normal 'this.status.space := 1939 | space.normal 'prev.status.space := 1940 | quote.no 'this.status.quote := 1941 | } 1942 | if$ 1943 | } 1944 | 1945 | 1946 | 1947 | 1948 | %%%%%%%%%%%%%%%%%%%% 1949 | %% ENTRY HANDLERS %% 1950 | %%%%%%%%%%%%%%%%%%%% 1951 | 1952 | 1953 | % Note: In many journals, IEEE (or the authors) tend not to show the number 1954 | % for articles, so the display of the number is controlled here by the 1955 | % switch "is.use.number.for.article" 1956 | FUNCTION {article} 1957 | { std.status.using.comma 1958 | start.entry 1959 | if.url.alt.interword.spacing 1960 | format.authors "author" output.warn 1961 | name.or.dash 1962 | format.article.title "title" output.warn 1963 | format.journal "journal" bibinfo.check "journal" output.warn 1964 | format.volume output 1965 | format.number.if.use.for.article output 1966 | format.pages output 1967 | format.date "year" output.warn 1968 | format.note output 1969 | format.url output 1970 | fin.entry 1971 | if.url.std.interword.spacing 1972 | } 1973 | 1974 | FUNCTION {book} 1975 | { std.status.using.comma 1976 | start.entry 1977 | if.url.alt.interword.spacing 1978 | author empty$ 1979 | { format.editors "author and editor" output.warn } 1980 | { format.authors output.nonnull } 1981 | if$ 1982 | name.or.dash 1983 | format.book.title.edition output 1984 | format.series output 1985 | author empty$ 1986 | { skip$ } 1987 | { format.editors output } 1988 | if$ 1989 | format.address.publisher.date output 1990 | format.volume output 1991 | format.number output 1992 | format.note output 1993 | format.url output 1994 | fin.entry 1995 | if.url.std.interword.spacing 1996 | } 1997 | 1998 | FUNCTION {booklet} 1999 | { std.status.using.comma 2000 | start.entry 2001 | if.url.alt.interword.spacing 2002 | format.authors output 2003 | name.or.dash 2004 | format.article.title "title" output.warn 2005 | format.howpublished "howpublished" bibinfo.check output 2006 | format.organization "organization" bibinfo.check output 2007 | format.address "address" bibinfo.check output 2008 | format.date output 2009 | format.note output 2010 | format.url output 2011 | fin.entry 2012 | if.url.std.interword.spacing 2013 | } 2014 | 2015 | FUNCTION {electronic} 2016 | { std.status.using.period 2017 | start.entry 2018 | if.url.alt.interword.spacing 2019 | format.authors output 2020 | name.or.dash 2021 | format.date.electronic output 2022 | format.article.title.electronic output 2023 | format.howpublished "howpublished" bibinfo.check output 2024 | format.organization "organization" bibinfo.check output 2025 | format.address "address" bibinfo.check output 2026 | format.note output 2027 | format.url output 2028 | fin.entry 2029 | empty.entry.warn 2030 | if.url.std.interword.spacing 2031 | } 2032 | 2033 | FUNCTION {inbook} 2034 | { std.status.using.comma 2035 | start.entry 2036 | if.url.alt.interword.spacing 2037 | author empty$ 2038 | { format.editors "author and editor" output.warn } 2039 | { format.authors output.nonnull } 2040 | if$ 2041 | name.or.dash 2042 | format.book.title.edition output 2043 | format.series output 2044 | format.address.publisher.date output 2045 | format.volume output 2046 | format.number output 2047 | format.chapter output 2048 | format.pages output 2049 | format.note output 2050 | format.url output 2051 | fin.entry 2052 | if.url.std.interword.spacing 2053 | } 2054 | 2055 | FUNCTION {incollection} 2056 | { std.status.using.comma 2057 | start.entry 2058 | if.url.alt.interword.spacing 2059 | format.authors "author" output.warn 2060 | name.or.dash 2061 | format.article.title "title" output.warn 2062 | format.in.booktitle.edition "booktitle" output.warn 2063 | format.series output 2064 | format.editors output 2065 | format.address.publisher.date.nowarn output 2066 | format.volume output 2067 | format.number output 2068 | format.chapter output 2069 | format.pages output 2070 | format.note output 2071 | format.url output 2072 | fin.entry 2073 | if.url.std.interword.spacing 2074 | } 2075 | 2076 | FUNCTION {inproceedings} 2077 | { std.status.using.comma 2078 | start.entry 2079 | if.url.alt.interword.spacing 2080 | format.authors "author" output.warn 2081 | name.or.dash 2082 | format.article.title "title" output.warn 2083 | format.in.booktitle "booktitle" output.warn 2084 | format.series output 2085 | format.editors output 2086 | format.volume output 2087 | format.number output 2088 | publisher empty$ 2089 | { format.address.organization.date output } 2090 | { format.organization "organization" bibinfo.check output 2091 | format.address.publisher.date output 2092 | } 2093 | if$ 2094 | format.paper output 2095 | format.pages output 2096 | format.note output 2097 | format.url output 2098 | fin.entry 2099 | if.url.std.interword.spacing 2100 | } 2101 | 2102 | FUNCTION {manual} 2103 | { std.status.using.comma 2104 | start.entry 2105 | if.url.alt.interword.spacing 2106 | format.authors output 2107 | name.or.dash 2108 | format.book.title.edition "title" output.warn 2109 | format.howpublished "howpublished" bibinfo.check output 2110 | format.organization "organization" bibinfo.check output 2111 | format.address "address" bibinfo.check output 2112 | format.date output 2113 | format.note output 2114 | format.url output 2115 | fin.entry 2116 | if.url.std.interword.spacing 2117 | } 2118 | 2119 | FUNCTION {mastersthesis} 2120 | { std.status.using.comma 2121 | start.entry 2122 | if.url.alt.interword.spacing 2123 | format.authors "author" output.warn 2124 | name.or.dash 2125 | format.article.title "title" output.warn 2126 | format.master.thesis.type output.nonnull 2127 | format.school "school" bibinfo.warn output 2128 | format.address "address" bibinfo.check output 2129 | format.date "year" output.warn 2130 | format.note output 2131 | format.url output 2132 | fin.entry 2133 | if.url.std.interword.spacing 2134 | } 2135 | 2136 | FUNCTION {misc} 2137 | { std.status.using.comma 2138 | start.entry 2139 | if.url.alt.interword.spacing 2140 | format.authors output 2141 | name.or.dash 2142 | format.article.title output 2143 | format.howpublished "howpublished" bibinfo.check output 2144 | format.organization "organization" bibinfo.check output 2145 | format.address "address" bibinfo.check output 2146 | format.pages output 2147 | format.date output 2148 | format.note output 2149 | format.url output 2150 | fin.entry 2151 | empty.entry.warn 2152 | if.url.std.interword.spacing 2153 | } 2154 | 2155 | FUNCTION {patent} 2156 | { std.status.using.comma 2157 | start.entry 2158 | if.url.alt.interword.spacing 2159 | format.authors output 2160 | name.or.dash 2161 | format.article.title output 2162 | format.patent.nationality.type.number output 2163 | format.patent.date output 2164 | format.note output 2165 | format.url output 2166 | fin.entry 2167 | empty.entry.warn 2168 | if.url.std.interword.spacing 2169 | } 2170 | 2171 | FUNCTION {periodical} 2172 | { std.status.using.comma 2173 | start.entry 2174 | if.url.alt.interword.spacing 2175 | format.editors output 2176 | name.or.dash 2177 | format.book.title "title" output.warn 2178 | format.series output 2179 | format.volume output 2180 | format.number output 2181 | format.organization "organization" bibinfo.check output 2182 | format.date "year" output.warn 2183 | format.note output 2184 | format.url output 2185 | fin.entry 2186 | if.url.std.interword.spacing 2187 | } 2188 | 2189 | FUNCTION {phdthesis} 2190 | { std.status.using.comma 2191 | start.entry 2192 | if.url.alt.interword.spacing 2193 | format.authors "author" output.warn 2194 | name.or.dash 2195 | format.article.title "title" output.warn 2196 | format.phd.thesis.type output.nonnull 2197 | format.school "school" bibinfo.warn output 2198 | format.address "address" bibinfo.check output 2199 | format.date "year" output.warn 2200 | format.note output 2201 | format.url output 2202 | fin.entry 2203 | if.url.std.interword.spacing 2204 | } 2205 | 2206 | FUNCTION {proceedings} 2207 | { std.status.using.comma 2208 | start.entry 2209 | if.url.alt.interword.spacing 2210 | format.editors output 2211 | name.or.dash 2212 | format.book.title "title" output.warn 2213 | format.series output 2214 | format.volume output 2215 | format.number output 2216 | publisher empty$ 2217 | { format.address.organization.date output } 2218 | { format.organization "organization" bibinfo.check output 2219 | format.address.publisher.date output 2220 | } 2221 | if$ 2222 | format.note output 2223 | format.url output 2224 | fin.entry 2225 | if.url.std.interword.spacing 2226 | } 2227 | 2228 | FUNCTION {standard} 2229 | { std.status.using.comma 2230 | start.entry 2231 | if.url.alt.interword.spacing 2232 | format.authors output 2233 | name.or.dash 2234 | format.book.title "title" output.warn 2235 | format.howpublished "howpublished" bibinfo.check output 2236 | format.organization.institution.standard.type.number output 2237 | format.revision output 2238 | format.date output 2239 | format.note output 2240 | format.url output 2241 | fin.entry 2242 | if.url.std.interword.spacing 2243 | } 2244 | 2245 | FUNCTION {techreport} 2246 | { std.status.using.comma 2247 | start.entry 2248 | if.url.alt.interword.spacing 2249 | format.authors "author" output.warn 2250 | name.or.dash 2251 | format.article.title "title" output.warn 2252 | format.howpublished "howpublished" bibinfo.check output 2253 | format.institution "institution" bibinfo.warn output 2254 | format.address "address" bibinfo.check output 2255 | format.tech.report.number output.nonnull 2256 | format.date "year" output.warn 2257 | format.note output 2258 | format.url output 2259 | fin.entry 2260 | if.url.std.interword.spacing 2261 | } 2262 | 2263 | FUNCTION {unpublished} 2264 | { std.status.using.comma 2265 | start.entry 2266 | if.url.alt.interword.spacing 2267 | format.authors "author" output.warn 2268 | name.or.dash 2269 | format.article.title "title" output.warn 2270 | format.date output 2271 | format.note "note" output.warn 2272 | format.url output 2273 | fin.entry 2274 | if.url.std.interword.spacing 2275 | } 2276 | 2277 | 2278 | % The special entry type which provides the user interface to the 2279 | % BST controls 2280 | FUNCTION {IEEEtranBSTCTL} 2281 | { is.print.banners.to.terminal 2282 | { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." * 2283 | top$ 2284 | } 2285 | { skip$ } 2286 | if$ 2287 | CTLuse_article_number 2288 | empty$ 2289 | { skip$ } 2290 | { CTLuse_article_number 2291 | yes.no.to.int 2292 | 'is.use.number.for.article := 2293 | } 2294 | if$ 2295 | CTLuse_paper 2296 | empty$ 2297 | { skip$ } 2298 | { CTLuse_paper 2299 | yes.no.to.int 2300 | 'is.use.paper := 2301 | } 2302 | if$ 2303 | CTLuse_forced_etal 2304 | empty$ 2305 | { skip$ } 2306 | { CTLuse_forced_etal 2307 | yes.no.to.int 2308 | 'is.forced.et.al := 2309 | } 2310 | if$ 2311 | CTLmax_names_forced_etal 2312 | empty$ 2313 | { skip$ } 2314 | { CTLmax_names_forced_etal 2315 | string.to.integer 2316 | 'max.num.names.before.forced.et.al := 2317 | } 2318 | if$ 2319 | CTLnames_show_etal 2320 | empty$ 2321 | { skip$ } 2322 | { CTLnames_show_etal 2323 | string.to.integer 2324 | 'num.names.shown.with.forced.et.al := 2325 | } 2326 | if$ 2327 | CTLuse_alt_spacing 2328 | empty$ 2329 | { skip$ } 2330 | { CTLuse_alt_spacing 2331 | yes.no.to.int 2332 | 'is.use.alt.interword.spacing := 2333 | } 2334 | if$ 2335 | CTLalt_stretch_factor 2336 | empty$ 2337 | { skip$ } 2338 | { CTLalt_stretch_factor 2339 | 'ALTinterwordstretchfactor := 2340 | "\renewcommand{\BIBentryALTinterwordstretchfactor}{" 2341 | ALTinterwordstretchfactor * "}" * 2342 | write$ newline$ 2343 | } 2344 | if$ 2345 | CTLdash_repeated_names 2346 | empty$ 2347 | { skip$ } 2348 | { CTLdash_repeated_names 2349 | yes.no.to.int 2350 | 'is.dash.repeated.names := 2351 | } 2352 | if$ 2353 | CTLname_format_string 2354 | empty$ 2355 | { skip$ } 2356 | { CTLname_format_string 2357 | 'name.format.string := 2358 | } 2359 | if$ 2360 | CTLname_latex_cmd 2361 | empty$ 2362 | { skip$ } 2363 | { CTLname_latex_cmd 2364 | 'name.latex.cmd := 2365 | } 2366 | if$ 2367 | CTLname_url_prefix 2368 | missing$ 2369 | { skip$ } 2370 | { CTLname_url_prefix 2371 | 'name.url.prefix := 2372 | } 2373 | if$ 2374 | 2375 | 2376 | num.names.shown.with.forced.et.al max.num.names.before.forced.et.al > 2377 | { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$ 2378 | max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al := 2379 | } 2380 | { skip$ } 2381 | if$ 2382 | } 2383 | 2384 | 2385 | %%%%%%%%%%%%%%%%%%% 2386 | %% ENTRY ALIASES %% 2387 | %%%%%%%%%%%%%%%%%%% 2388 | FUNCTION {conference}{inproceedings} 2389 | FUNCTION {online}{electronic} 2390 | FUNCTION {internet}{electronic} 2391 | FUNCTION {webpage}{electronic} 2392 | FUNCTION {www}{electronic} 2393 | FUNCTION {default.type}{misc} 2394 | 2395 | 2396 | 2397 | %%%%%%%%%%%%%%%%%% 2398 | %% MAIN PROGRAM %% 2399 | %%%%%%%%%%%%%%%%%% 2400 | 2401 | READ 2402 | 2403 | EXECUTE {initialize.controls} 2404 | EXECUTE {initialize.status.constants} 2405 | EXECUTE {banner.message} 2406 | 2407 | EXECUTE {initialize.longest.label} 2408 | ITERATE {longest.label.pass} 2409 | 2410 | EXECUTE {begin.bib} 2411 | ITERATE {call.type$} 2412 | EXECUTE {end.bib} 2413 | 2414 | EXECUTE{completed.message} 2415 | 2416 | 2417 | %% That's all folks, mds. 2418 | -------------------------------------------------------------------------------- /cites/mycite.bib: -------------------------------------------------------------------------------- 1 | @inproceedings{zaharia2012resilient, 2 | title={Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing}, 3 | author={Zaharia, Matei and Chowdhury, Mosharaf and Das, Tathagata and Dave, Ankur and Ma, Justin and McCauley, Murphy and Franklin, Michael J and Shenker, Scott and Stoica, Ion}, 4 | booktitle={Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation}, 5 | pages={2--2}, 6 | year={2012}, 7 | organization={USENIX Association} 8 | } 9 | 10 | @inproceedings{verma2015large, 11 | title={Large-scale cluster management at Google with Borg}, 12 | author={Verma, Abhishek and Pedrosa, Luis and Korupolu, Madhukar and Oppenheimer, David and Tune, Eric and Wilkes, John}, 13 | booktitle={Proceedings of the Tenth European Conference on Computer Systems}, 14 | pages={18}, 15 | year={2015}, 16 | organization={ACM} 17 | } 18 | -------------------------------------------------------------------------------- /fonts/Main/Fontin-SmallCaps.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/Main/Fontin-SmallCaps.otf -------------------------------------------------------------------------------- /fonts/Main/texgyretermes-bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/Main/texgyretermes-bold.otf -------------------------------------------------------------------------------- /fonts/Main/texgyretermes-bolditalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/Main/texgyretermes-bolditalic.otf -------------------------------------------------------------------------------- /fonts/Main/texgyretermes-italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/Main/texgyretermes-italic.otf -------------------------------------------------------------------------------- /fonts/Main/texgyretermes-regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/Main/texgyretermes-regular.otf -------------------------------------------------------------------------------- /fonts/NotoSansSC/NotoSansSC-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/NotoSansSC/NotoSansSC-Bold.otf -------------------------------------------------------------------------------- /fonts/NotoSansSC/NotoSansSC-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/NotoSansSC/NotoSansSC-Regular.otf -------------------------------------------------------------------------------- /fonts/NotoSerifCJKsc/NotoSerifCJKsc-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/NotoSerifCJKsc/NotoSerifCJKsc-Bold.otf -------------------------------------------------------------------------------- /fonts/NotoSerifCJKsc/NotoSerifCJKsc-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/NotoSerifCJKsc/NotoSerifCJKsc-Regular.otf -------------------------------------------------------------------------------- /fonts/fontawesome/otfs/Font Awesome 6 Brands-Regular-400.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/fontawesome/otfs/Font Awesome 6 Brands-Regular-400.otf -------------------------------------------------------------------------------- /fonts/fontawesome/otfs/Font Awesome 6 Free-Regular-400.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/fontawesome/otfs/Font Awesome 6 Free-Regular-400.otf -------------------------------------------------------------------------------- /fonts/fontawesome/otfs/Font Awesome 6 Free-Solid-900.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/fontawesome/otfs/Font Awesome 6 Free-Solid-900.otf -------------------------------------------------------------------------------- /fonts/zh_CN-Adobe/AdobeFangsongStd-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/zh_CN-Adobe/AdobeFangsongStd-Regular.otf -------------------------------------------------------------------------------- /fonts/zh_CN-Adobe/AdobeHeitiStd-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/zh_CN-Adobe/AdobeHeitiStd-Regular.otf -------------------------------------------------------------------------------- /fonts/zh_CN-Adobe/AdobeKaitiStd-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/zh_CN-Adobe/AdobeKaitiStd-Regular.otf -------------------------------------------------------------------------------- /fonts/zh_CN-Adobe/AdobeSongStd-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/fonts/zh_CN-Adobe/AdobeSongStd-Light.otf -------------------------------------------------------------------------------- /images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/images/avatar.jpg -------------------------------------------------------------------------------- /images/resume_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luooofan/resume/874173fdf343941169e7f673f4344c075fc85422/images/resume_example.jpg -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | # uncomment the # before $ to enable PDF update automatically 2 | # see man latexmk for more info 3 | 4 | ## Usage 5 | # latexmk -xelatex -gg -silent -pvc 6 | 7 | ## Mac OS X - Skim 8 | $pdf_previewer = 'osascript -e "set theFile to POSIX file \"%S\" as alias" -e "set thePath to POSIX path of theFile" -e "tell application \"Skim\"" -e "open theFile" -e "end tell"'; 9 | $pdf_update_method = 4; 10 | $pdf_update_command = 'osascript -e "set theFile to POSIX file \"%S\" as alias" -e "set thePath to POSIX path of theFile" -e "tell application \"Skim\"" -e "set theDocs to get documents whose path is thePath" -e "try" -e "if (count of theDocs) > 0 then revert theDocs" -e "end try" -e "open theFile" -e "end tell"'; 11 | 12 | ## GNU/Linux - Evince 13 | 14 | ## Windows - Sumatra 15 | -------------------------------------------------------------------------------- /resume-zh_CN.tex: -------------------------------------------------------------------------------- 1 | % !TEX TS-program = xelatex 2 | % !TEX encoding = UTF-8 Unicode 3 | % !Mode:: "TeX:UTF-8" 4 | 5 | \documentclass{resume} 6 | \usepackage{stys/zh_CN-Adobefonts_external} % Simplified Chinese Support using external fonts (./fonts/zh_CN-Adobe/) 7 | % \usepackage{stys/NotoSansSC_external} 8 | % \usepackage{stys/NotoSerifCJKsc_external} 9 | % \usepackage{stys/zh_CN-Adobefonts_internal} % Simplified Chinese Support using system fonts 10 | \usepackage{stys/linespacing_fix} % disable extra space before next section 11 | \usepackage{bookmark} 12 | \usepackage{cite} 13 | % \usepackage{graphicx} % for header_with_photo. avatar 14 | % \usepackage{tabularray} % for header_with_photo 15 | 16 | \begin{document} 17 | \pagenumbering{gobble} % suppress displaying page number 18 | 19 | \settitlelinestyle{default} % partialbg, fullbg 20 | % \settitlelinestyle{partialbg} 21 | % \settitlelinestyle{fullbg} 22 | 23 | % \input{texs/header_with_photo} % uncomment line #13 #14! 24 | \input{texs/header} 25 | \input{texs/sections} 26 | 27 | %% Reference 28 | % \newpage 29 | % \bibliographystyle{cites/IEEETran} 30 | % \bibliography{cites/mycite} 31 | \end{document} 32 | -------------------------------------------------------------------------------- /resume.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e} 2 | \ProvidesClass{resume}[2024/09/22 An elegant Résumé class] 3 | \LoadClass[11pt]{article} 4 | 5 | % disable indent globally 6 | \setlength{\parindent}{0pt} 7 | % some general improvements, defines the XeTeX logo 8 | \RequirePackage{xltxtra} 9 | % use xifthen 10 | \RequirePackage{xifthen} 11 | % use hyperlink for email and url 12 | \RequirePackage{hyperref} 13 | \hypersetup{hidelinks} 14 | \RequirePackage{url} 15 | \urlstyle{tt} 16 | 17 | % use fontawesome6 18 | \RequirePackage{stys/fontawesome6} 19 | 20 | % use xcolor for customizing color 21 | \RequirePackage{xcolor} 22 | %% Color setup 23 | \definecolor{cyanbg}{HTML}{f0fafa} 24 | \definecolor{cyanfg}{HTML}{00a6a7} 25 | \definecolor{nwpubluebg}{HTML}{01408f} 26 | % \definecolor{nwpubluebg}{HTML}{004DFF} % C100 M70 27 | 28 | % loading fonts 29 | \RequirePackage{fontspec} 30 | % Main document font 31 | \setmainfont[ 32 | Path = fonts/Main/ , 33 | Extension = .otf , 34 | UprightFont = *-regular , 35 | BoldFont = *-bold , 36 | ItalicFont = *-italic , 37 | BoldItalicFont = *-bolditalic , 38 | SmallCapsFont = Fontin-SmallCaps 39 | ]{texgyretermes} 40 | 41 | \RequirePackage[ 42 | a4paper, 43 | left=0.80in, 44 | right=0.80in, 45 | top=0.85in, % tune this! 46 | bottom=0.55in, 47 | nohead 48 | ]{geometry} 49 | 50 | \RequirePackage{titlesec} 51 | \RequirePackage{enumitem} 52 | \setlist{noitemsep} % removes spacing from items but leaves space around the whole list 53 | %\setlist{nosep} % removes all vertical spacing within and around the list 54 | \setlist[itemize]{topsep=0.25em, leftmargin=1.25pc} 55 | \setlist[enumerate]{topsep=0.25em, leftmargin=1.25pc} 56 | \RequirePackage[super]{nth} 57 | 58 | \newcommand{\titlelinestyle}{default} % partialbg, fullbg 59 | \newcommand{\settitlelinestyle}[1]{% 60 | \renewcommand{\titlelinestyle}{#1}% 61 | \applyColorAndTitleStyle% 62 | } 63 | 64 | \newcommand*{\tallphantom}[1]{\vphantom{\rule{0pt}{#1}}} 65 | 66 | \newcommand{\applyColorAndTitleStyle}{% 67 | \ifthenelse{\equal{\titlelinestyle}{default}}{% 68 | \colorlet{fgcolor}{nwpubluebg} % 69 | \colorlet{accentcolor}{nwpubluebg} % 70 | \titleformat{\section} % Customise the \section command 71 | {\Large\bfseries\raggedright\color{fgcolor}} % Make the \section headers large (\Large), 72 | % small capitals (\scshape) -> bold font (\bfseries), 73 | % left aligned (\raggedright) and use fgcolor 74 | {}{0em} % Can be used to give a prefix to all sections, like 'Section ...' 75 | {} % Can be used to insert code before the heading 76 | % {\colorbox{fgcolor}{\makebox[0.1em][l]{\strut\tallphantom{16pt}}}} % 有 icon 没必要用这个 77 | [\titleline{\color{fgcolor}\titlerule}] % Default inserts a horizontal line after the heading 78 | % REF: https://tex.stackexchange.com/a/40089 79 | }{% 80 | \colorlet{bgcolor}{cyanbg} 81 | \colorlet{fgcolor}{cyanfg} 82 | \colorlet{accentcolor}{black} 83 | \ifthenelse{\equal{\titlelinestyle}{partialbg}}{% 84 | \titleformat{\section} 85 | {\Large\bfseries\raggedright\color{fgcolor}} 86 | {}{0em}% 87 | {} 88 | [\titleline{\color{fgcolor}\titlerule}] 89 | }{% 90 | \ifthenelse{\equal{\titlelinestyle}{fullbg}}{% 91 | \titleformat{\section} 92 | {\Large\bfseries\raggedright\color{fgcolor}} 93 | {}{0em} 94 | {} 95 | }{% 96 | \PackageError{resume}{Invalid value for titlelinestyle: \titlelinestyle}{} 97 | }% 98 | } 99 | } 100 | } 101 | \AtBeginDocument{\applyColorAndTitleStyle} 102 | 103 | \titlespacing*{\section}{0cm}{*1.8}{*1.8} 104 | 105 | \titleformat{\subsection} 106 | {\large\raggedright} 107 | {}{0em} 108 | {} 109 | \titlespacing*{\subsection}{0cm}{*1.8}{*0.6} 110 | 111 | \newcommand{\datedsection}[2]{% 112 | \section[#1]{#1 \hfill #2}% 113 | } 114 | \newcommand{\datedsubsection}[2]{% 115 | \subsection[#1]{#1 \hfill #2}% 116 | } 117 | \newcommand{\datedline}[2]{% 118 | {\par #1 \hfill #2 \par}% 119 | } 120 | 121 | \newcommand{\name}[1]{ 122 | \centerline{\Huge\bfseries{#1}} 123 | \vspace{1.5ex} 124 | } 125 | 126 | % defines one's name 127 | % usage: \name{} 128 | \newcommand{\nameTest}[1]{ 129 | {\large\bfseries{#1}} 130 | } 131 | 132 | % Title 133 | \newcommand*{\sectionTitle}[2]{% 134 | \ifthenelse{\equal{\titlelinestyle}{default}}{% 135 | \section{% 136 | \texorpdfstring% 137 | {\icon{#2} #1}% 标题无背景色 有下划线 138 | {#1}% 139 | }% 140 | }{% 141 | \ifthenelse{\equal{\titlelinestyle}{partialbg}}{% 142 | \section{% 143 | \texorpdfstring% 144 | % {\colorbox{bgcolor}{\color{fgcolor}{\icon{#2} #1}\strut\tallphantom{16pt}}}% 上下 pad 145 | {\colorbox{bgcolor}{\icon{#2} #1}}% 标题内容部分背景色 可加下划线 146 | {#1}% 147 | }% 148 | }{% 149 | \ifthenelse{\equal{\titlelinestyle}{fullbg}}{% 150 | \section{% 151 | \texorpdfstring% 152 | % 可以试试 makebox 置顶放 + tallphantom 153 | % {\colorbox{bgcolor}{\makebox[\textwidth - 6pt][l]{\icon{#2} #1}\strut\tallphantom{16pt}}}% 154 | {\colorbox{bgcolor}{\makebox[\textwidth - 6pt][l]{\icon{#2} #1}}}% 标题整行背景色 不要加下划线 155 | {#1}% 156 | }% 157 | }{% 158 | \PackageError{resume}{Invalid value for titlelinestyle: \titlelinestyle}{} 159 | }% 160 | } 161 | } 162 | } 163 | 164 | % REF: [resume/resume.cls at master · liweitianux/resume](https://github.com/liweitianux/resume/blob/master/resume.cls) 165 | \def\@iconsize{\normalsize} 166 | \newcommand*{\iconsize}[1]{\def\@iconsize{#1}} 167 | 168 | % icon 不设定 size 和 color 在其外层设定 169 | \newcommand*{\icon}[1]{% 170 | % {\@iconsize{\large}\makebox[1em][c]{\textcolor{fgcolor}{#1}}}% 171 | {\makebox[1em][c]{#1}}% 172 | \hspace{0.3em}%\strut% 173 | } 174 | 175 | % defines one's email 176 | % usage: \email{} 177 | \newcommand{\email}[1]{\basicInfoItem{\faiconsixbf{envelope}}{\href{mailto:#1}{#1}}} 178 | 179 | % defines one's phone 180 | % usage: \phone{} 181 | \newcommand{\phone}[1]{\basicInfoItem{\faiconsixbf{phone}}{#1}} 182 | 183 | \newcommand{\code}[1]{\basicInfoItem{\faiconsixbf{code}}{#1}} 184 | 185 | \newcommand{\identity}[1]{\basicInfoItem{\faiconsixbf{address-card}}{#1}} 186 | 187 | % also: calendar-days, calendar-week, calendar-minus, calendar-plus 188 | \newcommand{\calendar}[1]{\basicInfoItem{\faiconsixbf{calendar}}{#1}} 189 | 190 | \newcommand{\birthday}[1]{\basicInfoItem{\faiconsixbf{cake-candles}}{#1}} 191 | 192 | \newcommand{\hometown}[1]{\basicInfoItem{\faiconsixbf{house}}{#1}} 193 | 194 | \newcommand{\boy}{\basicInfoItem{\faiconsixbf{mars}}{男}} 195 | \newcommand{\girl}{\basicInfoItem{\faiconsixbf{venus}}{女}} 196 | 197 | % defines one's linkedin 198 | % usage: \linkedin{} 199 | \newcommand{\linkedin}[2][]{\basicInfoItem{\faiconsix{linkedin-in}} 200 | {\ifthenelse{\isempty{#1}}% 201 | {\href{#2}{#2}} 202 | {\href{#2}{#1}}}} 203 | \newcommand{\linkedinsquare}[2][]{\basicInfoItem{\faiconsix{linkedin}} 204 | {\ifthenelse{\isempty{#1}}% 205 | {\href{#2}{#2}} 206 | {\href{#2}{#1}}}} 207 | 208 | % defines one's GitHub 209 | % usage: \github{} 210 | \newcommand{\github}[2][]{\basicInfoItem{\faiconsix{github}} 211 | {\ifthenelse{\isempty{#1}}% 212 | {\href{#2}{#2}} 213 | {\href{#2}{#1}}}} 214 | 215 | % defines one's homepage 216 | % usage: \homepage{} 217 | \newcommand{\homepage}[2][]{\basicInfoItem{\faiconsixbf{link}} 218 | {\ifthenelse{\isempty{#1}}% 219 | {\href{#2}{#2}} 220 | {\href{#2}{#1}}}} 221 | 222 | % \newcommand{\basicInfoItem}[2]{\color{fgcolor}{\icon{#1}}\ \color{black}\rmfamily\large{#2}} 223 | \newcommand{\basicInfoItem}[2]{\icon{#1}\ \rmfamily\large{#2}} 224 | 225 | \newcommand{\dotSep}{\ \ \textbf{\textperiodcentered}\ \ } 226 | 227 | \newcommand{\basicInfo}[1]{ 228 | % \centerline{\sffamily\large{#1}} 229 | \centerline{#1} 230 | \vspace{1.5ex} 231 | } 232 | 233 | \newcommand{\role}[2]{ 234 | {\par \textit{#1} ~ #2 \par} 235 | \vspace{0.6ex} 236 | } 237 | 238 | \newcommand{\texthl}[1]{\textcolor{accentcolor}{\textbf{#1}}} 239 | 240 | \newcommand{\normalline}[1]{\par #1 \par} 241 | -------------------------------------------------------------------------------- /stys/NotoSansSC_external.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | \ProvidesPackage{stys/NotoSansSC_external}[2018/05/20 NotoSansSC_external Package] 3 | 4 | \RequirePackage{fontspec} 5 | \RequirePackage{xeCJK} 6 | 7 | % https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def 8 | % ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体 9 | % vim:ft=tex 10 | 11 | \defaultfontfeatures{Path = fonts/NotoSansSC/, Mapping=tex-text} 12 | 13 | \setCJKmainfont[ 14 | BoldFont=NotoSansSC-Bold.otf, 15 | ItalicFont=NotoSansSC-Regular.otf, 16 | SmallCapsFont=NotoSansSC-Bold.otf 17 | ]{NotoSansSC-Regular.otf} 18 | \setCJKsansfont{NotoSansSC-Bold.otf} 19 | \setCJKmonofont{NotoSansSC-Regular.otf} 20 | 21 | \setCJKfamilyfont{zhsong}{NotoSansSC-Regular.otf} 22 | \setCJKfamilyfont{zhhei}{NotoSansSC-Bold.otf} 23 | \setCJKfamilyfont{zhfs}{NotoSansSC-Regular.otf} 24 | \setCJKfamilyfont{zhkai}{NotoSansSC-Regular.otf} 25 | 26 | \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体 27 | \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体 28 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书 29 | \newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 30 | 31 | \endinput 32 | -------------------------------------------------------------------------------- /stys/NotoSerifCJKsc_external.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | \ProvidesPackage{stys/NotoSerifCJKsc_external}[2018/05/20 NotoSerifCJKsc_external Package] 3 | 4 | \RequirePackage{fontspec} 5 | \RequirePackage{xeCJK} 6 | 7 | % https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def 8 | % ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体 9 | % vim:ft=tex 10 | 11 | \defaultfontfeatures{Path = fonts/NotoSerifCJKsc/, Mapping=tex-text} 12 | 13 | \setCJKmainfont[ 14 | BoldFont=NotoSerifCJKsc-Bold.otf, 15 | ItalicFont=NotoSerifCJKsc-Regular.otf, 16 | SmallCapsFont=NotoSerifCJKsc-Bold.otf 17 | ]{NotoSerifCJKsc-Regular.otf} 18 | \setCJKsansfont{NotoSerifCJKsc-Bold.otf} 19 | \setCJKmonofont{NotoSerifCJKsc-Regular.otf} 20 | 21 | \setCJKfamilyfont{zhsong}{NotoSerifCJKsc-Regular.otf} 22 | \setCJKfamilyfont{zhhei}{NotoSerifCJKsc-Bold.otf} 23 | \setCJKfamilyfont{zhfs}{NotoSerifCJKsc-Regular.otf} 24 | \setCJKfamilyfont{zhkai}{NotoSerifCJKsc-Regular.otf} 25 | 26 | \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体 27 | \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体 28 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书 29 | \newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 30 | 31 | \endinput 32 | -------------------------------------------------------------------------------- /stys/create_fontawesome_sty.py: -------------------------------------------------------------------------------- 1 | # PAY ATTENTION HERE!!! 2 | # REF: https://raw.githubusercontent.com/gvgramazio/latex-fontawesome6/master/create_sty.py 3 | 4 | import os 5 | import json 6 | 7 | # download zip file from https://fontawesome.com/ and extract into fontawesome directory. 8 | INPUT_FILE = os.path.join("..", "fonts", "fontawesome", "metadata", "icons.json") 9 | OUTPUT_FILE = "fontawesome6.sty" 10 | 11 | OUTPUT_HEADER = r''' 12 | % Identify this package. 13 | \NeedsTeXFormat{LaTeX2e} 14 | \ProvidesPackage{stys/fontawesome6}[2024/09/20 v6.6.0 font awesome icons] 15 | % Requirements to use. 16 | \usepackage{fontspec} 17 | % Configure a directory location for fonts(default: 'fonts/') 18 | \newcommand*{\fontdir}[1][fonts/fontawesome/otfs/]{\def\@fontdir{#1}} 19 | \fontdir 20 | % Define pro option 21 | \DeclareOption{pro}{ 22 | % Define shortcut to load the Font Awesome pro font. 23 | \newfontfamily\FASIX[ 24 | Path=\@fontdir, 25 | UprightFont=*-Regular-400, 26 | ItalicFont=*-Light-300, 27 | BoldFont=*-Solid-900, 28 | ]{Font Awesome 6 Pro} 29 | } 30 | \ProcessOptions\relax 31 | % Define shortcut to load the Font Awesome font for brands. 32 | \newfontfamily{\FAbrands}[ 33 | Path=\@fontdir, 34 | UprightFont=*-Regular-400, 35 | BoldFont=*-Regular-400, 36 | ]{Font Awesome 6 Brands} 37 | % Define shortcut to load the Font Awesome font. 38 | \@ifundefined{FASIX}{% 39 | \newfontfamily\FASIX[ 40 | Path=\@fontdir, 41 | UprightFont=*-Regular-400, 42 | BoldFont=*-Solid-900, 43 | ]{Font Awesome 6 Free} 44 | }{} 45 | % Generic command displaying an icon by its name. 46 | \newcommand*{\faiconsix}[1]{{ 47 | \csname faiconsix@#1\endcsname 48 | }} 49 | \newcommand*{\faiconsixbf}[1]{{ 50 | \textbf{\faiconsix{#1}} 51 | }} 52 | ''' 53 | 54 | OUTPUT_LINE = '\expandafter\def\csname faiconsix@%(name)s\endcsname {%(font)s\symbol{"%(symbol)s}} \n' 55 | 56 | def main(): 57 | with open(INPUT_FILE, 'r') as json_data: 58 | icons = json.load(json_data) 59 | with open(OUTPUT_FILE, 'w') as w: 60 | w.write(OUTPUT_HEADER) 61 | for icon_name in sorted(icons.keys()): 62 | font = "\FASIX" if "brands" not in icons[icon_name]["styles"] else "\FAbrands" 63 | w.write( 64 | OUTPUT_LINE % { 65 | 'name': icon_name, 'symbol': icons[icon_name]["unicode"].upper(), "font": font 66 | } 67 | ) 68 | w.write(r'\endinput') 69 | 70 | 71 | if __name__ == "__main__": 72 | main() -------------------------------------------------------------------------------- /stys/linespacing_fix.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | \ProvidesPackage{stys/linespacing_fix}[2015/06/06 linespacing_fix Package] 3 | 4 | % fix extra space introduced by setspace 5 | % http://tex.stackexchange.com/questions/138752/unnecessary-space-after-endspacing 6 | \RequirePackage{setspace} 7 | %% insert the following material in preamble 8 | \RequirePackage{calc} 9 | \newlength\modparskip 10 | \newlength\modbaselineskip 11 | \def\baselinestretch{1} % this parameter will be redefined at start of 'spacing' environment 12 | \setlength\modparskip{\parskip/\real{\baselinestretch}}% 13 | \setlength\modbaselineskip{\baselineskip/\real{\baselinestretch}}% 14 | \makeatletter 15 | \renewenvironment{spacing}[1]{\par% 16 | \def\baselinestretch{#1}% 17 | \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi% 18 | }% 19 | {\par% 20 | \vskip \modparskip% % originally: \vskip \parskip 21 | \vskip \modbaselineskip% % originally: \vskip \baselineskip 22 | } 23 | \makeatother 24 | %% end of material to be inserted in preamble 25 | -------------------------------------------------------------------------------- /stys/zh_CN-Adobefonts_external.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | \ProvidesPackage{stys/zh_CN-Adobefonts_external}[2015/05/25 zh_CN-Adobefonts_internal Package] 3 | 4 | \RequirePackage{fontspec} 5 | \RequirePackage{xeCJK} 6 | 7 | % https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def 8 | % ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体 9 | % vim:ft=tex 10 | 11 | \defaultfontfeatures{Path = fonts/zh_CN-Adobe/, Mapping=tex-text} 12 | 13 | \setCJKmainfont[ 14 | BoldFont=AdobeHeitiStd-Regular.otf, 15 | ItalicFont=AdobeKaitiStd-Regular.otf, 16 | SmallCapsFont=AdobeHeitiStd-Regular.otf 17 | ]{AdobeSongStd-Light.otf} 18 | \setCJKsansfont{AdobeHeitiStd-Regular.otf} 19 | \setCJKmonofont{AdobeFangsongStd-Regular.otf} 20 | 21 | \setCJKfamilyfont{zhsong}{AdobeSongStd-Light.otf} 22 | \setCJKfamilyfont{zhhei}{AdobeHeitiStd-Regular.otf} 23 | \setCJKfamilyfont{zhfs}{AdobeFangsongStd-Regular.otf} 24 | \setCJKfamilyfont{zhkai}{AdobeKaitiStd-Regular.otf} 25 | 26 | \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体 27 | \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体 28 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书 29 | \newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 30 | 31 | \endinput 32 | -------------------------------------------------------------------------------- /stys/zh_CN-Adobefonts_internal.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | \ProvidesPackage{stys/zh_CN-Adobefonts_internal}[2015/05/25 zh_CN-Adobefonts_internal Package] 3 | 4 | \RequirePackage{xeCJK} 5 | 6 | % https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def 7 | % ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体 8 | % vim:ft=tex 9 | 10 | \setCJKmainfont[ 11 | BoldFont=Adobe Heiti Std, 12 | ItalicFont=Adobe Kaiti Std, 13 | SmallCapsFont=Adobe Heiti Std 14 | ]{Adobe Song Std} 15 | \setCJKsansfont{Adobe Heiti Std} 16 | \setCJKmonofont{Adobe Fangsong Std} 17 | 18 | \setCJKfamilyfont{zhsong}{Adobe Song Std} 19 | \setCJKfamilyfont{zhhei}{Adobe Heiti Std} 20 | \setCJKfamilyfont{zhfs}{Adobe Fangsong Std} 21 | \setCJKfamilyfont{zhkai}{Adobe Kaiti Std} 22 | \setCJKfamilyfont{zhli}{LiSu} 23 | \setCJKfamilyfont{zhyou}{YouYuan} 24 | 25 | \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体 26 | \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体 27 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书 28 | \newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 29 | \newcommand*{\lishu}{\CJKfamily{zhli}} % 隶书 30 | \newcommand*{\youyuan}{\CJKfamily{zhyou}} % 幼圆 31 | 32 | \endinput 33 | -------------------------------------------------------------------------------- /texs/header.tex: -------------------------------------------------------------------------------- 1 | \name{洛凡} 2 | 3 | \basicInfo{ 4 | \phone{183-0000-0000}\dotSep 5 | \email{luooofan@gmail.com}\dotSep 6 | \github[luooofan]{https://github.com/luooofan}\dotSep 7 | \code{C/C++} 8 | } 9 | -------------------------------------------------------------------------------- /texs/header_with_photo.tex: -------------------------------------------------------------------------------- 1 | \begin{tblr}{ 2 | width = \linewidth, 3 | colspec = {Q[l,2.25cm]X[c]Q[r,2.25cm]}, 4 | % rows = {abovesep=0pt, belowsep=0pt}, 5 | columns = {colsep=2pt}, 6 | row{1} = {ht=4.5em, font=\Huge\scshape}, 7 | row{3} = {ht=2em, abovesep=0pt}, 8 | } 9 | & 洛凡 & \SetCell[r=3]{f} \includegraphics[width=0.8in]{images/avatar} \\ 10 | & \boy\dotSep \calendar{2024.1.1}\dotSep \hometown{籍贯}\dotSep \identity{政治面貌} & \\ 11 | & \phone{18300000000}\dotSep \email{luooofan@gmail.com}\dotSep \github[luooofan]{https://github.com/luooofan} & \\ 12 | \end{tblr} 13 | 14 | -------------------------------------------------------------------------------- /texs/sections.tex: -------------------------------------------------------------------------------- 1 | \sectionTitle{教育背景}{\faiconsixbf{graduation-cap}} 2 | \datedsubsection{\texthl{大学} / \textit{计算机科学与技术} / \textit{硕士}}{2022 -- 2025} 3 | \normalline{保研,主要研究方向为 xxx} 4 | \vspace{-3pt} 5 | \datedsubsection{\texthl{大学} / \textit{计算机科学与技术} / \textit{本科}}{2018 -- 2022} 6 | \normalline{获得过 xxx 奖} 7 | 8 | \sectionTitle{实习经历}{\faiconsixbf{building-user}} % building-columns 9 | \datedsubsection{\textbf{科技公司} 上海}{2023.07 -- 2024.04} 10 | \role{实习}{经理: 高富帅} 11 | xxx 后端开发 12 | \begin{itemize} 13 | \item 实现了 xxx 特性 14 | \item 后台资源占用率减少 8\% 15 | \end{itemize} 16 | 17 | \sectionTitle{项目经历}{\faiconsixbf{users}} 18 | \datedsubsection{\textbf{\LaTeX\ 简历模板}}{2024.09 -- 至今} 19 | \role{\LaTeX, Python}{\href{https://github.com/luooofan/resume}{luooofan/resume}} 20 | Fork 自 \href{https://github.com/billryan/resume}{billryan/resume},优雅的 \LaTeX\ 简历模板 21 | \begin{itemize} 22 | \item 新增支持 FontAwesome 6.6.0 23 | \item 修改带图片的样式 24 | \item 新增多种标题行样式 25 | \item 其他修改 26 | \end{itemize} 27 | 28 | % Reference Test 29 | % \datedsubsection{\textbf{Paper Title\cite{zaharia2012resilient}}}{May. 2015} 30 | % An xxx optimized for xxx\cite{verma2015large} 31 | % \begin{itemize} 32 | % \item main contribution 33 | % \end{itemize} 34 | 35 | \sectionTitle{竞赛获奖}{\faiconsixbf{award}} 36 | \begin{onehalfspacing} 37 | \datedline{2019\space 比赛 / \textit{国家级} / \textit{银牌}}{2019.10} 38 | \datedline{2023\space 比赛 / \textit{国家级} / \textit{冠军}}{2024.01} 39 | \end{onehalfspacing} 40 | 41 | \sectionTitle{奖学金}{\faiconsix{google-scholar}} 42 | \begin{onehalfspacing} 43 | \datedline{2019 奖学金 / \textit{校级二等}}{2019.10} 44 | \datedline{2020 奖学金 / \textit{校级一等}}{2020.10} 45 | \end{onehalfspacing} 46 | 47 | \sectionTitle{专业技能}{\faiconsixbf{gears}} 48 | \begin{onehalfspacing} 49 | \normalline{熟悉 Linux 系统,掌握常用 Linux 命令,日常在 Linux 环境下从事开发} 50 | \normalline{通过英语 CET-6,具备良好的英文文献阅读能力} 51 | \end{onehalfspacing} 52 | 53 | \sectionTitle{校园经历}{\faiconsixbf{school}} 54 | \begin{onehalfspacing} 55 | \datedline{xxx志愿服务活动}{2024.01} 56 | \end{onehalfspacing} 57 | 58 | \sectionTitle{自我评价}{\faiconsixbf{comment}} % note-sticky 59 | \begin{onehalfspacing} 60 | \normalline{乐观开朗,积极向上} 61 | \end{onehalfspacing} 62 | --------------------------------------------------------------------------------