Skip to content
Snippets Groups Projects
jors.cls 3.64 KiB
Newer Older
Pierre Augier's avatar
Pierre Augier committed
%% Journal of Open Research Software Latex template -- Created By Stephen Bonner and John Brennan, Durham Universtiy, UK.

\NeedsTeXFormat{LaTeX2e}
Pierre Augier's avatar
Pierre Augier committed
\ProvidesClass{jors}[2016/03/08 Journal Of Open Software Research]
Pierre Augier's avatar
Pierre Augier committed

%% Article options
\DeclareOption{12pt}{
  \PassOptionsToClass{\CurrentOption}{article}
}


\DeclareOption{sansserif}{
  \PassOptionsToPackage{\CurrentOption}{paxcommands}
}
\DeclareOption{neverindent}{
  \PassOptionsToPackage{\CurrentOption}{paxcommands}
}

%% Fallback
\DeclareOption*{
  \ClassWarning{josr}{Unknown option '\CurrentOption'}
}


\ExecuteOptions{12pt}


\ProcessOptions\relax

\LoadClass[a4paper]{article}

%% Load additional packages and commands.
\RequirePackage{xcolor}
\RequirePackage{sectsty}
\RequirePackage{enumitem}
% http://tex.stackexchange.com/questions/301669
\RequirePackage[pageanchor=false]{hyperref}

\hypersetup{
    colorlinks,
    linkcolor={red!50!black},
    citecolor={blue!50!black},
    urlcolor={blue!99!black}
}

\RequirePackage{fancyhdr}
\RequirePackage{titlesec}

%% Additional TeX/LaTeX code...

%% Remove the indentation
\newlength\tindent
\setlength{\tindent}{\parindent}
\setlength{\parindent}{0pt}
\renewcommand{\indent}{\hspace*{\tindent}}

%% Remove the page numbers
\pagenumbering{gobble}

Pierre Augier's avatar
Pierre Augier committed
%% Set the font too 13 for the titles
Pierre Augier's avatar
Pierre Augier committed
% \sectionfont{\fontsize{13}{15}\selectfont}
% pa: this is not possible...
% http://tex.stackexchange.com/questions/58087/


%% Set indentation for the lists
\setlist[description]{leftmargin=1cm,labelindent=1cm}

%% Set spacing for the section headings
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

%% Set margins
\usepackage[margin=1.2in,footskip=0.25in]{geometry}

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{listings}
\usepackage{fancyref}

Pierre Augier's avatar
Pierre Augier committed
\usepackage[finalizecache]{minted}
\usepackage{booktabs}
\usepackage{outlines}
Pierre Augier's avatar
Pierre Augier committed

Pierre Augier's avatar
Pierre Augier committed
\usepackage{natbib}
Pierre Augier's avatar
Pierre Augier committed
\usepackage{har2nat}

\usepackage{xspace}

Ashwin Vishnu's avatar
Ashwin Vishnu committed
\usepackage{etoolbox}

Pierre Augier's avatar
Pierre Augier committed
%% Set source code listings style
\lstset{basicstyle=\ttfamily, language=Python}

%% Set the header information
\pagestyle{fancy}
\definecolor{mygray}{gray}{0.6}
\renewcommand\headrule{}
\rhead{\footnotesize 3}
\rhead{\textcolor{gray}{UP JORS software Latex paper template version 0.1}}

Pierre Augier's avatar
Pierre Augier committed

\newcommand{\fluidpack}[1]{\href{http://fluid#1.readthedocs.io}{%
\codeinline{fluid#1}}}
Pierre Augier's avatar
Pierre Augier committed

% \newcommand{\codeinline}[1]{\mintinline{python}{#1}}
\newcommand{\codeinline}[1]{\texttt{#1}}

\newcommand{\fluiddyn}{\fluidpack{dyn}\xspace}

\newcommand{\Numpy}{\codeinline{Numpy}\xspace}
\newcommand{\Scipy}{\codeinline{Scipy}\xspace}
Ashwin Vishnu's avatar
Ashwin Vishnu committed
\newcommand{\pack}[1]{\codeinline{#1}\xspace}

\newcommand{\mako}{\href{http://www.makotemplates.org/}{\pack{mako}}}
Pierre Augier's avatar
Pierre Augier committed

Ashwin Vishnu's avatar
Ashwin Vishnu committed
\newcommand{\libpack}[2][]{%
  \ifstrequal{#2}{FFTW}{%
    \href{http://fftw.org}{#2}}{%
  \ifstrequal{#2}{MKL}{%
    \href{https://software.intel.com/en-us/mkl}{#2}}{%
  \ifstrequal{#2}{PFFT}{%
Ashwin Vishnu's avatar
Ashwin Vishnu committed
    \href{https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en}{#2}}{%
  \ifstrequal{#2}{P3DFFT}{%
Ashwin Vishnu's avatar
Ashwin Vishnu committed
    \href{http://p3dfft.net}{#2}}{%
  \ifstrequal{#2}{2decomp\&FFT}{%
    \href{http://www.2decomp.org}{#2}}{%
  \ifstrequal{#2}{cuFFT}{%
    \href{https://docs.nvidia.com/cuda/cufft/index.html}{#2}}{%
  \ifstrequal{#2}{clFFT}{%
    \href{https://clmathlibraries.github.io/clFFT/}{#2}}{%
  \ifstrequal{#2}{FFTPACK}{%
    \href{http://www.netlib.org/fftpack}{#2}}{%
  \ifstrempty{#1}{%
    #2
  }{%
    \href{#1}{#2}}
  }}}}}}}}\xspace  % Close the if-else-if tree above!
}
\newcommand{\p}{\partial}

% \newcommand{\annotate}[1]{\marginpar{\textcolor{red}{#1}}}

% Wikipedia-style "citation needed" macro
\newcommand{\citationneeded}[1][]{\textsuperscript{\color{blue} [citation needed: #1]}}