-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharxiv.sty
More file actions
95 lines (86 loc) · 4.05 KB
/
Copy patharxiv.sty
File metadata and controls
95 lines (86 loc) · 4.05 KB
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
% arxiv.sty — a clean, professional single-column preprint style.
% Hand-authored for this paper (not derived from any third-party template).
% Aesthetic: Palatino body + matching math, Helvetica-clone sans-serif
% headings, a refined centered title block, and a slim ruled running header.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arxiv}[2026/06/15 Clean professional preprint style]
% --- Page geometry: generous, readable single column ------------------------
\RequirePackage[letterpaper,top=1in,bottom=1in,left=1.15in,right=1.15in,headheight=14pt]{geometry}
% --- Fonts: Palatino text + math, Helvetica sans for headings ---------------
\RequirePackage{mathpazo} % Palatino + matching math
\RequirePackage[scaled=0.90]{helvet} % sans family for headings/labels
\RequirePackage{microtype}
\linespread{1.05} % a touch more leading suits Palatino
% --- Color palette ----------------------------------------------------------
\RequirePackage{xcolor}
\definecolor{arxivink}{HTML}{1A1A2E} % near-black headings
\definecolor{arxivaccent}{HTML}{34507F} % muted slate-blue (links, header)
\definecolor{arxivrule}{HTML}{C2C8D6} % light rule
% --- Section headings: sans-serif, bold -------------------------------------
\RequirePackage{titlesec}
\titleformat{\section}
{\color{arxivink}\sffamily\large\bfseries}{\thesection}{0.6em}{}
\titleformat{\subsection}
{\color{arxivink}\sffamily\normalsize\bfseries}{\thesubsection}{0.5em}{}
\titleformat{\subsubsection}
{\color{arxivink}\sffamily\normalsize\bfseries\itshape}{\thesubsubsection}{0.5em}{}
\titlespacing*{\section}{0pt}{1.5\baselineskip}{0.5\baselineskip}
\titlespacing*{\subsection}{0pt}{1.0\baselineskip}{0.35\baselineskip}
\titlespacing*{\subsubsection}{0pt}{0.8\baselineskip}{0.3\baselineskip}
% --- Captions ---------------------------------------------------------------
\RequirePackage[font=small,labelfont={bf,sf},labelsep=period]{caption}
% --- Floats: keep figures/tables next to their text, avoid float-only pages --
\RequirePackage{float} % enables the [H] "place exactly here" specifier
\setlength{\textfloatsep}{12pt plus 3pt minus 3pt}
\setlength{\intextsep}{12pt plus 3pt minus 3pt}
\setlength{\floatsep}{10pt plus 2pt minus 2pt}
% Discourage LaTeX from deferring floats onto their own pages.
\renewcommand{\topfraction}{0.92}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.06}
\renewcommand{\floatpagefraction}{0.80}
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{3}
\setcounter{totalnumber}{8}
% --- Running header / footer ------------------------------------------------
\RequirePackage{fancyhdr}
\newcommand{\@runningtitle}{}
\newcommand{\runningtitle}[1]{\renewcommand{\@runningtitle}{#1}}
\fancypagestyle{arxivstyle}{%
\fancyhf{}%
\renewcommand{\headrulewidth}{0.4pt}%
\renewcommand{\headrule}{{\color{arxivrule}\hrule height \headrulewidth}}%
\fancyhead[L]{\footnotesize\sffamily\color{arxivaccent}\@runningtitle}%
\fancyhead[R]{\footnotesize\sffamily\color{arxivaccent}\thepage}%
}
\pagestyle{arxivstyle}
% First page: no header rule, page number centered at the foot.
\fancypagestyle{plain}{%
\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}%
\fancyfoot[C]{\footnotesize\sffamily\color{arxivaccent}\thepage}%
}
% --- Title block ------------------------------------------------------------
\renewcommand{\maketitle}{%
\thispagestyle{plain}%
\begin{center}%
{\color{arxivink}\bfseries\fontsize{20}{24}\selectfont \@title\par}%
\vskip 1.1em%
{\large\@author\par}%
\ifx\@date\@empty\else\vskip 0.5em{\small\@date\par}\fi%
\end{center}%
\vskip 0.7em%
{\color{arxivrule}\hrule height 0.8pt}%
\vskip 1.5em%
}
% --- Abstract: centred heading, narrower measure, ruled-off ------------------
\renewenvironment{abstract}{%
\begin{center}{\sffamily\bfseries\color{arxivink}\normalsize Abstract}\end{center}%
\vspace{-0.2em}%
\begin{list}{}{%
\setlength{\leftmargin}{0.45in}\setlength{\rightmargin}{0.45in}%
}\item\relax\small\noindent\ignorespaces%
}{%
\end{list}%
\vskip 0.9em{\color{arxivrule}\hrule height 0.4pt}\vskip 1.2em%
}