-
Notifications
You must be signed in to change notification settings - Fork 15
/
icis.cls
156 lines (128 loc) · 4.33 KB
/
icis.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{icis}[2014/03/01 ICIS Conference submission style]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass[10pt,letterpaper]{article}
% Must have the following two lines at the top of your document
% %!TEX TS-program = xelatex
% %!TEX encoding = UTF-8 Unicode
% Or you must manually choose to compile with XeLaTeX
% These 3 are required to use the Georgia font family
\RequirePackage{xltxtra}
\RequirePackage{fontspec}
\RequirePackage{xunicode}
\RequirePackage{graphicx}
\RequirePackage[labelsep=period,font=bf]{caption}
\RequirePackage[margin=1in, bottom=2.54cm, total={6.5in, 9in}]{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{stackengine}
% Get rid of spacing inside lists
\RequirePackage{enumitem}
\setlist{noitemsep}
\RequirePackage{xpatch}
\RequirePackage[
backend=biber, % Use biber as the backend
style=apa, % Set the bibliography style to APA
sortcites=true, % Sort citations when multiple are given
maxcitenames=1, % Show first author name only, with et al when more than one authors
maxbibnames=20, % Same for bibliography: show up to 20 author names
uniquelist=false, % Do not add distinguishing letters to repeated author lists
date=year, % Show only the year in citations and bibliographies
doi=true, % Include DOI in the bibliography entries
isbn=false, % Do not display ISBN numbers
url=true, % Show URLs for web sources
eprint=false, % Do not show eprint fields
]{biblatex}
\AtEveryBibitem{\clearfield{note}}
\AtEveryBibitem{\clearfield{annotation}}
\setlength{\bibhang}{0.63cm}
\RequirePackage[hang,flushmargin,bottom]{footmisc}
\renewcommand{\footnoterule}{%
\kern -3pt
\hrule width 140pt height 0.6pt
\kern 9pt
}
\renewbibmacro*{volume+number+eid}{%
\setunit{\addspace}%
\printtext[parens]{%
\printfield{volume}%
\setunit*{\addcolon}%
\printfield{number}}%
\setunit{\addcomma\space}%
\printfield{eid}}
\xpatchbibmacro{date+extradate}{%
\printtext[parens]%
}{%
\setunit*{\space}%
\printtext%
}{}{}
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\DeclareNameAlias{sortname}{last-first}
% \defaultfontfeatures{Scale=MatchLowercase}
\setmainfont[Ligatures={Common,TeX}]{Georgia}
% \setromanfont[Numbers=Uppercase]{Georgia}
\renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}
\renewcommand{\Huge}{\fontsize{20pt}{24pt}\selectfont}
\renewcommand{\LARGE}{\fontsize{13pt}{15pt}\selectfont}
\renewcommand{\Large}{\fontsize{12pt}{14pt}\selectfont}
\renewcommand{\large}{\fontsize{11pt}{13pt}\selectfont}
% \setlength{\textwidth}{7in}
% \setlength{\textheight}{9.25in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt}
\urlstyle{rm}
% These are variables set in the frontmatter of the document
% Not exactly sure if I need this step, but it was in the example I found.
\let\@conference\@empty
\let\@researchtype\@empty
\let\@shorttitle\@empty
\newcommand{\conference}[1]{\gdef\@conference{#1}}
\newcommand{\researchtype}[1]{\gdef\@researchtype{#1}}
\newcommand{\shorttitle}[1]{\gdef\@shorttitle{#1}}
\renewcommand{\maketitle}{%
\begin{center} %
{\Huge\bfseries\@title\par}
{\Large\itshape\@researchtype\par}
\end{center}
\thispagestyle{plain}\@thanks
}
% TODO: Figure out citation style. Of course, MISQ doesn't use APA.
% UPDATED: Now, MISQ uses APA.
\renewcommand{\section}{%
\@startsection
{section}{1}{0pt}{4pt}%
{4pt}{\bfseries\LARGE}%
}
\renewcommand{\subsection}{%
\@startsection
{subsection}{2}{0pt}{4pt}%
{4pt}{\bfseries\large\itshape}%
}
\renewcommand{\subsubsection}{%
\@startsection
{subsubsection}{3}{0pt}{4pt}%
{4pt}{\bfseries}%
}
\setcounter{secnumdepth}{0}
\newcommand{\changefont}{%
\fontsize{9}{11}\selectfont
}
% Header and footer info
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{\changefont\textit{\@shorttitle}}
\fancyfoot[R]{\changefont\textit{\@conference}\\\textbf{\thepage}}
% No header on the first page. Only a footer
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[R]{\changefont\textit{\@shorttitle}}
\fancyfoot[R]{\changefont\textit{\@conference}\\\textbf{\thepage}}
}
% Get rid of the horizontal rules
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Bibliography stuff
\renewcommand{\bibnamedelimi}{. }
% \renewcommand{\bibnamedelima}{.}
% \renewcommand{\bibnamedelimb}{.}