-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlpsc_abstract.cls
105 lines (85 loc) · 3.6 KB
/
lpsc_abstract.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
% This is a LaTeX 2e Class file for creating LPSC abstracts
\ProvidesClass{lpsc_abstract}[2018/12/03 LPSC Abstract Class]
\NeedsTeXFormat{LaTeX2e}
% Copyright (C) 2005,2007,2008 Ross A. Beyer
% Copyright (C) 2018 Benoit Seignovert
% Copyright (C) 2024 Bojun Jia
% This work is licensed under the Creative Commons
% Attribution-Noncommercial-Share Alike 4.0 License. To view a copy
% of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/;
% or, (b) send a letter to Creative Commons, 171 2nd Street, Suite
% 300, San Francisco, California, 94105, USA.
%-------------------------------------------------------------------------------
% Class options
%
% (need to be done before the external package loading, for example because
% we need \paperwidth, \paperheight and \@ptsize to be defined before loading
% geometry and fancyhdr)
%-------------------------------------------------------------------------------
% Inherit options of article
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}
}
\ProcessOptions\relax
\LoadClass[letterpaper,10pt,twocolumn,twoside]{article}
%%---------------------------- Require Package ------------------------
\RequirePackage{authblk} % Author affiliations
\RequirePackage{graphicx} % Nice graphics, optional
\RequirePackage{siunitx} % Scientific units, optional
\RequirePackage{times}
\RequirePackage[margin=1in]{geometry} % Sets margins cleanly
\RequirePackage[small,compact]{titlesec} % To compress the section titles even more, use the
\RequirePackage{paralist} % For compressing bibliography into a paragraph
\RequirePackage{balance} % For balancing columns on the page.
\RequirePackage[
pdftex,
colorlinks=true,
urlcolor=blue,
citecolor=black,
linkcolor=black
]{hyperref} % Puts actual hyperlinks in your PDF, optional.
\RequirePackage[numbers,sort&compress]{natbib}
\RequirePackage{caption}
%%---------------------------- Global Settings ------------------------
%% Page Style to put numbers at the top.
\pagestyle{empty}
\setlength{\columnsep}{.4in}
\titlespacing{\paragraph}{.25in}{2pt}{.5em}
\titleformat{\subparagraph}[runin]{\normalfont\normalsize\itshape}{\thesubparagraph}{1em}{}
\titlespacing{\subparagraph}{.25in}{2pt}{.5em}
\sisetup{group-separator = {,}}
%% Caption setup
\captionsetup[figure]{labelsep=period}
%%---------------------------- Commands ----------------
%%
%% We need to create some commands that the LPSC template will use
% Change authblk defaults
\renewcommand\Authands{ and }
\renewcommand\AB@affilsepx{, }
% Edit maketitle command
\def\@maketitle{%
{\bfseries\MakeUppercase\@title. }%
{\AB@authlist, \AB@affillist.}%
\vskip .3in
}
\renewcommand\maketitle{
\thispagestyle{empty}
\twocolumn[\@maketitle]
}
%% Adjust spacing around figures and captions
\newcommand{\compactfigures}{
% \setlength{\floatsep}{0pt plus 2pt minus 2pt}
% \setlength{\textfloatsep}{0pt plus 2pt minus 4pt}
% \setlength{\intextsep}{0pt plus 2pt minus 2pt}
% \setlength{\abovecaptionskip}{0pt}
\setlength{\floatsep}{0.5\baselineskip plus 0.15\baselineskip minus 0.15\baselineskip}
\setlength{\textfloatsep}{0.5\baselineskip plus 0.15\baselineskip minus 0.15\baselineskip}
\setlength{\intextsep}{0.5\baselineskip plus 0.15\baselineskip minus 0.15\baselineskip}
\setlength{\abovecaptionskip}{0.25\baselineskip}
}
% Put the bibliography inline
\bibliographystyle{unsrtetal}
\renewenvironment{thebibliography}[1]{%
\let\par\relax\inparaenum[{[}1{]}]}{\endinparaenum}
\let\oldbibitem\bibitem
\renewcommand{\bibitem}[1]{\item\vphantom{\oldbibitem{#1}}}