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

Adding Taylor & Francis Journal Template #218

Merged
merged 32 commits into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7d27bee
Merge pull request #4 from rstudio/master
dleutnant Aug 31, 2018
33793f7
Merge pull request #5 from rstudio/master
dleutnant Oct 10, 2018
5e71c6f
WIP: TF template
dleutnant Oct 10, 2018
4acf3da
still WIP
dleutnant Jan 5, 2019
69c476b
typo
dleutnant Jan 5, 2019
0d4cb81
Merge remote-tracking branch 'upstream/master'
dleutnant Jan 5, 2019
ac53ad0
update news
dleutnant Jan 5, 2019
812a5d2
Update template.tex
dleutnant Jan 18, 2019
f043896
minimize bib file
dleutnant Apr 8, 2019
52e21f6
fix
dleutnant Apr 8, 2019
0ef0af9
remove file
dleutnant Apr 8, 2019
6f608d5
figures are generated on the fly
dleutnant Apr 8, 2019
ee0160c
use of dummy string (it's not evaluated)
dleutnant Apr 8, 2019
65a8b4f
remove unused eps files
dleutnant Apr 8, 2019
0c2672e
sync with upstream
dleutnant Apr 8, 2019
13850ba
harmonize tf article with pdf_document_format wrapper
dleutnant Apr 8, 2019
064a260
adding tf docs
dleutnant Apr 8, 2019
9140406
Update README
dleutnant Apr 8, 2019
0b9d679
Update NEWS.md
dleutnant Apr 8, 2019
d20b496
Merge branch 'master' into tf_template
dleutnant Apr 8, 2019
5afdc8d
Update R/article.R
yihui Apr 11, 2019
ebe66e5
Update R/article.R
yihui Apr 11, 2019
a834f56
Update inst/rmarkdown/templates/tf_article/skeleton/skeleton.Rmd
yihui Apr 11, 2019
4ee4e06
substitute latex \texttt{} with markdown ``
dleutnant Apr 11, 2019
92abe18
substitute latex \emph{} with markdown _ _
dleutnant Apr 11, 2019
c822161
substitute latex \verb"" with markdown ``
dleutnant Apr 11, 2019
bf33a2b
substitute latex \itemize with markdown *
dleutnant Apr 11, 2019
9140bab
substitute latex ˙\verbatim with markdown ```
dleutnant Apr 11, 2019
1c0b01e
substitute latex ˙\paragraph with markdown ####
dleutnant Apr 11, 2019
88262fa
substitute latex \footnote with markdown ^[]
dleutnant Apr 11, 2019
bb040bd
Update R/article.R
yihui Apr 11, 2019
b98f967
Update inst/rmarkdown/templates/tf_article/skeleton/skeleton.Rmd
yihui Apr 11, 2019
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 @@ -25,8 +25,9 @@ Authors@R: c(
person("Thierry", "Onkelinx", role = c("aut", "cph"), email = "thierry.onkelinx@inbo.be"),
person("Alessandro", "Gasparini", role = c("aut", "cph"), email = "ag475@leicester.ac.uk"),
person("Marc-Andre", "Desautels", role = c("aut", "cph"), email = "marc-andre.desautels@cstjean.qc.ca"),
person("Dominik", "Leutnant", role = c("aut", "cph"), email = "leutnant@fh-muenster.de"),
person("Dominik", "Leutnant", role = c("aut", "cph"), email = "leutnant@fh-muenster.de", comment = c(ORCID = "0000-0003-3293-2315")),
person(family = "MDPI", role = c("aut", "cph")),
person(family = "Taylor and Francis", role = c("aut", "cph")),
person("Oğuzhan", "Öğreden", role = c("aut"), comment = c(ORCID = "0000-0002-9949-3348")),
person("Dalton", "Hance", role = c("aut"), email = "dhance@usgs.gov"),
person("Daniel", "Nüst", role = c("aut", "cph"), email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export(rss_article)
export(sage_article)
export(sim_article)
export(springer_article)
export(tf_article)
importFrom(rmarkdown,includes_to_pandoc_args)
importFrom(rmarkdown,knitr_options)
importFrom(rmarkdown,output_format)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rticles 0.8
---------------------------------------------------------------------


- Added the Taylor & Francis journal template (@dleutnant, #218)

rticles 0.7
---------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,13 @@ springer_article <- function(..., keep_tex = TRUE, citation_package = 'none'){
"springer_article", keep_tex = keep_tex, citation_package = citation_package, ...
)
}

#' @section \code{tf_article}: Format for creating submissions to a Taylor & Francis journal. Adapted from
#' \url{http://www.tandf.co.uk/journals/authors/InteractCADLaTeX.zip}.
#' @export
#' @rdname article
tf_article <- function(..., keep_tex = TRUE, citation_package = 'natbib') {
pdf_document_format(
"tf_article", keep_tex = keep_tex, citation_package = citation_package, ...
)
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown

- [Frontiers](https://www.frontiersin.org/) articles

- [Taylor & Francis](http://www.tandf.co.uk/) articles

Under the hood, LaTeX templates are used to ensure that documents conform precisely to submission standards. At the same time, composition and formatting can be done using lightweight [markdown](https://rmarkdown.rstudio.com/authoring_basics.html) syntax, and R code and its output can be seamlessly included using [knitr](https://yihui.name/knitr/).

Using **rticles** requires the prerequisites described below. You can get most of these automatically by installing the latest release of RStudio (instructions for using **rticles** without RStudio are also provided).
Expand Down
77 changes: 77 additions & 0 deletions inst/rmarkdown/templates/tf_article/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
% interactcadsample.tex
% v1.03 - April 2017

\documentclass[]{interact}

\usepackage{epstopdf}% To incorporate .eps illustrations using PDFLaTeX, etc.
\usepackage{subfigure}% Support for small, `sub' figures and tables
%\usepackage[nolists,tablesfirst]{endfloat}% To `separate' figures and tables from text if required

\usepackage{natbib}% Citation support using natbib.sty
\bibpunct[, ]{(}{)}{;}{a}{}{,}% Citation support using natbib.sty
\renewcommand\bibfont{\fontsize{10}{12}\selectfont}% Bibliography support using natbib.sty

\theoremstyle{plain}% Theorem-like structures provided by amsthm.sty
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem{notation}{Notation}

% see https://stackoverflow.com/a/47122900
$if(highlighting-macros)$
$highlighting-macros$
$endif$

$if(header-includes)$
$header-includes$
$endif$

\begin{document}

\articletype{$type$}

\title{$title$}


\author{\name{$for(author)$$author.name$$$^{$author.affil$}$$$sep$, $endfor$}
\affil{$for(affiliation)$$$^{$affiliation.num$}$$$affiliation.address$$sep$; $endfor$}
}

\thanks{CONTACT $for(author)$$author.name$. Email: $author.email$$sep$, $endfor$}

\maketitle

$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$

$if(keywords)$
\begin{keywords}
$keywords$
\end{keywords}
$endif$

$body$

$if(bibliography)$
\bibliographystyle{tfcad}
\bibliography{$bibliography$}
$endif$


$if(appendix)$
\input{"$appendix$"}
$endif$


\end{document}
43 changes: 43 additions & 0 deletions inst/rmarkdown/templates/tf_article/skeleton/appendix.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
\section{Appendices}

Any appendices should be placed after the list of references, beginning with the command \verb"\appendix" followed by the command \verb"\section" for each appendix title, e.g.
\begin{verbatim}
\appendix
\section{This is the title of the first appendix}
\section{This is the title of the second appendix}
\end{verbatim}
produces:\medskip

\noindent\textbf{Appendix A. This is the title of the first appendix}\medskip

\noindent\textbf{Appendix B. This is the title of the second appendix}\medskip

\noindent Subsections, equations, figures, tables, etc.\ within appendices will then be automatically numbered as appropriate. Some theorem-like environments may need to have their counters reset manually (e.g.\ if they are not numbered within sections in the main text). You can achieve this by using \verb"\numberwithin{remark}{section}" (for example) just after the \verb"\appendix" command.

Please note that if the \verb"endfloat" package is used on a document containing appendices, the \verb"\processdelayedfloats" command must be included immediately before the \verb"\appendix" command in order to ensure that the floats in the main body of the text are numbered as such.

%\processdelayedfloats %%% See above for an explanation of why this command might be needed.

\appendix

\section{Troubleshooting}

Authors may occasionally encounter problems with the preparation of a manuscript using \LaTeX. The appropriate action to take will depend on the nature of the problem:
\begin{enumerate}
\item[(i)] If the problem is with \LaTeX\ itself, rather than with the actual macros, please consult an appropriate \LaTeXe\ manual for initial advice. If the solution cannot be found, or if you suspect that the problem does lie with the macros, then please contact Taylor \& Francis for assistance (\texttt{latex.helpdesk@tandf.co.uk}).
\item[(ii)] Problems with page make-up (e.g.\ occasional overlong lines of text; figures or tables appearing out of order): please do not try to fix these using `hard' page make-up commands -- the typesetter will deal with such problems. (You may, if you wish, draw attention to particular problems when submitting the final version of your manuscript.)
\item[(iii)] If a required font is not available on your system, allow \TeX\ to substitute the font and specify which font is required in a covering letter accompanying your files.
\end{enumerate}


\section{Obtaining the template and class file}

\subsection{Via the Taylor \& Francis website}

This article template and the \texttt{interact} class file may be obtained via the `Instructions for Authors' pages of selected Taylor \& Francis journals.

Please note that the class file calls up the open-source \LaTeX\ packages booktabs.sty, epsfig.sty and rotating.sty, which will, for convenience, unpack with the downloaded template and class file. The template calls for natbib.sty and subfigure.sty, which are also supplied for convenience.

\subsection{Via e-mail}

This article template, the \texttt{interact} class file and the associated open-source \LaTeX\ packages are also available via e-mail. Requests should be addressed to \texttt{latex.helpdesk@tandf.co.uk}, clearly stating for which journal you require the template and class file.
Loading