From 8d681659662b7edd1197e6ad780da58afc2975da Mon Sep 17 00:00:00 2001 From: Stefano Coretta Date: Tue, 9 Feb 2021 15:05:57 +0100 Subject: [PATCH] add pihph_article() (#362) Co-authored-by: Christophe Dervieux --- NAMESPACE | 1 + NEWS.md | 2 + R/article.R | 19 ++ README.md | 1 + .../templates/pihph/resources/template.tex | 305 ++++++++++++++++++ .../templates/pihph/skeleton/pihph-logo.png | Bin 0 -> 7217 bytes .../templates/pihph/skeleton/sample-bib.bib | 48 +++ .../templates/pihph/skeleton/skeleton.Rmd | 95 ++++++ inst/rmarkdown/templates/pihph/template.yaml | 5 + man/article.Rd | 19 ++ tests/testit/test-formats.R | 1 + 11 files changed, 496 insertions(+) create mode 100644 inst/rmarkdown/templates/pihph/resources/template.tex create mode 100644 inst/rmarkdown/templates/pihph/skeleton/pihph-logo.png create mode 100644 inst/rmarkdown/templates/pihph/skeleton/sample-bib.bib create mode 100644 inst/rmarkdown/templates/pihph/skeleton/skeleton.Rmd create mode 100644 inst/rmarkdown/templates/pihph/template.yaml diff --git a/NAMESPACE b/NAMESPACE index b4cfca6bb..55dcb2d55 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -26,6 +26,7 @@ export(mdpi_article) export(mnras_article) export(oup_article) export(peerj_article) +export(pihph_article) export(plos_article) export(pnas_article) export(rjournal_article) diff --git a/NEWS.md b/NEWS.md index 7662d3d1b..9ca34dfd1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ rticles 0.19 --------------------------------------------------------------------- - Update Copernicus Publications template to version 6.2 from 2021-01-15 (thanks, @RLumSK, #366). +- Add article template `pihph_article()` for the *Papers in Historical Phonology* (PiHPh) (thanks, @stefanocoretta, #362). + rticles 0.18 --------------------------------------------------------------------- diff --git a/R/article.R b/R/article.R index b414592db..d9eb80f09 100644 --- a/R/article.R +++ b/R/article.R @@ -263,6 +263,25 @@ peerj_article <- function(..., keep_tex = TRUE) { pdf_document_format("peerj", keep_tex = keep_tex, ...) } +#' @section \code{pihph_article}: Format for creating submissions to the Papers +#' in Historical Phonology +#' (\url{http://journals.ed.ac.uk/pihph/about/submissions}). Adapted from +#' \url{https://github.com/pihph/templates}. This format works well with +#' \code{latex_engine = "xelatex"} and \code{citation_package="biblatex"}, +#' which are the default. It may not work correctly if you change these value. +#' In that case, please open an issue and, a PR to contribute a change in the +#' template. +#' @export +#' @rdname article +pihph_article <- function( + ..., keep_tex = TRUE, latex_engine = "xelatex", + citation_package = "biblatex" +) { + pdf_document_format( + "pihph", keep_tex = keep_tex, latex_engine = latex_engine, + citation_package = citation_package, ...) +} + #' @section \code{plos_article}: Format for creating submissions to PLOS #' journals. Adapted from \url{https://journals.plos.org/ploscompbiol/s/latex}. #' @export diff --git a/README.md b/README.md index fd91e760d..e5478ba07 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Currently included templates and their contributors are the following: | [MNRAS: Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras) | [@oleskiewicz](https://github.com/oleskiewicz) | [#175](https://github.com/rstudio/rticles/pull/175) | `mnras_article()` | | [OUP: Oxford University Press](https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) | [@dmkaplan](https://github.com/dmkaplan) | [#284](https://github.com/rstudio/rticles/pull/284) | `oup_articles()` | | [PeerJ: Journal of Life and Environmental Sciences](https://peerj.com) | [@zkamvar](https://github.com/zkamvar) | [#127](https://github.com/rstudio/rticles/pull/127) | `peerj_article()` | +| [PiHPh: Papers in Historical Phonology](http://journals.ed.ac.uk/pihph/about/submissions) | [@stefanocoretta](https://github.com/stefanocoretta) | [#362](https://github.com/rstudio/rticles/pull/362) | `pihph_article()` | | [PLOS](https://plos.org/#journals) | [@sjmgarnier](https://github.com/sjmgarnier) | [#12](https://github.com/rstudio/rticles/pull/12) | `plos_article()` | | [PNAS: Proceedings of the National Academy of Sciences](https://www.pnas.org/) | [@cboettig](https://github.com/cboettig) | [#72](https://github.com/rstudio/rticles/pull/72) | `pnas_article()` | | [RSOS: Royal Society Open Science](https://www.royalsocietypublishing.org/journal/rsos) | [@ThierryO](https://github.com/ThierryO) | [#135](https://github.com/rstudio/rticles/pull/135) | `rsos_article()` | diff --git a/inst/rmarkdown/templates/pihph/resources/template.tex b/inst/rmarkdown/templates/pihph/resources/template.tex new file mode 100644 index 000000000..015e67c07 --- /dev/null +++ b/inst/rmarkdown/templates/pihph/resources/template.tex @@ -0,0 +1,305 @@ +% === GO TO THE USER CUSTOMIZATION SECTION TO MAKE CHANGES + +\documentclass[article, a4paper, 12pt, $for(classoption)$$classoption$$sep$,$endfor$]{memoir} + +% Please use XeLaTeX to compile + +\usepackage{xltxtra} +\defaultfontfeatures{Ligatures=TeX} +\usepackage{hyphenat} + +\newcommand\setlogofont[1]{\newfontfamily\logofont{#1}} +\newcommand\setlicensefont[1]{\newfontfamily\licensefont{#1}} +\usepackage{microtype} +\usepackage{rotating} +\usepackage{hyperxmp} +\usepackage[colorlinks=true, unicode=true, breaklinks=true, linkcolor=black, urlcolor=blue, citecolor=black]{hyperref} + +\counterwithout{section}{chapter} +\setsecnumdepth{subsubsection} +\setcounter{tocdepth}{3} + +\usepackage[export]{adjustbox} +\usepackage{graphicx} +\usepackage[type={CC}, modifier={by}, version=4.0]{doclicense} + +\newcommand\affiliation[1]{{\normalfont\normalsize\itshape#1}} + +\pagestyle{simple} +\makeevenfoot{simple}{}{}{} +\makeoddfoot{simple}{}{}{} +\raggedbottom + +\newcommand\authorheader[1]{\makeevenhead{simple}{\footnotesize\itshape#1}{}{\footnotesize\thepage}} +\newcommand\titleheader[1]{\makeoddhead{simple}{\footnotesize\thepage}{}{\footnotesize\itshape#1}} + +\newcommand\thisdoi{10.2218/pihph.201x.x.xxxx} +\newcommand\thisdoilink{http://dx.doi.org/\thisdoi} + +\renewcommand{\maketitlehooka}{% + \vspace*{-60pt} + \noindent\hspace*{-25pt}\begin{minipage}[t]{2.5cm} + \vspace*{-16pt} + \includegraphics[valign=t, width=2.5cm]{pihph-logo.png} + \end{minipage} + \begin{minipage}[t]{.75\linewidth} + \centering + $if(logofont)$\logofont$endif$\Large Papers in Historical Phonology\\[5pt] + + \footnotesize + + http://journals.ed.ac.uk/pihph + + ISSN 2399-6714 + + \footnotesize\vspace*{5pt} + + Volume 1, \thepage--\thelastpage + + DOI: \thisdoi + \end{minipage} + \begin{minipage}[t]{2.1cm} + \centering + \vspace*{-14pt} + \adjustbox{valign=t}{\doclicenseImage[imagewidth=2.1cm]}\\ + $if(licensefont)$\licensefont$endif$\tiny Licensed under~a \doclicenseLongNameRef{} License + \end{minipage} +} + +\pretitle{\vspace*{24pt}\begin{center}\large\bfseries} +\preauthor{\begin{center}\large\scshape\begin{tabular}[t]{c}} +\postauthor{\end{tabular}\end{center}\vspace*{12pt}} + +\predate{\relax} +\postdate{\relax} +\date{} + +\captionnamefont{\footnotesize\bfseries} +\captiontitlefont{\footnotesize} + +\renewcommand\abstractnamefont{\normalfont\footnotesize\bfseries} +\renewcommand\abstracttextfont{\normalfont\footnotesize} +\setlength\absleftindent{1cm} +\setlength\absrightindent{1cm} +\setlength{\abstitleskip}{-17pt} +\setbeforesecskip{-18pt} +\setaftersecskip{6pt} +\setsecheadstyle{\normalfont\bfseries} +\setbeforesubsecskip{-18pt} +\setaftersubsecskip{6pt} +\setsubsecheadstyle{\normalfont\bfseries} +\setbeforesubsubsecskip{-18pt} +\setaftersubsubsecskip{6pt} +\setsubsubsecheadstyle{\normalfont\bfseries} +\renewenvironment{quote}{\list{}{\leftmargin=0.7cm\rightmargin=0.7cm}\item[]\footnotesize}{\endlist} + +\setlrmarginsandblock{4cm}{4cm}{*} +\setulmarginsandblock{4.5cm}{4.5cm}{*} +\checkandfixthelayout + +\setlength{\footmarkwidth}{0em} +\setlength{\footmarksep}{0em} +\footmarkstyle{\textsuperscript{#1}\hspace{.3em}} +\setfootins{24pt}{\bigskipamount} +\renewcommand*{\footnoterule}{% + \kern-3pt% + \hrule width 0.4\columnwidth + \kern 2.6pt + \vspace{12pt}} + +\usepackage[usenames]{xcolor} +\definecolor{pihphgreen}{RGB}{118, 146, 60} +\usepackage[most]{tcolorbox} + +\newtcolorbox{tcdoublebox}[1][]{% + enhanced jigsaw, + sharp corners, + colback=white, + text width=.95\textwidth, + before={\vspace*{18pt}\noindent}, + left skip=-5mm, + borderline={1pt}{-2pt}{black}, + #1 +} + +\newcommand\commentsinvited{ +\begin{tcdoublebox} + +\section*{\textcolor{pihphgreen}{Comments invited}} + +\textit{PiHPh} relies on post-publication review of the papers that it publishes. If you have any comments on this piece, please add them to its comments site. You are encouraged to consult this site after reading the paper, as there may be comments from other readers there, and replies from the author. This paper's site is here: + +\vspace*{1ex}\noindent \url{\thisdoilink} + +\end{tcdoublebox} +} + +\widowpenalty=10000 +\clubpenalty=10000 + +% === START OF USER CUSTOMIZATION + + +\title{$title$$if(subtitle)$:\\$subtitle$$endif$} +\author{$for(author)$$author.name$\\\affiliation{$author.affiliation$}$sep$ \and $endfor$} + +\authorheader{$if(author-header)$$author-header$$else$$for(author)$$author.name$$sep$, $endfor$$endif$} +\titleheader{$if(title-header)$$title-header$$else$$title$$endif$} + +$if(mainfont)$ +\setmainfont{$mainfont$} +$endif$ +$if(licensefont)$ +\setlicensefont{$licensefont$} +$endif$ +$if(logofont)$ +\setlogofont{$logofont$} +$endif$ +% If you do not have access to Cambria, you can use the metric-equivalent Caladea: https://fontlibrary.org/en/font/caladea +% If you do not have access to Calibri, you can use the metric-equivalent Carlito: https://fontlibrary.org/en/font/carlito +% Lekton available at https://www.fontsquirrel.com/fonts/lekton + +% Use polyglossia by default since the engine is xelatex. +\usepackage{polyglossia} +\setmainlanguage[$if(en-variant)$variant=$en-variant$$endif$]{english} +\usepackage[autostyle$if(single-quotes)$,english=british$endif$]{csquotes} % remove the english=british option for double quotes +$if(gloss)$ +\usepackage{$gloss$} % for examples, feel free to use anything else +$endif$ + +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +% Pandoc syntax highlighting +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ + +% Some recommended packages + +\usepackage{booktabs} % for nice tables + +$if(biblatex)$ +% BibLaTeX setup, recommended +\usepackage[backend=biber, + style=langsci-unified, % available on CTAN + mincrossrefs=50, + maxcitenames=3, + maxbibnames=50, + useprefix=true, + doi=false]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +% remember to include the .bib extension +% remember to run biber rather than bibtex if using this option +\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}} +$endif$ + +% BibTeX setup, deprecated +% \usepackage{natbib} +% \bibpunct[:]{(}{)}{;}{a}{}{,} +% \setlength\bibsep{0pt} + + +% Pandoc citation processing +$if(csl-refs)$ +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +% 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}[3] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi + % set entry spacing + \ifnum #2 > 0 + \setlength{\parskip}{#2\baselineskip} + \fi + }% + {} +\usepackage{calc} % for calculating minipage widths +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ + +$for(header-includes)$ +$header-includes$ +$endfor$ + +\begin{document} +\setcounter{page}{1} +\maketitle +\thispagestyle{empty} + +$if(abstract)$ +\begin{abstract} +\noindent $abstract$ +\end{abstract} +$endif$ + +$for(include-before)$ +$include-before$ +$endfor$ + +$body$ + +\commentsinvited % Please do not change this + +$if(acknowledgements)$ +\section*{Acknowledgements} +$acknowledgements$ +$endif$ + +$if(supplement)$ +\section*{Associated material} +$supplement$ +$endif$ + +\section*{Author's contact details} +\label{sec:auth-cont-deta} + +$for(author)$ +\noindent \textit{$author.name$} + +$if(author.affiliation)$\noindent $author.affiliation$$endif$ + +$if(author.address)$\noindent $author.address$$endif$ + +$if(author.email)$ +\vspace*{5pt} +\noindent \textit{$author.email$} +$endif$ +$endfor$ + +$if(biblatex)$ +% BibLaTeX setup, recommended +\printbibliography[title=References] +$endif$ + +% BibTeX setup, deprecated +% \bibliographystyle{unified} % unified.bst can be obtained at http://cexlj.org/downloads/unified.bst +% \renewcommand\bibsection{\section*{References}} +%\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} + + +$for(include-after)$ +$include-after$ +$endfor$ +\end{document} diff --git a/inst/rmarkdown/templates/pihph/skeleton/pihph-logo.png b/inst/rmarkdown/templates/pihph/skeleton/pihph-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5974130291cc538f5905e73d2fe9be8bb4317d86 GIT binary patch literal 7217 zcmV-19M0p3P)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!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cO+7^x3vxLJhvAw{pBk}z4Epr4J)|e{m#eN;Q9qQoJb&HOA2dC zu1Z6-qJJxmjpDzAf*yiG1%!}LQjwGVxI3GKId_OjC zn1^huk^8Vr#=8~;wPwg82?c#L%@oiHc*}_jy!6xE*n6UB^dk|k&0MAVn$^qk*uSpF zszrGe@&>qVcJzW?#7s4GbIL#$b<98s{p^u%@XUYh!Ktc_tCQVmMs|5A?t5wj?%lEk z3{#^TCld~7V9_PCtJ81ri75eH{L}{e!H>Ux6uwu3%yfJ@E9OwioNL9*JU5#Hne~32pE7!|FU-z6+mtoboa}@YE)3-Fhw38Mfr*UM4Y^g)}jWXyC2Hf-c=M2V|9ZZQOxy#l36r z_!FzKu++g&C^52Vfa+7+#KeLwm@|;vNBel%+%o*&$6IjQtqYYE8ok_qRQHJ_=4(h8 z=puXxs8(kt?sQPtk@AvRh9ofUb=qCxHz?C$pI2W%1t{&rDoSyv%3QQ5`Y8~{!T%|-J zk5deKBAcq0rBXl#U8RJEjymWX0$XjW4!TMS4IOpRH3YWWR2_7c5*j+{plb+hwW&Jj zDkU^@)Irw}*lJUC&{axk=%|CPA+Xh^>Y%HX(9lr_T|;22P1QkHDWRdG4!VZGR-3AW zu2MonM;&wxfvq-GiIL;t057OF^y7@DK+pdJv^&L++kb}E00000NkvXXu0mjfqN^XN literal 0 HcmV?d00001 diff --git a/inst/rmarkdown/templates/pihph/skeleton/sample-bib.bib b/inst/rmarkdown/templates/pihph/skeleton/sample-bib.bib new file mode 100644 index 000000000..68d504dae --- /dev/null +++ b/inst/rmarkdown/templates/pihph/skeleton/sample-bib.bib @@ -0,0 +1,48 @@ + + +@article{blust2009, + author = {Blust, Robert}, + journal = {Oceanic Linguistics}, + number = {2}, + pages = {307--336}, + title = {Palauan Historical Phonology: Whence the Intrusive Velar Nasal?}, + volume = {48}, + year = {2009}} + +@article{sen2016, + author = {Sen, Ranjan}, + doi = {10.2218/pihph.1.2016.1691}, + journal = {Papers in Historical Phonology}, + pages = {5--5}, + title = {Examining the life cycle of phonological processes: considerations for historical research}, + volume = {1}, + year = {2016}} + +@article{ramsammy2016, + author = {Ramsammy, Michael and Strycharczuk, Patrycja}, + doi = {10.2218/pihph.1.2016.1704}, + journal = {Papers in Historical Phonology}, + pages = {285--315}, + title = {From phonetic enhancement to phonological underspecification: hybrid voicing contrast in {European Portuguese}}, + volume = {1}, + year = {2016}} + +@book{hyman1975, + author = {Hyman, Larry M.}, + publisher = {New York: Holt, Rinehart and Winston}, + title = {Phonology: theory and analysis}, + year = {1975}} + +@book{goldsmith1990, + author = {Goldsmith, John A.}, + publisher = {Oxford: Blackwell}, + title = {Autosegmental and metrical phonology}, + year = {1990}} + +@incollection{bermudez-otero2015, + author = {Berm{\'u}dez-Otero, Ricardo}, + booktitle = {The {O}xford handbook of historical phonology}, + pages = {374--399}, + publisher = {Oxford: Oxford University Press}, + title = {Amphichronic explanation and the life cycle of phonological processes}, + year = {2015}} diff --git a/inst/rmarkdown/templates/pihph/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/pihph/skeleton/skeleton.Rmd new file mode 100644 index 000000000..4741e4381 --- /dev/null +++ b/inst/rmarkdown/templates/pihph/skeleton/skeleton.Rmd @@ -0,0 +1,95 @@ +--- +title: This is a title and this is too +subtitle: A subtitle goes on another line +# Use the following to specify a shorter title for the header. +# If not set, the title will be used. +title-header: A short title + +author: +- name: Author's name + affiliation: Author's affiliation + email: e-mail@uni.edu +- name: Second author's name (if there is one) + affiliation: Second author's affiliation +# Use the following to specify a short author name for the header. If not set, +# it will use the authors' name +author-header: Authors + +# The journal uses Cambria, Calibri, and Lekton. If you don't have access to +# Cambria and Calibri, you can use the metrically equivalent Caladea and +# Carlito. Caladea, Carlito, and Lekton are available for download: +# - Caladea: https://fontlibrary.org/en/font/caladea +# - Carlito: https://fontlibrary.org/en/font/carlito +# - Lekton: https://www.fontsquirrel.com/fonts/lekton +# +# mainfont: Cambria # or Caladea +# licensefont: Calibri # or Carlito +# logofont: Lekton + +en-variant: british # Set to "american" for American English. +single-quotes: true # To use double quotes, set single-quotes to false. +# for the example, feel free to use your preferred package for glosses or comment. +gloss: expex + +# This format uses BibLaTeX by default, as recommended by the journal. +bibliography: sample-bib.bib + +abstract: | + This is the template for \LaTeX{} users; we also have a Word template available, so feel free to use that if you're not into \LaTeX. All submissions to PiHPh should aim to follow the formatting set out in this template precisely, as there is no separate typesetting phase. Most styles in this template have been set up to insert the necessary white space where needed. You should use the styles that are provided in this template consistently to ensure that your submission is quickly processed. Do not change the margins or header/footer properties, including the material on this first page (such as volume, page numbers and DOI), which we will update when your submission is ready. Make sure to look at the user customization part of the preamble to this \texttt{.tex} source to change titles, running headers, bibliography etc. All the packages used here should be available in a recent version of \TeX Live. All articles should include an abstract in this position, of no more than 200 words. +acknowledgements: Include any acknowledgements in an unnumbered section here, rather than in a footnote early in the paper. +supplement: If you would like to post any data sets, statistical data, scripts or similar material that links to your article, you can include a description of it all at the end of the paper. +output: rticles::pihph_article +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + +# Heading level 1 + +The first paragraph under all headings will not be indented.^[This is a footnote example] The font for everything is Cambria --- use Xe\LaTeX{} to compile the document to achieve this. Cambria should hopefully have all the transcription symbols that you will need, but if you have any problems using symbols, get in touch (pihph@\hspace{0pt}mlist.ed.ac.uk). Use normal phonological conventions when transcribing: [skweːɹ] brackets for surface/narrow transcriptions and /slantɪd/ brackets for underlying/broad transcriptions. It’s fine to use either IPA conventions (e.g., /t͡ʃ, ɾ, j, y/) or Americanist conventions (e.g., /č, ᴅ, y, ü/), but if there is any possibility of ambiguity or if you need to use a non-conventional symbol, you should explain what it stands for. + +All paragraphs other than the first in a section will be indented by 0.7cm. Make sure that you use the shaftless arrow \enquote{>} for diachronic correspondences. The shafted arrow \enquote{→} (or `$\rightarrow$`) should be used for synchronic derivations. Use \enquote{smart quotation marks}, not \'straight quotation marks\' (we recommend the csquotes package, as in this template). Either British or American English spelling is fine, as long as you are consistent. It is crucial that you spellcheck and carefully proofread your piece before submission. Use a hyphen \enquote{-} only to join together two parts of a compound (as in \enquote{affrico-palatalisation}). For number ranges (as in \enquote{1999–2002}), use an en dash \enquote{--}. For all other purposes, use an em dash \enquote{---}. + +## Heading level 2 + +Quotations of under 25 words should be included in the running text \enquote{as a wise person once said} (with an associated full reference, including page numbers). All references should follow the normal Author (date, page number) system. Longer quotations should be set out as follows. + + +> This is the format for a quotation of 25 words or more, with indentation of 0.7 cm throughout the quotation on both sides and a font size of 10 points (this is set up in the template) and a reference in the text above it, unless there is a good reason to give the reference elsewhere. + +All examples and anything that is not a table or figure should be given a number for reference, as normal. You can set out your examples, diagrams and other similar items in any way that you think sensible (within the general constraints of this template). We recommend the expex package for example, but you are welcome to use any others. Put the example number in brackets, but if you use subexamples the numbering is up to you. The numbers for examples should not be indented. + +```{=latex} +\ex\begin{tabular}[t]{lll} + /ɛɡzampl/ & [ɛɡzámpl̩] & `example' + \end{tabular} +\xe + +\ex\labels\begin{tabular}[t]{>{\tl}llll} % or use \pex +& /tu e/ & [tʰʉː eː] & `two a' \\ +& /tu bi/ & [tʰʉː biː] & `two b' +\end{tabular} +\xe +``` + +If you need to include translations for examples, use single quotation marks. Do not use bold or underlining anywhere in an article (apart from where required by the template in headings and the like). Use italics for linguistic examples in the running text, for the titles of publications and for any kind of emphasis. If you encounter any problems with setting out your examples and similar things, contact us for advice (pihph@\hspace{0pt}mlist.is.ed.ac.uk). + +Captions for figures and tables should be set out below the figure or table. We recommend, but do not insist, that you avoid vertical rules in your tables (we recommend the booktabs package). Otherwise, the setting of figures and tables is also up to you. Everything should be placed in your article where you would like it to appear in the published PDF. Do not place anything at the end of an article unless it clearly belongs in an appendix (that is, it consists of material that a casual reader will not want to consult, but may be of interest to specialists). You will be able to host data sets, statistical data, scripts, and the like separately (within reason) if you would like to make them available in connection with an article. Contact us if you would like to discuss this (pihph@\hspace{0pt}mlist.is.ed.ac.uk). + +```{r example, fig.cap="Caption", fig.align='center'} +knitr::include_graphics("pihph-logo.png") +``` + +# Bibliography and citations + +By default, this template uses Bib\LaTeX. To learn about Bib\LaTeX, see https://www.overleaf.com/learn/latex/Articles/Getting_started_with_BibLaTeX for a quick intro and the package documentation for detailed info. The `langsci-unified` style is used. + +To cite a reference, you can use the standard pandoc syntax `@blust2009` for a citation without parentheses, as in @blust2009, and `[@blust2009]` with parenthesis [@blust2009]. + +These are other examples: @ramsammy2016 [p. 287], [but see @sen2016; @bermudez-otero2015]. Goldsmith is a relevant reference [-@goldsmith1990], although we should not forget @hyman1975. + +# Conclusion + +The following sections show the kinds of things that you might include at the end of your paper. Use the +`\section*` to produce unnumbered sections. diff --git a/inst/rmarkdown/templates/pihph/template.yaml b/inst/rmarkdown/templates/pihph/template.yaml new file mode 100644 index 000000000..d96fb18b7 --- /dev/null +++ b/inst/rmarkdown/templates/pihph/template.yaml @@ -0,0 +1,5 @@ +name: Papers in Historical Phonology Article (PiHPh) +description: > + Template for creating an article for submission to the Papers + in Historical Phonology +create_dir: true diff --git a/man/article.Rd b/man/article.Rd index b17c991f6..0082d7629 100644 --- a/man/article.Rd +++ b/man/article.Rd @@ -21,6 +21,7 @@ \alias{mnras_article} \alias{oup_article} \alias{peerj_article} +\alias{pihph_article} \alias{plos_article} \alias{pnas_article} \alias{sage_article} @@ -101,6 +102,13 @@ oup_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")) peerj_article(..., keep_tex = TRUE) +pihph_article( + ..., + keep_tex = TRUE, + latex_engine = "xelatex", + citation_package = "biblatex" +) + plos_article(..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")) pnas_article(..., keep_tex = TRUE) @@ -246,6 +254,17 @@ custom Pandoc LaTeX template and different default values for other arguments Overleaf Template}. } +\section{\code{pihph_article}}{ + Format for creating submissions to the Papers + in Historical Phonology + (\url{http://journals.ed.ac.uk/pihph/about/submissions}). Adapted from + \url{https://github.com/pihph/templates}. This format works well with + \code{latex_engine = "xelatex"} and \code{citation_package="biblatex"}, + which are the default. It may not work correctly if you change these value. + In that case, please open an issue and, a PR to contribute a change in the + template. +} + \section{\code{plos_article}}{ Format for creating submissions to PLOS journals. Adapted from \url{https://journals.plos.org/ploscompbiol/s/latex}. diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index ffd8aba8c..b0a598b1f 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -52,6 +52,7 @@ test_format("mdpi") test_format("mnras") test_format("oup") test_format("peerj") +test_format("pihph") test_format("plos") test_format("pnas") test_format("rjournal")