Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically compile based on workflows #Support both two branches# #60

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
4dd187e
add Adobe fonts
billryan May 31, 2015
590feb0
Merge branch 'master' into zh_CN
billryan May 31, 2015
00f95ef
update zh_CN resume
billryan May 31, 2015
912a2d1
update zh_CN png
billryan May 31, 2015
449dc88
update zh_CN
billryan May 31, 2015
cdfd548
Merge branch 'master' into zh_CN
billryan May 31, 2015
c579948
Merge branch 'master' into zh_CN
billryan May 31, 2015
fc939d6
Merge branch 'master' into zh_CN
billryan May 31, 2015
555377c
force xelatex
billryan May 31, 2015
56bf556
merge
billryan May 31, 2015
1d2f80f
ingore my Chinese resume
billryan Jun 6, 2015
e3d4a70
Merge branch 'master' into zh_CN
billryan Jun 6, 2015
17d016c
Merge branch 'master' into zh_CN
billryan Jun 6, 2015
3fc3482
fix linespacing between subsections
billryan Jun 6, 2015
ae7be91
minor fix
billryan Jun 16, 2015
c34cd78
Merge branch 'master' into zh_CN
billryan Jun 17, 2015
db21205
minor update
billryan Jun 17, 2015
1828979
update utf-8 encoding
billryan Jun 17, 2015
ea4a7ac
minor update
billryan Jun 17, 2015
9fe3ae0
Merge branch 'master' into zh_CN
billryan Jun 17, 2015
ca34223
merge en_US and zh_CN sample
billryan Jun 18, 2015
c20240c
add Winedt UTF-8 support
billryan Jun 18, 2015
2e5d3a7
update Chinese readme
billryan Aug 22, 2015
2c8f728
add reference
billryan Aug 27, 2015
f8a9ba7
add reference
billryan Aug 27, 2015
14398d1
update reference document
billryan Aug 27, 2015
b6dabb4
Merge branch 'master' into zh_CN
billryan Oct 20, 2015
ccb7b9e
Merge branch 'master' into zh_CN
billryan Dec 11, 2015
5f26e24
upgrade to fontawesome 4.5.0
billryan Dec 11, 2015
083bbbf
remove unused otf fonts
billryan Dec 14, 2015
216dd0f
Merge branch 'master' into zh_CN
billryan Dec 15, 2015
52417e6
udpate
billryan Dec 15, 2015
2b67154
update docs
billryan Dec 15, 2015
443c72d
remove binary files
billryan Dec 15, 2015
5d66c45
minor fix
billryan Dec 15, 2015
6ff2d1f
merge master
billryan Oct 8, 2016
dad3d00
update docs
billryan Oct 8, 2016
2a5599a
fix #22
billryan Apr 6, 2018
3405124
merge from master branch
billryan Apr 6, 2018
6922402
Merge branch 'master' into zh_CN
billryan Apr 7, 2018
ad4ea4a
add fonts for Noto CJK
billryan May 20, 2018
9f5f550
Merge branch 'master' into zh_CN
billryan Sep 2, 2018
ca47699
remove qiniu cdn
billryan Aug 3, 2019
5a3fb62
update overleaf link
billryan Feb 26, 2020
a86b6c8
highlight the tex code
imbajin Aug 20, 2020
b420e11
Merge pull request #55 from 0x00Ghost/diy-docs
billryan Aug 23, 2020
5957de6
Add practice reference section
imbajin Aug 23, 2020
9c78632
Merge pull request #56 from 0x00Ghost/diy-docs
billryan Aug 27, 2020
a48d71a
Update resume-zh_CN.tex
crazydogen Sep 22, 2020
069a0ba
Update resume-zh_CN.tex
crazydogen Sep 22, 2020
dbee7c3
Update resume-zh_CN.tex
crazydogen Sep 22, 2020
5aee0d5
Create ci4zh_CN.yml
crazydogen Sep 22, 2020
6d19f2c
Update resume-zh_CN.tex
crazydogen Sep 22, 2020
d55a3a5
Add files via upload
crazydogen Dec 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci4master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build resume tex files in master

on:
push:
branches:
- master

jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: |
./resume.tex
./resume_photo.tex
latexmk_use_xelatex: True
post_compile: "latexmk -c"

