generated from being24/latex-template-ja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume.cls
132 lines (110 loc) · 5.52 KB
/
resume.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
\ProvidesClass{classes/resume}[2023/02/06 resume]
% (u)pLaTeX非互換パッケージに対して互換させるパッチを読み込む命令
\RequirePackage{plautopatch}
% 2カラム,A4,フォントサイズ9pt
\LoadClass[
two column,
paper=a4,
fontsize=9pt,
disablejfam,
head_space=20mm,
foot_space=20mm,
gutter=15mm,
fore-edge=15mm,
column_gap=10mm]
{jlreq}
\RequirePackage{ifptex}
\RequirePackage{ifluatex}
\PassOptionsToPackage{hyphens}{url}
\RequirePackage{secdot} % sectionの数字の後のドットの制御
\sectiondot{subsection}
\RequirePackage{setspace} % 行間設定用パッケージ
\setstretch{0.8} % 行間設定
\RequirePackage{caption} % キャプションとサブキャプションのパッケージ
\RequirePackage{subcaption}
\RequirePackage{here} % 好きな位置にfigなどを置くためのパッケージ
\RequirePackage{bm} % ベクトルを大文字で書くためのパッケージ
\RequirePackage[hyphens]{xurl} % URLを表示するためのパッケージ、ハイフンでの改行を許可
\urlstyle{same} % URLの表示形式を本文と同じにする
\RequirePackage{graphicx} % 画像の挿入、テキストや図の操作のためのパッケージ
\RequirePackage{amssymb, amsmath} % 高度な数式記述用パッケージ
\RequirePackage{tabularray} % 高度な表組み用パッケージ
% \RequirePackage{minted} % ソースコード表示の用パッケージ
\RequirePackage{siunitx} % SI単位記法に準拠した形式で単位を書くためのパッケージ
\RequirePackage{subfiles} % 大規模な文章を分割して記述して、統合するためのパッケージ
\RequirePackage{indentfirst} % 最初の段落でインデントするためのパッケージ
\RequirePackage{type1cm} % 文字の大きさを自由に変えるためのパッケージ
\ifptex
\ifnativeuptex
%upLaTeX
\RequirePackage[dvipdfmx,unicode,hidelinks,pdfusetitle]{hyperref} % ハイパーリンクをつけるためのパッケージ、unicodeの使用を許可、リンクの下線を消す、pdfのメタデータをタイトルにする
\RequirePackage[T1]{fontenc} % 欧文フォントをT1エンコーディングに
\RequirePackage{newtxmath} % 数式フォントをnewtxmathにする
\RequirePackage{tgtermes} % 本文フォントをTeX Gyre Termesにする
\else
%pLaTeX
\fi
\fi
\ifluatex
% LuaLaTeX
\RequirePackage{luatexja}
\RequirePackage[unicode,hidelinks,pdfusetitle]{hyperref} % ハイパーリンクをつけるためのパッケージ、unicodeの使用を許可、リンクの下線罫線を消す、pdfのメタデータをタイトルにする、pdfのバージョンを1.4にする
% \RequirePackage{hyperxmp} % PDFのメタデータを設定するためのパッケージ
\RequirePackage[scale=1]{luatexja-fontspec}
\RequirePackage[haranoaji,deluxe]{luatexja-preset}
\setmainfont[BoldFont=TeXGyreTermes-Bold,ItalicFont=TeXGyreTermes-Italic,Ligatures=TeX]{TeXGyreTermes}
\setsansfont[BoldFont=TeXGyreHeros-Bold,ItalicFont=TeXGyreHeros-Italic,Ligatures=TeX]{TeXGyreHeros}
\RequirePackage{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\fi
\RequirePackage{enumitem} % 高機能番号付き箇条書きのパッケージ
\RequirePackage{tabularx} % 表の幅を指定するためのパッケージ
\RequirePackage[backend=biber,style=trad-unsrt]{biblatex} % biblatexを使用するためのパッケージ
\addbibresource{references.bib}
\DeclareFieldFormat*{journaltitle}{\textit{#1}} % 日本語雑誌名を通常に、英語雑誌名を斜体に
\DeclareFieldFormat*{title}{\textit{#1}}
\DeclareFieldFormat[inproceedings]{booktitle}{\textit{#1}}
\DeclareFieldFormat[book]{title}{\textit{#1}}
%ページ数の書式
\pagestyle{empty}
% figの余白の調整
% \setlength{\intextsep}{0pt}
% キャプションとサブキャプションの設定
\captionsetup[figure]{labelsep=space, labelformat=simple, name=Fig., skip=3pt, font={stretch=0.8}}
\captionsetup[subfigure]{labelsep=space, labelformat=simple, name=Fig., skip=3pt, font={stretch=0.8}}
\renewcommand*{\thesubfigure}{(\alph{subfigure})}
\captionsetup[table]{labelsep=space, labelformat=simple, name=Table, skip=3pt, font={stretch=0.8}}
% sectionのサイズを合わせる
\RenewBlockHeading{section}{1}{font={\jlreq@keepbaselineskip{\normalsize\bfseries}},after_label_space=0\jlreq@zw}
\RenewBlockHeading{subsection}{2}{font={\jlreq@keepbaselineskip{\normalsize\bfseries}},after_label_space=0\jlreq@zw}
\RenewBlockHeading{subsubsection}{3}{font={\jlreq@keepbaselineskip{\normalsize\bfseries}},after_label_space=0\jlreq@zw}
% セクション類の空白の設定
\ModifyHeading{section}{before_space=5pt, after_space=5pt}
\ModifyHeading{subsection}{before_space=5pt, after_space=5pt}
\ModifyHeading{subsubsection}{before_space=5pt, after_space=5pt}
% セクションタイトルが一行以下なら下、2行以上なら上
% \ModifyHeading{section}{lines=1}
% \ModifyHeading{subsection}{lines=1}
% \ModifyHeading{subsubsection}{lines=1}
% セクションが連続する際の行取りを設定
\SetBlockHeadingSpaces{
{_section{*},_subsection{before_space=0pt, after_space=5pt}}
{_subsection{*},_subsubsection{before_space=0pt, after_space=5pt}}
}
% figの余白の調整
% \setlength{\intextsep}{0pt}
% タイトルの設定
\makeatletter
\renewcommand{\@maketitle}{\newpage
\centering
\fontsize{14pt}{14pt}\selectfont
\@title
\par
\vspace{.5\jlreq@zh}
\fontsize{10pt}{10pt}\selectfont
\@author
\par
\vspace{2\jlreq@zh}
}
\normalsize
\makeatother