forked from vivekJax/KumarLab-LatexTemplate-light
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjacksonlab.sty
More file actions
123 lines (110 loc) · 4.45 KB
/
Copy pathjacksonlab.sty
File metadata and controls
123 lines (110 loc) · 4.45 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
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
% Jackson Laboratory Style File
% Copyright (c) 2025 The Jackson Laboratory. All rights reserved.
% Created by: Kumar Lab, The Jackson Laboratory
% Licensed under Proprietary License (see LICENSE)
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jacksonlab}[2025/04/12 Jackson Laboratory Paper Style — Light]
% Package options
\newcommand{\bodyfontchoice}{garamond}% default
\DeclareOption{garamond}{\renewcommand{\bodyfontchoice}{garamond}}
\DeclareOption{sourcesans}{\renewcommand{\bodyfontchoice}{sourcesans}}
\DeclareOption{twocolumn}{\PassOptionsToClass{twocolumn}{article}}
\DeclareOption{onecolumn}{\PassOptionsToClass{onecolumn}{article}}
\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}}
\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}}
\DeclareOption{12pt}{\PassOptionsToClass{12pt}{article}}
\ProcessOptions\relax
% Required packages
\RequirePackage{fontspec}
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{graphicx}
\RequirePackage[hyphens]{url}
\RequirePackage{cite}
\RequirePackage{geometry}
\RequirePackage{booktabs}
\RequirePackage{hyperref}
\RequirePackage{doi}
\RequirePackage{fancyhdr}
\RequirePackage{titlesec}
\RequirePackage{enumitem}
\RequirePackage{multirow}
\RequirePackage{array}
\RequirePackage{subcaption}
\RequirePackage{caption}
\RequirePackage[table]{xcolor}
\RequirePackage[most]{tcolorbox}
% Page setup
\geometry{letterpaper, margin=1in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt}
% Apply chosen body font
\def\garamondfont{garamond}
\edef\currentfont{\bodyfontchoice}
\ifx\currentfont\garamondfont
% EB Garamond — classic humanist serif (cross-platform, ships with TeX Live)
\setmainfont{EBGaramond-Regular.otf}[
BoldFont=EBGaramond-Bold.otf,
ItalicFont=EBGaramond-Italic.otf,
BoldItalicFont=EBGaramond-BoldItalic.otf
]
% Captions in EB Garamond at 9pt
\newfontfamily\captionfontfamily{EBGaramond-Regular.otf}[
BoldFont=EBGaramond-Bold.otf,
ItalicFont=EBGaramond-Italic.otf,
BoldItalicFont=EBGaramond-BoldItalic.otf
]
\global\let\captionfontfamily\captionfontfamily
\DeclareCaptionFont{captionfont9}{\fontsize{9}{11}\selectfont\captionfontfamily}
\captionsetup{font=captionfont9,labelfont=bf}
\else
% Source Sans Pro — modern humanist sans-serif
% Ships with TeX Live; found via kpathsea, no hardcoded path needed
\setmainfont{SourceSansPro-Regular.otf}[
BoldFont=SourceSansPro-Semibold.otf,
ItalicFont=SourceSansPro-RegularIt.otf,
BoldItalicFont=SourceSansPro-SemiboldIt.otf
]
\fi
% TeX Gyre Heros for all headers, titles, and UI elements
% Helvetica clone — ships with every TeX Live installation
% Declared after body font to ensure it is not overridden
\setsansfont{texgyreheros-regular.otf}[
BoldFont=texgyreheros-bold.otf,
ItalicFont=texgyreheros-italic.otf,
BoldItalicFont=texgyreheros-bolditalic.otf
]
\AtBeginDocument{\rmfamily}
% Font commands
\newcommand{\titlefont}{\fontsize{20}{28}\selectfont\bfseries\sffamily}
\newcommand{\titletext}[2]{{\titlefont\raggedright #1 \\[0.1in] #2}}
\newcommand{\authorfont}{\fontsize{10}{12}\selectfont\bfseries\sffamily}
\newcommand{\affiliationfont}{\fontsize{10}{12}\selectfont\sffamily}
\newcommand{\abstractheadingfont}{\fontsize{10}{12}\selectfont\bfseries\sffamily}
\newcommand{\abstractfont}{\fontsize{9}{11}\selectfont\sffamily\linespread{1.22}\selectfont}
\newcommand{\metadatalabelfont}{\fontsize{8}{10}\selectfont\bfseries\sffamily}
\newcommand{\metadatatextfont}{\fontsize{8}{10}\selectfont\sffamily}
\newcommand{\sectionfont}{\fontsize{16}{18}\selectfont\bfseries\sffamily}
\newcommand{\subsectionfont}{\fontsize{14}{16}\selectfont\bfseries\sffamily}
% Title page box
\newtcolorbox{titlebox}{
colback=gray!10, colframe=gray!10, boxrule=0pt, arc=8pt,
left=20pt, right=20pt, top=20pt, bottom=20pt,
width=\textwidth
}
% Table formatting
\newlength{\mytablewidth}
\setlength{\mytablewidth}{\dimexpr\textwidth-12pt\relax}
\newcommand{\gr}{\rowcolor{gray!15}}
\newcolumntype{L}[1]{>{\hspace{2.5pt}\setlength{\hangindent}{2.5pt}\setlength{\hangafter}{1}\raggedright\arraybackslash}m{#1}<{\hspace{2.5pt}}}
% Section formatting
\titleformat{\section}{\sectionfont}{\thesection}{1em}{}
\titleformat{\subsection}[hang]{\subsectionfont}{\thesubsection}{1em}{\raggedright}
\titleformat{\subsubsection}{\small\bfseries\sffamily}{\thesubsubsection}{1em}{}
% Hyperlink setup
\hypersetup{
colorlinks=true,
linkcolor=blue,
urlcolor=blue,
citecolor=blue
}
\endinput