- name: Upload pdf
uses: actions/upload-artifact@v2
with:
name: resume_pdf_master
path: ./resume*.pdf
29 changes: 29 additions & 0 deletions .github/workflows/ci4zh_CN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build resume tex files in zh-CN

on:
push:
branches:
- zh_CN

jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: |
./resume.tex
./resume_photo.tex
./resume-zh_CN.tex
latexmk_use_xelatex: True
post_compile: "latexmk -c"

- name: Upload pdf
uses: actions/upload-artifact@v2
with:
name: resume_pdf_zh_CN
path: ./resume*.pdf
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@
# do not upload secret infomation
myresume.tex
myresume.pdf
myresume-zh_CN.tex
myresume-zh_CN.pdf
31 changes: 31 additions & 0 deletions NotoSansSC_external.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{NotoSansSC_external}[2018/05/20 NotoSansSC_external Package]

\RequirePackage{fontspec}
\RequirePackage{xeCJK}

% https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def
% ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体
% vim:ft=tex

\defaultfontfeatures{Path = fonts/NotoSansSC/, Mapping=tex-text}

\setCJKmainfont[
BoldFont=NotoSansSC-Bold.otf,
ItalicFont=NotoSansSC-Regular.otf,
SmallCapsFont=NotoSansSC-Bold.otf
]{NotoSansSC-Regular.otf}
\setCJKsansfont{NotoSansSC-Bold.otf}
\setCJKmonofont{NotoSansSC-Regular.otf}

\setCJKfamilyfont{zhsong}{NotoSansSC-Regular.otf}
\setCJKfamilyfont{zhhei}{NotoSansSC-Bold.otf}
\setCJKfamilyfont{zhfs}{NotoSansSC-Regular.otf}
\setCJKfamilyfont{zhkai}{NotoSansSC-Regular.otf}

\newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体
\newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体
\newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书
\newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋

\endinput
31 changes: 31 additions & 0 deletions NotoSerifCJKsc_external.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{NotoSerifCJKsc_external}[2018/05/20 NotoSerifCJKsc_external Package]

\RequirePackage{fontspec}
\RequirePackage{xeCJK}

% https://github.com/boathit/CTEX/blob/master/texmf/tex/latex/ctex/fontset/ctex-xecjk-adobefonts.def
% ctex-xecjk-adobefonts.def: Adobe 的 xeCJK 字体设置,为 Adobe 的四套字体
% vim:ft=tex

\defaultfontfeatures{Path = fonts/NotoSerifCJKsc/, Mapping=tex-text}

\setCJKmainfont[
BoldFont=NotoSerifCJKsc-Bold.otf,
ItalicFont=NotoSerifCJKsc-Regular.otf,
SmallCapsFont=NotoSerifCJKsc-Bold.otf
]{NotoSerifCJKsc-Regular.otf}
\setCJKsansfont{NotoSerifCJKsc-Bold.otf}
\setCJKmonofont{NotoSerifCJKsc-Regular.otf}

\setCJKfamilyfont{zhsong}{NotoSerifCJKsc-Regular.otf}
\setCJKfamilyfont{zhhei}{NotoSerifCJKsc-Bold.otf}
\setCJKfamilyfont{zhfs}{NotoSerifCJKsc-Regular.otf}
\setCJKfamilyfont{zhkai}{NotoSerifCJKsc-Regular.otf}

\newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体
\newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体
\newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书
\newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋

\endinput
147 changes: 122 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,149 @@
# Résumé
# 一个简洁优雅的 XeLaTeX 简历模板

