One option using the tcolorbox
package to define a color box with a vertical shading; since the class uses titlesec
to format the titles, the necessary redefinition for sections is quite simple
\titleformat{\section}
{\large\sffamily\bfseries\filcenter}
{}
{0em}
{\begin{mybox}[center upper,colupper=color1]\arabic{section}.~#1\end{mybox}}
[]
\titleformat{name=\section,numberless}
{\large\sffamily\bfseries\filcenter}
{}
{0em}
{\begin{mybox}[center upper,colupper=color1]#1\end{mybox}}
[]
where mybox
is the newly defined box; a redefinition of \maketitle
is also required to use the shading for the box.
Change the colors for the shading (inside the \fill
in the definition of mybox
) according to your liking:
\documentclass[fleqn,10pt]{SelfArx}
\usepackage[nopar]{lipsum}
\usepackage[many]{tcolorbox}
\setlength{\columnsep}{0.55cm}
\setlength{\fboxrule}{0.75pt}
\definecolor{color1}{RGB}{0,0,90} % Color of the article title and sections
\definecolor{color2}{RGB}{0,20,20} % Color of the boxes behind the abstract and headings
\usepackage{hyperref}
\hypersetup{hidelinks,colorlinks,breaklinks=true,urlcolor=color2,citecolor=color1,linkcolor=color1,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\JournalInfo{Journal, Vol. XXI, No. 1, 1-5, 2013}
\Archive{Additional note}
\PaperTitle{Article Title}
\Authors{John Smith\textsuperscript{1}*, James Smith\textsuperscript{2}}
\affiliation{\textsuperscript{1}\textit{Department of Biology, University of Examples, London, United Kingdom}}
\affiliation{\textsuperscript{2}\textit{Department of Chemistry, University of Examples, London, United Kingdom}}
\affiliation{*\textbf{Corresponding author}: [email protected]}
\Keywords{Keyword1 --- Keyword2 --- Keyword3}
\newcommand{\keywordname}{Keywords}
\Abstract{\lipsum[1]}
\newtcolorbox{mybox}[1][]{
freelance,
frame code={},
interior code={
\fill[top color=color2!45,bottom color=color2!5,middle color=color2!15]
(interior.north west) rectangle (interior.south east);
}
outer arc=0pt,
arc=0pt,
boxrule=0pt,
nobeforeafter,
left=0pt,
right=0pt,
top=0pt,bottom=0pt,
#1
}
\titleformat{\section}
{\large\sffamily\bfseries\filcenter}
{}
{0em}
{\begin{mybox}[center upper,colupper=color1]\arabic{section}.~#1\end{mybox}}
[]
\titleformat{name=\section,numberless}
{\large\sffamily\bfseries\filcenter}
{}
{0em}
{\begin{mybox}[center upper,colupper=color1]#1\end{mybox}}
[]
\makeatletter
\renewcommand{\@maketitle}{%
\twocolumn[{%
\thispagestyle{empty}%
\vskip-36pt%
{\raggedleft\small\sffamily\bfseries\@JournalInfo\\\@Archive\par}%
\vskip20pt%
{\raggedright\color{color1}\sffamily\bfseries\fontsize{20}{25}\selectfont \@PaperTitle\par}%
\vskip10pt%
{\raggedright\color{color1}\sffamily\fontsize{12}{16}\selectfont \@Authors\par}%
\vskip18pt%
\fcolorbox{color1}{white}{%
\parbox{\textwidth-2\fboxsep-2\fboxrule}{\centering%
\begin{mybox}
\ifx\@Keywords\@empty%
\sffamily\textbf{\abstractname}\\\@Abstract%
\else%
\sffamily\textbf{\abstractname}\\\@Abstract\\[4pt]%
\textbf{\keywordname}\\\@Keywords%
\fi%
\end{mybox}
\vskip4pt%
\begingroup%
\raggedright\sffamily\small%
\footnotesize\@affiliation\par%
\endgroup%%
}%
}%
\vskip25pt%
}]%
}%
\makeatother
\begin{document}
\flushbottom
\maketitle
%\tableofcontents
%\thispagestyle{empty}
\section*{Introduction}
%\addcontentsline{toc}{section}{Introduction}
\lipsum[1-3]
and some mathematics $\cos\pi=-1$ and $\alpha$ in the text\footnote{And some mathematics $\cos\pi=-1$ and $\alpha$ in the text.}.
\section{Methods}
\lipsum[4]
\end{document}

tikz
tcolorbox
package. And welcome to TeX.SX!\colorbox
commands intotcolorbox
environments, which accept TikZ drawing commands as styling options. Refer to Section 7.1 of the manual, particularly the/tcb/interior style
key.