-
Notifications
You must be signed in to change notification settings - Fork 0
/
f1000_styles.sty
executable file
·111 lines (100 loc) · 3.32 KB
/
f1000_styles.sty
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
\ProvidesPackage{f1000_styles}
% Packages
\usepackage{authblk}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{colortbl}
\usepackage[usenames,dvipsnames,table]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage[labelsep=period,justification=justified]{caption}
\usepackage{lastpage}
\usepackage{xifthen}
\usepackage{todonotes}
\usepackage[hmargin=1.8cm,vmargin=2.2cm]{geometry}
% Define the versionDate and flogo commands
\newcommand{\versionDate}{\footnotesize \textit{F1000Research} 2016 - DRAFT ARTICLE (PRE-SUBMISSION)}
\newcommand{\flogo}{\includegraphics[height=12pt]{F1000header.png}}
% Section heading styles
\usepackage[compact]{titlesec}
\titleformat*{\section}{\Large\usefont{OT1}{phv}{b}{n}\color{darkgray}}
\titleformat*{\subsection}{\large\usefont{OT1}{phv}{b}{n}\color{MidnightBlue}}
\titleformat*{\subsubsection}{\large\usefont{OT1}{phv}{b}{n}\color{MidnightBlue}}
% Section heading spacing (reduced space below headings)
\titlespacing\section{0pt}{3.5ex plus 1.2ex minus .2ex}{0ex}
\titlespacing\subsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}
\titlespacing\subsubsection{0pt}{3.25ex plus 1.2ex minus .2ex}{0ex}
% Caption style
\captionsetup{labelfont={color=red,bf},textfont={color=black,bf}}
% Table style
\definecolor{DarkKhaki}{rgb}{0.74,0.72,0.42}
\colorlet{tableheadcolor}{DarkKhaki} % Table header colour = 25% gray
\newcommand{\header}{\rowcolor{tableheadcolor}} %
\colorlet{tablerowcolor}{DarkKhaki!50} % Table row separator colour = 10% gray
\newcommand{\row}{\rowcolor{tablerowcolor}} %
\newenvironment{tabledata}[1][1]{%
\renewcommand*{\extrarowheight}{0.1cm}%
\tabular%
}{%
\endtabular
}
% Define a title note command
\newcommand\titlenote[1]{\renewcommand\@titlenote{#1}}
\newcommand\@titlenote{}
% Column separation
\setlength{\columnsep}{0.25in}
% Page margins, headers and footers
% 1 For the main body of the article
\fancypagestyle{main}{
\newgeometry{hmargin=3.3cm,vmargin=2.2cm}
\fancyheadoffset{1.5cm} % Set header width to match front pages
\fancyfootoffset{1.5cm} % Set footer width to match front pages
\setlength{\parindent}{0pt}
\setlength{\headheight}{16.5pt}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{}
\chead{}
\rhead{\versionDate}
\lfoot{}
\cfoot{}
\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
}
% 2 For the front page(s)
\fancypagestyle{front}{
\newgeometry{hmargin=1.8cm,vmargin=2.2cm}
\setlength{\parindent}{0pt}
\setlength{\headheight}{16.5pt}
\renewcommand{\footrulewidth}{1pt}
\lhead{\textsc{\flogo}}
\chead{}
\rhead{\versionDate}
\lfoot{}
\cfoot{}
\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
}
%
\renewenvironment{abstract}{%
\usefont{OT1}{phv}{m}{n}
\begin{minipage}{0.65\textwidth}
\rule{\textwidth}{1pt}\\ \textcolor{Orange}{\textbf{\abstractname}}}
{\par\noindent\rule{\textwidth}{1pt}\end{minipage}}
%
\makeatletter
\renewcommand\@maketitle{%
\begin{minipage}{0.95\textwidth}
\vskip 2em
\let\footnote\thanks
{\fontsize{20}{22}\usefont{OT1}{phv}{b}{n} \@title \par {\small{\@titlenote}} }
\vskip 1.5em
{\@author \par}
\end{minipage}
\vskip 1em \par
}
\makeatother
\renewcommand\Authfont{\fontsize{16}{18}\usefont{OT1}{phv}{b}{n}}
\renewcommand\Affilfont{\fontsize{10}{12}\usefont{OT1}{phv}{b}{n}}