Hit branch [zh_CN](https://github.com/billryan/resume/tree/zh_CN) if you want a Simplified Chinese résumé.
Hit branch [master](https://github.com/billryan/resume/tree/master) if you wanna an English résumé.

中文用户请前往 [zh_CN](https://github.com/billryan/resume/tree/zh_CN) 分支
每年的9月10月是求职的高峰季,除了简历上充实的干货之外,一份美美的简历自然是能助你一臂之力的啦

An elegant \LaTeX\ résumé template, compiled with \XeLaTeX. Inspired by
\LaTeX 的简历模板其实是有不少的,坊间流传较广的有 `moderncv`, 这货使用起来比较简单,样式改起来也很方便,但是不太适合作为一页纸简历模板,因为空白太多了。传统的 `resume` 宏包虽然适合用作一页纸简历,但是定制起来比较麻烦,需要懂不少 \TeX 语法。看过不少模板,老是觉得有什么地方不满意(处女座改变世界...),思来想去俺就自己从 ShareLaTeX 网站上找了个极简教程自己鼓捣了一个还算优雅的简历模板出来。

受以下项目启发:

- [zachscrivena/simple-resume-cv](https://github.com/zachscrivena/simple-resume-cv)
- [res](https://www.ctan.org/pkg/res)
- [JianXu's CV](http://www.jianxu.net/en/files/JianXu_CV.pdf)
- [Web Front-End Wenli Zhang.pdf](http://zhangwenli.com/cv/Web%20Front-End%20Wenli%20Zhang.pdf)
- [paciorek's CV/Resume template](http://www.stat.berkeley.edu/~paciorek/computingTips/Latex_template_creating_CV_.html)
- [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)

## Features
其中最后一条 shareLaTeX 的总结清晰易懂,强烈建议围观。接下来介绍模板使用细节和定制说明。

## 简介

该简历模板使用 `\XeLaTeX` 编译,无痛支持中文,开箱即用(几乎不需要懂 `\LaTeX` 语法),除了本地编译外也可使用 Overleaf **在线编译**,无需在本机安装 TeX 发行版。

主要的功能如下:

- 极其容易定制和扩展。
- 完善的 Unicode 字体支持,因为用的是 XeLaTeX 嘛
- 完美的简体中文支持,默认使用 adobefonts 的四套简体中文字型,其他字型可自行添加。
- 支持图标字体 FontAwesome 4.6.3

- Easy to further customize or extend
- Full support for unicode characters (e.g. CJK) with \XeLaTeX\
- Perfect Simplified Chinese fonts supported with Adobefonts
- FontAwesome 4.6.3 support
### 样例输出

## Quick Start
- Fork this repository
- Add information about you directly in GitHub
- Compile TeX file to PDF with [LaTeX.Online](https://latexonline.cc/)
![English](https://user-images.githubusercontent.com/1292567/62409353-3fecfc00-b608-11e9-8e83-84962912c956.png)
![English with photo](https://user-images.githubusercontent.com/1292567/62409351-3f546580-b608-11e9-9f6d-d232a68c5451.png)
![简体中文](https://user-images.githubusercontent.com/1292567/62409352-3fecfc00-b608-11e9-8d9e-76243ca3052a.png)

### Sample Output
- [英文 PDF](https://github.com/billryan/resume/files/3463503/resume.pdf)
- [加入照片的英文 PDF](https://github.com/billryan/resume/files/3463501/resume_photo.pdf)
- [简体中文 PDF](https://github.com/billryan/resume/files/3463502/resume-zh_CN.pdf)

- [PDF, English](https://latexonline.cc/compile?git=https://github.com/billryan/resume&target=resume.tex&command=xelatex)
- [PDF with the photo, English](https://latexonline.cc/compile?git=https://github.com/billryan/resume&target=resume_photo.tex&command=xelatex)
- [简体中文 PDF](http://7xojrx.com1.z0.glb.clouddn.com/docs/resume-zh_CN.pdf)
## 使用方法

![English](http://7xojrx.com1.z0.glb.clouddn.com/docs/resume.png)
![English with photo](http://7xojrx.com1.z0.glb.clouddn.com/docs/resume_photo.png)
![简体中文](http://7xojrx.com1.z0.glb.clouddn.com/docs/resume-zh_CN.png)
### Overleaf 在线编译

## Usage
感谢万能的『云计算』,`\LaTeX` 编译也可以放到云端了!使用这种方法无需在本机安装诸如 `CTeX/TeXlive/MacTeX` 等发行版,网站上还能有历史版本记录,十分方便!最简单的方法,浏览器中打开 [模板链接](https://www.overleaf.com/latex/templates/bill-ryans-elegant-latex-resume/xcqmhktmzmsw), 按需更改自己的名字和联系方式等。
在线预览时需要注意 Overleaf 自带的 PDF 阅读器对中文支持不太好(可能会显示乱码),这时在编辑界面的左侧菜单选择使用 native 阅读器即可。

1. Edit in ShareLaTeX online - <https://www.sharelatex.com/templates/556b27cf0d23e5a8117053d9>, **no TeX software install!**
2. Compile tex on your Computer
中文模板的文件为 `resume-zh_CN.tex`, 英文模板的文件为 `resume.tex`, 带照片的模板文件为 `resume_photo.tex`.

If you only need a résumé in English or have installed Adobe Simplified Chinese on your OS, **It would be better to clone only the master branch,** since the Simplified Chinese fonts files are too large.
### latexonline.cc

使用 [LaTeX.Online](https://latexonline.cc/) 在线编译

### 使用较新的 TeX 发行版在本地计算机编译

除了在线编译外,该模板当然也支持传统的本地编译,从 <https://github.com/billryan/resume/tree/zh_CN> 上克隆下来使用 XeLaTeX 编译即可。

```tex
xelatex resume.tex % 编译英文简历
xelatex resume_photo.tex % 编译带照片的简历
xelatex resume-zh_CN.tex % 编译中文简历
```
git clone https://github.com/billryan/resume.git --branch master --depth 1 --single-branch <folder>

### 中英文双语支持

\LaTeX 的中文支持一直是不少 TeX 新手心中的梦魇,该简历模板最大的特色就是『无痛』支持中英文双语,『无痛』的含义是指开箱即用——在线或者克隆到本地后只需要更改自己的信息即可,不需要自己设置中文字体支持等操作。

对 git 不了解或使用不方便的朋友可单独下载压缩包,解压即用。下载地址见 [GitHub 官网](https://github.com/billryan/resume/archive/zh_CN.zip), [大陆镜像加速](https://gods.coding.net/p/resume/git)

对 git 比较了解的朋友可选择克隆后切换到`zh_CN`分支,`zh_CN` 是`master`分支的超集,即`zh_CN`包含`master`分支所有的文件。
需要注意的是`zh_CN`分支包含 Adobe 的宋楷黑仿四套中文字体,体积较大(40 MB+),如果只需要英文简历的可单独克隆`master`分支。

中文使用UTF-8编码,对于大多数 Windows 用户来说,只要使用的不是太老的 CTeX 发行版,WinEdt 的中文支持也是毫无压力的。
编译时务必使用 \XeLaTeX,其他编译方式会报错,因为依赖了 \XeTeX 的一些东西。

### 中英文切换

英文模板范例见 <https://github.com/billryan/resume/blob/zh_CN/resume.tex>
中文模板范例见 <https://github.com/billryan/resume/blob/zh_CN/resume-zh_CN.tex>

中文模板与英文模板的区别仅有两行——使用中文时仅需反注释以下两行,模板中已默认启用,第一次编译时耗时相对较长(引入了外部中文字型),耐心等待下。

```tex
\usepackage{zh_CN-Adobefonts_external} % Simplified Chinese Support using external fonts (./fonts/zh_CN-Adobe/)
%\usepackage{zh_CN-Adobefonts_internal} % Simplified Chinese Support using system fonts
\usepackage{linespacing_fix} % disable extra space before next section
```

对于高级用户:如果系统已确定安装有 Adobe 的四套中文字型,在文档的开始处使用包`zh_CN-Adobefonts_internal`,这样第一次编译时也会很快。

### 参考文献

参考文献的引用采用 bib + bst 的方式管理,bib 中存放 BibTeX 格式的引用文本,bst 用于控制 bib 文件的展示形式,默认为 IEEEtran. 编译方式可选如下:

1. OSX/Linux 用户 `latexmk -pdf -pvc -silent myresume-zh_CN.tex` latexmkrc 配置文件可参考我的 [dotfiles/latexmkrc](https://github.com/billryan/dotfiles/blob/master/latex/latexmkrc)
2. Windows 用户可使用 WinEdt 中的 TeXify 选项编译(未测试)

除了以上两种编译方式,你还可以使用传统的编译方式:

```shell
xelatex myresume-zh_CN
bibtex myresume-zh_CN
xelatex myresume-zh_CN
xelatex myresume-zh_CN
```

范例文档中默认Reference 另起一页,想留在当前页的可注释掉`\newpage`

### 宏

普通用户直接使用模板中的宏即可,具体排版使用可直接参考范例 tex 文档,已经十分简洁了。
想自己添加新的宏的可以先看看 [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) 了解下该模板的简单背景。

- `\name`: 姓名
- `\email`: 邮箱
- `\linkedin`: LinkedIn
- `\basicInfo`: 联系信息, 按需加入
- `\section`: 用于分节, 如教育背景, 实习/项目经历等
- `\subsection`: 用于小节标题, 无日期选项
- `\datedsubsection`: 用于小节标题, 简历中使用最广,第二项为时间区间,自动右对齐
- `\itemize`: 清单列表,简历中应用最广
- `\enumerate`: 枚举列表,数字标号

### FontAwesome

首先在 [Font Awesome Icons](http://fortawesome.github.io/Font-Awesome/icons/) 上选中自己想使用的图标,然后在 [fontawesome.sty](https://github.com/billryan/resume/blob/zh_CN/fontawesome.sty) 中找到相应的宏, 将其作为普通文本一样使用。
如果不需要使用 FontAwesome 字体的把那些宏去掉即可。
其他的可以自行参考相应 cls 和 tex 文件。

### 实践参考

这里列举一下其他同学基于本模板的具体**实践心得**, 大家可以自行参考, 也欢迎<u>提交贡献</u>, 分享你的心得:

- [用 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 + 常见样式调整)

## License

[The MIT License (MIT)](http://opensource.org/licenses/MIT)

Copyrighted fonts are not subjected to this License.

## 总结

\LaTeX 的中文支持除了在系统配置文件内指定外还可以在当前项目内指定,这种方式适合大范围分发,正是这个模板中采用的方式,缺点就是大部分中文字型都是有版权的,使用上需要注意。在制作这个模板的过程中还发现合理使用 \LaTeX 现代宏包能大大减轻后期维护和升级的工作,需要使用的命令更少更清晰。ShareLaTeX 网站上有很多简单易懂的范例,当教材来使都不过分。\LaTeX 中文方面的教程精品的不多,刘海洋老师的《LaTeX 入门》 算是精品中的精品!

这个模板看似复杂,其实使用上极其省心,想在我这个模板的基础上改动样式的可以看相应的 cls 文件和详细说明,只是简单使用的话直接在范例文档的基础上改改即可。
总的来说这个模板适合找工作用,而且是偏技术型的一页纸简历。

祝大家玩的开心 :)
Binary file added fonts/NotoSansSC/NotoSansSC-Bold.otf
Binary file not shown.
Binary file added fonts/NotoSansSC/NotoSansSC-Regular.otf
Binary file not shown.
Binary file added fonts/NotoSerifCJKsc/NotoSerifCJKsc-Bold.otf
Binary file not shown.
Binary file added fonts/NotoSerifCJKsc/NotoSerifCJKsc-Regular.otf
Binary file not shown.
Binary file added fonts/zh_CN-Adobe/AdobeFangsongStd-Regular.otf
Binary file not shown.
Binary file added fonts/zh_CN-Adobe/AdobeHeitiStd-Regular.otf
Binary file not shown.
Binary file added fonts/zh_CN-Adobe/AdobeKaitiStd-Regular.otf
Binary file not shown.
Binary file added fonts/zh_CN-Adobe/AdobeSongStd-Light.otf
Binary file not shown.
24 changes: 24 additions & 0 deletions linespacing_fix.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{linespacing_fix}[2015/06/06 linespacing_fix Package]

% fix extra space introduced by setspace
% http://tex.stackexchange.com/questions/138752/unnecessary-space-after-endspacing
\RequirePackage{setspace}
%% insert the following material in preamble
\RequirePackage{calc}
\newlength\modparskip
\newlength\modbaselineskip
\def\baselinestretch{1} % this parameter will be redefined at start of 'spacing' environment
\setlength\modparskip{\parskip/\real{\baselinestretch}}%
\setlength\modbaselineskip{\baselineskip/\real{\baselinestretch}}%
\makeatletter
\renewenvironment{spacing}[1]{\par%
\def\baselinestretch{#1}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
}%
{\par%
\vskip \modparskip% % originally: \vskip \parskip
\vskip \modbaselineskip% % originally: \vskip \baselineskip
}
\makeatother
%% end of material to be inserted in preamble
Binary file added resume-en_US-zh_CN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading