Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GigaScience rticle support #156

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dff0255
initially add support for GigaScience; not yet thorooughly tested; st…
eschen42 Feb 18, 2018
1dd47b8
expose more configuration to through the skeleton file header
eschen42 Feb 18, 2018
c08d44a
initial implementation complete
eschen42 Feb 20, 2018
d1bdef6
added man/gigascience_article.Rd generated by devtools::document
eschen42 Feb 20, 2018
d5a50ff
improved citet and citep explanations
eschen42 Feb 20, 2018
b020923
added tlmgr_pkg to assist setup of TexLive prior to running GigaScien…
eschen42 Feb 20, 2018
63d1438
added tlmgr_local script to install required TeX*Live packages to sup…
eschen42 Feb 22, 2018
78cb880
corrected per yihui's instructions from 2 July 2018
eschen42 Jul 22, 2018
1b109f6
merge upstream master
eschen42 Jul 23, 2018
bcbf202
devtools::test() passes after 'mkdir tests/testthat; cd tests/testtha…
eschen42 Jul 23, 2018
6604452
modifications for pull request
eschen42 Jul 29, 2018
665ea85
Merge branch 'master' into gigascience
eschen42 Nov 17, 2020
d4e6f26
Merge branch 'master' into eschen42-gigascience
cderv Nov 30, 2021
0b6856f
Use new way to create the format
cderv Nov 30, 2021
802c8db
Store function with the others
cderv Nov 30, 2021
58badb1
Merge branch 'main' into eschen42-gigascience
cderv May 5, 2023
701e1c1
Align author in DESCRIPTION
cderv May 5, 2023
b05ec78
keep new lines
cderv May 5, 2023
c558975
Missing colon in DESCRIPTION
cderv May 5, 2023
0589cb8
Merge branch 'main' into eschen42-gigascience
cderv May 5, 2023
e0d0c11
Add missing part for Pandoc in templates and reorganize order
cderv May 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ Authors@R: c(
person("Dmytro", "Perepolkin", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0001-8558-6183", github = "dmi3kno")),
person("Tom", "Palmer", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot"))
comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot")),
person("Arthur", "Eschenlauer", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0002-2882-0508"))
)
Description: A suite of custom R Markdown formats and templates for
authoring journal articles and conference submissions.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export(ctex)
export(ctex_article)
export(elsevier_article)
export(frontiers_article)
export(gigascience_article)
export(glossa_article)
export(ieee_article)
export(ims_article)
Expand Down
15 changes: 15 additions & 0 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ frontiers_article <- function(..., keep_tex = TRUE) {
pdf_document_format("frontiers", keep_tex = keep_tex, ...)
}

#' @section `gigascience_article`: Format for creating submissions to the
#' GigaScience journal. Adapted from GigaScience Overleaf template
#' <https://www.overleaf.com/latex/templates/template-for-gigascience-journal-manuscript-submissions/shgtrssvbjhs>.
#'
#' @export
#' @rdname article
gigascience_article <- function(keep_tex = TRUE,
md_extensions = c("-autolink_bare_uris"),
...) {
pdf_document_format("gigascience",
keep_tex = keep_tex,
md_extensions = md_extensions,
...)
}


#' @section `glossa_article`: Format for creating submissions to Glossa: a
#' journal of general linguistics. Author Guidelines are available on
Expand Down
143 changes: 143 additions & 0 deletions inst/rmarkdown/templates/gigascience/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Please note that whilst this template provides a
% preview of the typeset manuscript for submission, it
% will not necessarily be the final publication layout.
%
\documentclass[$paper$,$reftype$]{$documentclass$}

% declare highlighting-macros if any
$if(highlighting-macros)$
$highlighting-macros$
$endif$

%%% declare packages to be used
\usepackage{forarray}
\usepackage{xstring}
\usepackage{graphicx}
\usepackage{siunitx}

% tightlist command for lists without linebreak
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

$if(tables)$
% From pandoc table feature
\usepackage{longtable,booktabs,array}
$if(multirow)$
\usepackage{multirow}
$endif$
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
$endif$

$if(csl-refs)$
% Pandoc citation processing
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
% for Pandoc 2.8 to 2.10.1
\newenvironment{cslreferences}%
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
% For Pandoc 2.11+
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\let\oldpar\par
\def\par{\hangindent=\cslhangindent\oldpar}
\fi
% set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit}
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$

% include header-includes if any
$for(header-includes)$
$header-includes$
$endfor$


%%% Flushend: You can add this package to automatically balance the final page, but if things go awry (e.g. section contents appearing out-of-order or entire blocks or paragraphs are coloured), remove it!
% \usepackage{flushend}



\title{$title$}

%%% Authors
$for(author)$ \author[$for(author.affiliation)$$author.affiliation$$sep$,$endfor$$for(author.note)$,\authfn{$author.note$}$endfor$]{$author.name$} $sep$
$endfor$

%%% Author Affiliations
$for(affiliation)$ \affil[$affiliation.id$]{$affiliation.name$$if(affiliation.address)$, $affiliation.address$$endif$}
$endfor$

%%% Use the \authfn to add symbols for additional footnotes, if any. 1 is reserved for correspondence emails; then continuing with 2 etc for contributions.
%%% Author Notes
$for(authnote)$\authnote{\authfn{$authnote.id$}$authnote.note$}$sep$
$endfor$


%%% Paper category
\papercat{$papercat$}

%%% "Short" author for running page header
\runningauthor{$runningauthor$}

%%% Should only be set by an editor
\jvolume{00}
\jnumber{0}
\jyear{2018}

\begin{document}
\begin{frontmatter}
\maketitle
\begin{abstract}
$abstract$
\end{abstract}

\begin{keywords}
$for(keywords)$$keywords$$sep$; $endfor$
\end{keywords}
\end{frontmatter}

$for(include-before)$
$include-before$

$endfor$

\begin{keypoints*}
\begin{itemize}
$for(keypoints)$\item{$keypoints$}$sep$
$endfor$
\end{itemize}
\end{keypoints*}

$body$


$for(include-after)$
$include-after$

$endfor$
%%% The document ends here
\end{document}
Binary file not shown.
Loading