%% This file is LaTeX class for submission
%% to Reports on Geodesy and Geoinformatics
%% this class follows author guidelines specified at
%% http://www.reports.gik.pw.edu.pl
%% and mimic the official Word template
%% DO NOT edit this file directly
%% put all your additional settings
%% inside your .tex file(s) submitted to editors.
%% If you believe that there is a bug in this class
%% or you encountered any incompatibilities
%% or other technical issues
%% or you need any fancy setting which cannot be achieved
%% without touching this class file
%% please contact
%% marcin.rajner@pw.edu.pl or
%% marcin.rajner@chalmers.se
%% up to date and development version of rgg.cls file
%% can be found on
%% http://www.grat.gik.pw.edu.pl/rgg/
%% Created: 2015-11-16 by Marcin Rajner
%% Version: v1.4-3-g61cbbb4
%% Date: 2018-03-08 07:47:54 +0100
\NeedsTeXFormat { LaTeX2e}
\ProvidesClass { rgg} [2018/03/08]
\def\rggversion { v1.4}
%% use standard article rules by default
%% with 12 point font size
\LoadClass [12pt,twoside] { article}
%% American language rules for whole document
\RequirePackage [american] { babel}
%% For non ascii characters
%% non-english names etc.
\RequirePackage [T1] { fontenc}
\parskip =0em
\parindent =1.5em
%% process class options
\RequirePackage { kvoptions}
\SetupKeyvalOptions {
family=rgg,
prefix=rgg@,
}
\DeclareStringOption [] { startpage}
\DeclareStringOption [] { volume}
\DeclareStringOption [1] { number}
\DeclareStringOption [] { doi}
\DeclareStringOption [] { year}
\DeclareStringOption [] { type}
\DeclareStringOption [] { received}
\DeclareStringOption [] { accepted}
\DeclareBoolOption { review}
\DeclareBoolOption [false] { logodg}
\DeclareBoolOption [false] { biblatex}
\DeclareBoolOption [true] { hyperref}
\DeclareBoolOption [true] { headers}
\DeclareStringOption [2391-8152] { eISNN}
\DeclareStringOption [2391-8365] { ISSN}
\ProcessKeyvalOptions*
\ifx\rgg @startpage\empty\else
\setcounter { page}{ \rgg @startpage}
\fi
\ifrgg @review
\RequirePackage { lineno}
\linenumbers
\linespread { 2}
\fi
%% use a4 paper size with all margins set to 2.5 cm
\RequirePackage
[
a4paper,
margin = 2.5cm,
% includehead,
headheight=1cm,
]
{ geometry}
%% font selection according to engine used in compilation
\RequirePackage { ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
\ifxetexorluatex
%% if you compile document using xelatex or lualatex you can
%% directly access system fonts
%% while Arial is not free font and could not be installed
%% on every machine you can use linux substitute named
%% Liberation Sans
%% if you have Arial installed you can uncomment
%% line \setmainfont{Arial}
\RequirePackage { fontspec}
\setmainfont { Liberation Sans}
% \setmainfont{Arial}
\else
%% Unicode support for (pdf)latex
\RequirePackage [utf8] { inputenc}
\RequirePackage [scaled] { helvet}
\fi
%% use sans-serif font for whole document
\renewcommand { \familydefault }{ \sfdefault }
\RequirePackage { sansmath} \sansmath
\def\titlepageheading {
%% Crude method for uneven header separator
%% add logo to title page
\noindent\parbox [t] { \textwidth }{ %
\ifrgg @logodg
\IfFileExists { logo_ dg.png}{ %
\includegraphics [height=1.3cm] { logo_ dg}}
{ \vskip 1.3cm}
\fi
}
\par
\kern 2pt
\ifrgg @headers
\hbox to \textwidth { \headerfirstpage\hfill\doiheader }
\kern 2pt
\hrule height 0.4pt
\thispagestyle { plain} %
\else
\thispagestyle { empty} %
\hbox to \textwidth { \phantom { \headerfirstpage\hfill\doiheader }}
\kern 2.4pt
\fi
\par
\vskip 4em
\noindent\raisebox { 0pt} [0pt][0pt]{ %
%% arttype takes precedence over `type` option
%% and is obsolete method provided for
%% backward compatibility
\ifdefined\arttype %
\fbox { \arttype }
\else
\ifx\rgg @type\empty\else
\fbox { \vphantom {} \rgg @type}
\fi
\fi
} \par
\noindent { \small %
Received: \rgg @received
/
Accepted: \rgg @accepted
}
\vskip 1.5em
}
%% maketitle command style
\renewcommand\maketitle {
\titlepageheading
% \parbox{14cm}{%
%% title bold and centred and all in upper case
\begin{center}
{ \bfseries\large\MakeUppercase { \@ title} \par }
\end{center}
% }
\begin{center}
{ \bfseries\@ author} \\
\vspace* { 0.5em}
{ \@ affiliation}
\end{center}
%% no floats on title page
\suppressfloats
}
%% float environments
\RequirePackage { floatrow}
\floatsetup [table] {
capposition=top,
}
%% smaller font for tables
\floatsetup [table] { font=small}
\RequirePackage { caption}
\captionsetup
{
labelsep=period,
labelfont={ bf,small} ,
font=small,
tablename=Tab.,
figurename=Fig.,
}
\RequirePackage { booktabs}
%% affiliation environment
\newcommand\affiliation [1] { \gdef\@ affiliation{ #1}}
\gdef\@ affiliation{}
\newcommand { \nextaffiliation }{ \leavevmode\vskip 0.5em}
%% author and short version of atuhor to running header
\renewcommand\author { \@ ifnextchar [{ \@ authortwo}{ \@ authorone}} %}
\def\@ authortwo[#1]#2{ \gdef\@ author{ #2} \gdef\@ shortauthor{ #1}}
\def\@ authorone#1{ \gdef\@ author{ #1} %}
\begingroup\def\and { and} \gdef\@ shortauthor{ #1} \endgroup }
\gdef\@ author{ \mbox {}}
%% same for title
\renewcommand\title { \@ ifnextchar [{ \@ titletwo}{ \@ titleone}} %}
\def\@ titletwo[#1]#2{ \gdef\@ title{ #2} \gdef\@ shorttitle{ #1}}
\def\@ titleone#1{ \gdef\@ title{ #1} %}
\begingroup\def\and { and} \gdef\@ shorttitle{ #1} \endgroup }
\gdef\@ title{ \mbox {}}
% redefinition of section and subsection environment
\renewcommand { \@ seccntformat} [1]{ \csname the#1\endcsname .\quad }
\renewcommand\section { %
\@ startsection { section}{ 1}{ \z @} %
{ -1em \@ plus -1ex \@ minus -.2ex} %
{ 0.5em \@ plus.2ex} %
{ \normalfont\bfseries } %
}
\renewcommand\subsection { \@ startsection { subsection}{ 1}{ \z @} %
{ -0.6em \@ plus -1ex \@ minus -.2ex} %
{ 0.3em \@ plus.2ex} %
{ \normalfont\bfseries } %
} %}
%% apply ``better'' microtypography
\RequirePackage { microtype}
%% enhance math mode
\RequirePackage { amsmath}
\RequirePackage { amssymb}
%% include graphics
\RequirePackage { graphicx}
%% abstract and keywords
\newcommand\keywords [1] { \long\gdef\@ keywords{ #1}}
\gdef\@ keywords{}
\renewenvironment { abstract}
{
\setlength { \leftmargin }{ 5em} %
\list {}{ \setlength { \rightmargin }{ \leftmargin }} %
\item\relax { \bfseries \abstractname } \newline
\parskip =0em
\parindent =1.5em
\itshape
}{ \upshape\newline\vskip -0.5em
\noindent\textbf { Keywords:}
\@ keywords
\vspace { 0.6em}
\endlist }
\RequirePackage { lastpage}
\RequirePackage { fancyhdr}
\pagestyle { fancy}
\fancyhead {}
\fancyfoot {}
\newcommand { \rgg }{ Reports on Geodesy and Geoinformatics}
\def\headerfirstpage { %
\small
\textit { \rgg }
vol.\,\rgg @volume/\rgg @year; %{
pp.\, %
\ifx\rgg @startpage\empty
\ifdefined\firstpage
\firstpage
\else
\thepage %
\fi
\else
\rgg @startpage
\fi %
-%
\ifdefined\lastpage
\lastpage %
\else
\pageref { LastPage} %
\fi
}
\def\doiheader { \textsc { doi:} \rgg @doi}
%%%%%%%%%% TODO: DISCUSS WITH EDITORS %%%%%%%%%%%%%%%%
% \RequirePackage{changepage}
% \strictpagecheck
% \checkoddpage
% \ifoddpage
\ifrgg @headers
\fancyfoot [C] { \small\thepage }
\renewcommand { \headrulewidth }{ 0.4pt}
\renewcommand { \footrulewidth }{ 0.4pt}
\fancyhead [LO] { \small\headerfirstpage }
\fancyhead [RO] { \small\doiheader }
\fancyhead [LE] { %
\ifdefined\@ shortauthor\ifdefined\@ shorttitle
\textit { \def\emph {} \small\@ shortauthor:\ \@ shorttitle}
\fi\fi
}
\fancyhead [RE] {}
\fancypagestyle { plain}{ %
\renewcommand { \headrulewidth }{ 0pt}
\fancyhead {}
}
\else
\renewcommand { \headrulewidth }{ 0.0pt}
\renewcommand { \footrulewidth }{ 0.0pt}
\fi
%% Bibliography clickable doi
\ifrgg @hyperref
\RequirePackage [hidelinks,pdfusetitle] { hyperref}
\RequirePackage { doi}
\renewcommand { \doitext }{}
\fi
%% acknowledgement
\newcommand\acknowledgement [1] { %
\section* { Acknowledgement}
{ \small #1} %
}
%% email
\newcommand\email [1] { \href { mailto:#1}{ \texttt { #1}}}
\RequirePackage { array}
\newcommand\disappearingrule { %
\par
\vskip 5pt
\leaders\vrule width 0.5\textwidth\vskip 0.4pt
\nointerlineskip
\vskip 5pt\nobreak
}
%% authornote
\RequirePackage { array,longtable}
\newcommand { \authornote } [1]{ %
\thisfloatsetup { font=normalsize}
\disappearingrule
{ %
\parindent =0em
\leftskip =0.15\linewidth %}
\rlap { \textbf { Authors:}}
\vskip -\baselineskip
{ #1}
\par
}
}
%% remove unnecessary space in lists
\usepackage { enumitem}
\setlist { nosep}
\usepackage [all] { nowidow}
%% avoid unnecessary float pages
\renewcommand { \floatpagefraction }{ 0.75}
\ifrgg @biblatex
%%bibliography
\RequirePackage
[
backend = biber,
style = apa,
uniquename = false,
uniquelist = minyear,
maxbibnames = 99,
labeldate = true,
apamaxprtauth = 99,
]
{ biblatex}
\DeclareLanguageMapping { american}{ american-apa}
\urlstyle { tt}
\RequirePackage { xpatch}
\xpatchnameformat { labelname}
{ \ifciteseen }{ \ifnumcomp { \value { listtotal}}{ >}{ \value { maxnames}}}{}{}
\newcommand { \bibtextobiblatex }{
\let\oldcite =\cite
\let\citeNP =\oldcite\relax
\let\cite =\parencite\relax
\let\citeA =\textcite\relax
\RenewDocumentCommand { \bibliography }{ m}{
\printbibliography
}
}
%% keep title captialics in bibliography as
%% they where given by authors
\DeclareFieldFormat { titlecase}{ %
{ #1}
}
\DeclareFieldFormat { apacase}{ %
{ #1}
}
\else
%% Use the APA format as a style of citation and reference list
%% (see Guidelines for APA Citation Style with examples)
\bibliographystyle { apacite}
%% force using apa style for bibliography
\RequirePackage [apaciteclassic] { apacite}
%% slightly modified APA style to meet `rgg` standards
%% i.e. give et al. if at least 3 authors
%% (originall APA truncate names after 5 authors)
\AtBeginDocument { %
\let\cite =\shortcite
\let\citeA =\shortciteA
\let\citeNP =\shortciteNP
}
\fi
%% use rgg appropriate bibitem spacing
% \setlength{\bibitemsep}{1\baselineskip}
\endinput