diff --git a/DESCRIPTION b/DESCRIPTION index 1518e4e8c..210df6802 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -79,7 +79,9 @@ Authors@R: c( person("Dmytro", "Perepolkin", , "dperepolkin@gmail.com", role = "ctb", comment = c(ORCID = "0000-0001-8558-6183", github = "dmi3kno")), person("Tom", "Palmer", , "remlapmot@hotmail.com", role = "ctb", - comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot")) + comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot")), + person("Veronica", "Boyce", , "vero.boyce@gmail.com", role="ctb", + comment=c(ORCID = "0000-0002-8890-2775", github= "vboyce")) ) Description: A suite of custom R Markdown formats and templates for authoring journal articles and conference submissions. diff --git a/NAMESPACE b/NAMESPACE index 37d38d99a..27db2f641 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -18,6 +18,7 @@ export(ctex_article) export(elsevier_article) export(frontiers_article) export(glossa_article) +export(glossapx_article) export(ieee_article) export(ims_article) export(informs_article) diff --git a/NEWS.md b/NEWS.md index d655d256a..814d8e4ff 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # rticles (development version) +## NEW FEATURES + +- New `glossapx_article()` template for submissions to Glossa Psycholinguistics + ## MINOR CHANGES - Update to the `asa_article()` format (thanks, @ianmtaylor1 #506, @jepusto, #507): diff --git a/R/article.R b/R/article.R index 9a973690c..4b6f2e26e 100644 --- a/R/article.R +++ b/R/article.R @@ -223,6 +223,28 @@ glossa_article <- function(..., keep_tex = TRUE, latex_engine = "xelatex") { format } +#' @section `glossapx_article`: Format for creating submissions to Glossa Psycholinguistics. +#' Submission structure from +#' Template is adapted from the Glossa rticles template. +#' @export +#' @rdname article +glossapx_article <- function(..., keep_tex = TRUE, latex_engine = "xelatex") { + format <- pdf_document_format( + "glossa", + keep_tex = keep_tex, latex_engine = latex_engine, ... + ) + if (tinytex::is_tinytex() && tinytex::check_installed("microtype")) { + # TODO: known conflict - remove when fixed + tinytex::tlmgr_remove("microtype") + fun <- format$on_exit + format$on_exit <- function() { + if (is.function(fun)) fun() + if (!tinytex::check_installed("microtype")) tinytex::tlmgr_install("microtype") + } + } + format +} + #' @param journal one of `"aoas"`, `"aap"`, `"aop"`, `"aos"`, `"sts"` for `ims_article` #' @section `ims_article`: Format for creating submissions to the Institute of Mathematical Statistics #' [IMS](https://imstat.org/) journals and publications. Adapted from diff --git a/README.Rmd b/README.Rmd index ce006e4d0..51ee6a8a9 100644 --- a/README.Rmd +++ b/README.Rmd @@ -105,6 +105,7 @@ Currently included templates and their contributors are the following: | [Elsevier](https://www.elsevier.com) | [\@cboettig](https://github.com/cboettig), [\@robjhyndman](https://github.com/robjhyndman) | [#27](https://github.com/rstudio/rticles/pull/27), [#467](https://github.com/rstudio/rticles/pull/467) | `elsevier_article()` | | [Frontiers](https://www.frontiersin.org/) | [\@muschellij2](https://github.com/muschellij2) | [#211](https://github.com/rstudio/rticles/pull/211) | `frontiers_article()` | | [Glossa](https://www.glossa-journal.org) | [\@stefanocoretta](https://github.com/stefanocoretta) | [#361](https://github.com/rstudio/rticles/pull/361) | `glossa_article()` | +| [Glossa Psycholinguistics](https://escholarship.org/uc/glossapsycholinguistics) | [\@vboyce](https://github.com/vboyce) | | `glossapx_article()` | | [IEEE Transaction](http://www.ieee.org/publications_standards/publications/authors/author_templates.html) | [\@Emaasit](https://github.com/Emaasit), [\@espinielli](https://github.com/espinielli), [\@nathanweeks](https://github.com/nathanweeks), [\@DunLug](https://github.com/DunLug) | [#97](https://github.com/rstudio/rticles/pull/97), [#169](https://github.com/rstudio/rticles/pull/169), [#227](https://github.com/rstudio/rticles/pull/227), [#263](https://github.com/rstudio/rticles/pull/263), [#264](https://github.com/rstudio/rticles/pull/264), [#265](https://github.com/rstudio/rticles/pull/265) | `ieee_article()` | | [IMS: Institute of Mathematical Statistics](https://imstat.org/) [AoAS: Annals of Applied Statistics](https://imstat.org/journals-and-publications/annals-of-applied-statistics/) | [\@auzaheta](https://github.com/auzaheta) | [#372](https://github.com/rstudio/rticles/pull/372) | `ims_article()` | | [INFORMS: Institute for Operations Research and the Management Sciences](https://www.informs.org/) | [\@robjhyndman](https://github.com/robjhyndman) | [#460](https://github.com/rstudio/rticles/pull/460) | `informs_article()` | diff --git a/inst/rmarkdown/templates/glossapx/resources/template.tex b/inst/rmarkdown/templates/glossapx/resources/template.tex new file mode 100644 index 000000000..cd9719c6f --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/resources/template.tex @@ -0,0 +1,187 @@ +% see http://info.semprag.org/basics for a full description of this template +\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{glossa} + +% possible options: +% [times] for Times font (default if no option is chosen) +% [cm] for Computer Modern font +% [lucida] for Lucida font (not freely available) +% [brill] open type font, freely downloadable for non-commercial use from http://www.brill.com/about/brill-fonts; requires xetex +% [charis] for CharisSIL font, freely downloadable from http://software.sil.org/charis/ +% for the Brill an CharisSIL fonts, you have to use the XeLatex typesetting engine (not pdfLatex) +% for headings, tables, captions, etc., Fira Sans is used: https://www.fontsquirrel.com/fonts/fira-sans +% [biblatex] for using biblatex (the default is natbib, do not load the natbib package in this file, it is loaded automatically via the document class glossa.cls) +% [linguex] loads the linguex example package +% !! a note on the use of linguex: in glossed examples, the third line of the example (the translation) needs to be prefixed with \glt. This is to allow a first line with the name of the language and the source of the example. See example (2) in the text for an illustration. +% !! a note on the use of bibtex: for PhD dissertations to typeset correctly in the references list, the Address field needs to contain the city (for US cities in the format "Santa Cruz, CA") + +%\addbibresource{sample.bib} +% the above line is for use with biblatex +% replace this by the name of your bib-file (extension .bib is required) +% comment out if you use natbib/bibtex + +\let\B\relax %to resolve a conflict in the definition of these commands between xyling and xunicode (the latter called by fontspec, called by charis) +\let\T\relax +\usepackage{xyling} %for trees; the use of xyling with the CharisSIL font produces poor results in the branches. This problem does not arise with the packages qtree or forest. +\usepackage[linguistics]{forest} %for nice trees! +\usepackage{longtable} + +\title[$if(shorttitle)$$shorttitle$$endif$]{$title$$if(wordcount)$\\ \bigskip \large Word count: $wordcount$$endif$} +% Optional short title inside square brackets, for the running headers. + +% \author[Paul \& Vanden Wyngaerd]% short form of the author names for the running header. If no short author is given, no authors print in the headers. +% {%as many authors as you like, each separated by \AND. +% \spauthor{Waltraud Paul\\ +% \institute{CNRS, CRLAO}\\ +% \small{105, Bd. Raspail, 75005 Paris\\ +% waltraud.paul@ehess.fr} +% } +% \AND +% \spauthor{Guido Vanden Wyngaerd \\ +% \institute{KU Leuven}\\ +% \small{Warmoesberg 26, 1000 Brussel\\ +% guido.vandenwyngaerd@kuleuven.be} +% }% +% } + +\author[$if(shortauthors)$$shortauthors$$endif$]{ + $for(author)$ + \spauthor{$author.name$\\ + \institute{$author.affiliation$}\\ + \small{$author.address$} + }% + $sep$\AND$endfor$ +} + +$if(natbib)$ +\usepackage{natbib} +$endif$ +$if(biblatex)$ +\usepackage[$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ + +$if(highlighting-macros)$ +% Pandoc syntax highlighting +$highlighting-macros$ +$endif$ + +% 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$ + +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ + +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ + +$for(header-includes)$ +$header-includes$ +$endfor$ + +\begin{document} + +$for(include-before)$ +$include-before$ +$endfor$ + +\sffamily +\maketitle + +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ + +$if(keywords)$ +\begin{keywords} + $keywords$ +\end{keywords} +$endif$ + +\rmfamily + +% Body of the article +$body$ + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$endif$ +$endif$ +$if(biblatex)$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$for(include-after)$ +$include-after$ + +$endfor$ + +\end{document} diff --git a/inst/rmarkdown/templates/glossapx/skeleton/apa7.csl b/inst/rmarkdown/templates/glossapx/skeleton/apa7.csl new file mode 100644 index 000000000..09f4635a5 --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/skeleton/apa7.csl @@ -0,0 +1,1900 @@ + + diff --git a/inst/rmarkdown/templates/glossapx/skeleton/cgloss.sty b/inst/rmarkdown/templates/glossapx/skeleton/cgloss.sty new file mode 100644 index 000000000..d2cbfb889 --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/skeleton/cgloss.sty @@ -0,0 +1,204 @@ +% -*- LaTeX -*- + +% Modified version of cgloss4e.sty. Hacked and renamed cgloss.sty +% by Alexis Dimitriadis (alexis@babel.ling.upenn.edu) + +% Following borrows from Covington's style files inspired by Midnight by M. +% de Groot, adapted to be used with gb4e.sty: examples beginning with \ex can +% contain glosses directly. Default is +% Linguistic Inquiry style with all lines in \rm; to change a line (eg. to +% \it for a particular journal, change the appropriate line: e.g., +% \let\eachwordone=\rm in a copy of this file. Note that it will NOT work +% to put \it before the line as the words are parsed separately. + +% Use \singlegloss to force single-spaced glosses even in double-space +% environments. Works also in footnotes (^M as delimiter replaced by +% \\)---hpk +% + +% Changes by Alexis Dimitriadis +% +% Removed flushleft environment and initial vskip to make macros usable +% on the same line with earlier and/or later text, e.g., +% \item Q: \gll ... \\ +% ... \\ \hfill (Greek) +% \trans Q: `...' +% Note: Text following the gloss will appear on line one of the example; +% To get a line break, insert one manually with \\ or use \trans or \glt. +% (\gln does not end the line, since it was already the +% case in cgloss4e that a translation must be ended with a line break). +% +% Modified \glt to keep translation on the same page as the text. + +% BUGS: does not work very gracefully with double spacing (struts are not +% automatically inserted after the \vboxes used by the macros). +% In double space mode without \nosinglegloss, when a translation +% is not given, the next line of text is single-spaced from the glossed text. +% With \nosinglegloss, the translation is set too close to the bottom line. + + +%%% +%%% Sentences with word-by-word glosses +%%% + +% See covingtn.tex for full documentation. Some examples: +% +% Displayed sentence with gloss and translation: +% +% \gll Dit is een Nederlands voorbeeld.\\ +% This is a Dutch example.\\ +% \glt `This is an example in Dutch.' +% +% Same, using bracketing where words do not correspond one-to-one: +% +% \gll Dit is een voorbeeldje in het Nederlands.\\ +% This is a {little example} in {} Dutch.\\ +% \glt `This is a little example in Dutch.' +% +% If you want to align 3 lines rather than two, use \glll instead of \gll. +% +% Layout is critical between \gll (or \glll) and \glt (or \gln). +% +% Thanks to Marcel R. van der Goot for permission to reproduce code. +\let\@gsingle=1 +\def\singlegloss{\let\@gsingle=1} +\def\nosinglegloss{\let\@gsingle=0} +\@ifundefined{new@fontshape}% + {\def\@selfnt{\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}} + {\def\@selfnt{\selectfont}} + +\def\gll% % Introduces 2-line text-and-gloss. + {\bgroup %\begin{flushleft} + \ifx\@gsingle1% conditionally force single spacing (hpk/MC) + \def\baselinestretch{1}\@selfnt\fi +% \vskip\baselineskip\def\baselinestretch{1}% +% \@selfnt\vskip-\baselineskip\fi% + \bgroup + \twosent + } + +\def\glll% % Introduces 3-line text-and-gloss. + {\bgroup %\begin{flushleft} + \ifx\@gsingle1% conditionally force single spacing (hpk/MC) + \def\baselinestretch{1}\@selfnt\fi +% \vskip\baselineskip\def\baselinestretch{1}% +% \@selfnt\vskip-\baselineskip\fi% + \bgroup + \threesent + } + +% \def\glt{\vskip.0\baselineskip} + +% redefine \gltoffset to set off translation from ex and gloss +\@ifundefined{gltoffset}{\def\gltoffset{0pt}}{} + +\def\glt{\ifhmode\\*[\gltoffset]\else\nobreak\vskip\gltoffset\nobreak\fi} + + +% Introduces a translation +\let\trans\glt + +\def\gln{\relax} +\def\glend{} % obsolete + % Ends the gloss environment. + +% The following TeX code is adapted, with permission, from: +% gloss.tex: Macros for vertically aligning words in consecutive sentences. +% Version: 1.0 release: 26 November 1990 +% Copyright (c) 1991 Marcel R. van der Goot (marcel@cs.caltech.edu). +% Original Midnight/gloss.tex and Midnight/gloss.doc are available from +% csvax.cs.caltech.edu [131.215.131.131] in pub/tex +% and many other anonymous ftp archives. + +\newbox\lineone % boxes with words from first line +\newbox\linetwo +\newbox\linethree +\newbox\wordone % a word from the first line (hbox) +\newbox\wordtwo +\newbox\wordthree +\newbox\gline % the constructed double line (hbox) +\newskip\glossglue % extra glue between glossed pairs or triples +\glossglue = 0pt plus 2pt minus 1pt % allow stretch/shrink between words +%\glossglue = 5pt plus 2pt minus 1pt % allow stretch/shrink between words +\newif\ifnotdone + +\@ifundefined{eachwordone}{\let\eachwordone=\rm}{\relax} +\@ifundefined{eachwordtwo}{\let\eachwordtwo=\rm}{\relax} +\@ifundefined{eachwordthree}{\let\eachwordthree=\rm}{\relax} + +\def\lastword#1#2#3% #1 = \each, #2 = line box, #3 = word box + {\setbox#2=\vbox{\unvbox#2% + \global\setbox#3=\lastbox + }% + \ifvoid#3\global\setbox#3=\hbox{#1\strut{} }\fi + % extra space following \strut in case #1 needs a space + } + +\def\testdone + {\ifdim\ht\lineone=0pt + \ifdim\ht\linetwo=0pt \notdonefalse % tricky space after pt + \else\notdonetrue + \fi + \else\notdonetrue + \fi + } + +\gdef\getwords(#1,#2)#3 #4\\% #1=linebox, #2=\each, #3=1st word, #4=remainder + {\setbox#1=\vbox{\hbox{#2\strut#3 }% adds space + \unvbox#1% + }% + \def\more{#4}% + \ifx\more\empty\let\more=\donewords + \else\let\more=\getwords + \fi + \more(#1,#2)#4\\% + } + +\gdef\donewords(#1,#2)\\{}% + +\gdef\twosent#1\\ #2\\{% #1 = first line, #2 = second line + \getwords(\lineone,\eachwordone)#1 \\% + \getwords(\linetwo,\eachwordtwo)#2 \\% + \loop\lastword{\eachwordone}{\lineone}{\wordone}% + \lastword{\eachwordtwo}{\linetwo}{\wordtwo}% + \global\setbox\gline=\hbox{\unhbox\gline + \hskip\glossglue + \vtop{\box\wordone % vtop was vbox + \nointerlineskip + \box\wordtwo + }% + }% + \testdone + \ifnotdone + \repeat + \egroup % matches \bgroup in \gloss + \gl@stop} + +\gdef\threesent#1\\ #2\\ #3\\{% #1 = first line, #2 = second line, #3 = third + \getwords(\lineone,\eachwordone)#1 \\% + \getwords(\linetwo,\eachwordtwo)#2 \\% + \getwords(\linethree,\eachwordthree)#3 \\% + \loop\lastword{\eachwordone}{\lineone}{\wordone}% + \lastword{\eachwordtwo}{\linetwo}{\wordtwo}% + \lastword{\eachwordthree}{\linethree}{\wordthree}% + \global\setbox\gline=\hbox{\unhbox\gline + \hskip\glossglue + \vtop{\box\wordone % vtop was vbox + \nointerlineskip + \box\wordtwo + \nointerlineskip + \box\wordthree + }% + }% + \testdone + \ifnotdone + \repeat + \egroup % matches \bgroup in \gloss + \gl@stop} + +%\def\gl@stop{{\hskip -\glossglue}\unhbox\gline\end{flushleft}} + +% \leavevmode puts us back in horizontal mode, so that a \\ will work +\def\gl@stop{{\hskip -\glossglue}\unhbox\gline\leavevmode \egroup} + +\endinput diff --git a/inst/rmarkdown/templates/glossapx/skeleton/glossa.cls b/inst/rmarkdown/templates/glossapx/skeleton/glossa.cls new file mode 100644 index 000000000..a6fe12339 --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/skeleton/glossa.cls @@ -0,0 +1,633 @@ +% Glossa stylefile, modified from the +% Semantics & Pragmatics style file. +% Kai von Fintel, Christopher Potts, and Chung-chieh Shan +% modifications for Glossa by Guido Vanden Wyngaerd +% v1 13 Nov 2015 +% v2 10 Jan 2016 +% v3 16 Apr 2016 +% v4 26 Jun 2016 +% v5 16 Aug 2016 +% v6 29 Sep 2016 +% v7 27 Jan 2018 patches by Adam Liter for section headings +% v8 16 May 2019 patches by GS for compatibility with xe/pdflatex +% v- 19 Jun 2020 by mitcho to better match Glossa typesetting +% v10 5 May 2021 changes to the stylesheet (no italics for subsections)) + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesClass{glossa}[2018/01/27 v.2.3 Class for Glossa] + +% OUTLINE OF THIS CLASS FILE +% option declarations +% required packages +% metadata +% page dimensions +% title +% running headers +% frontmatter +% sectioning +% footnotes +% backmatter +% other environments +% useful macros + +%===================================================================== +%======================== option declarations ======================== + +\newif\if@lucida\@lucidafalse +\newif\if@cm\@cmtrue +\newif\if@times\@timestrue +\newif\if@brill\@brillfalse +\newif\if@charis\@charisfalse +\newif\if@final\@finalfalse +\newif\if@biblatex\@biblatexfalse +\newif\if@linguex\@linguexfalse + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} + +\newcommand{\@sizeoption@err}{\ClassError{sp} + {Cannot use size option \CurrentOption} + {Glossa style requires (and automatically loads) 11pt text}} + +\DeclareOption{10pt}{\@sizeoption@err} +\DeclareOption{12pt}{\@sizeoption@err} + +\DeclareOption{lucida}{\@lucidatrue \@timesfalse \@cmfalse \@brillfalse \@charisfalse} +\DeclareOption{times}{\@lucidafalse \@timestrue \@cmfalse \@brillfalse \@charisfalse} +\DeclareOption{cm}{\@lucidafalse \@timesfalse \@cmtrue \@brillfalse \@charisfalse} +\DeclareOption{brill}{\@lucidafalse \@timesfalse \@cmtrue \@brilltrue \@charisfalse} +\DeclareOption{charis}{\@lucidafalse \@timesfalse \@cmtrue \@brillfalse \@charistrue} +\DeclareOption{final}{\@finaltrue} +\DeclareOption{biblatex}{\@biblatextrue} +\DeclareOption{linguex}{\@linguextrue} + +\ExecuteOptions{times} % times is the default. +\ProcessOptions\relax +\LoadClass[11pt,twoside]{article} + +\if@lucida + \IfFileExists{lucimatx.sty}{% + \RequirePackage[romanfamily=bright-osf, scale=0.9, stdmathdigits=true]{lucimatx}% + \linespread{1.05}% + \DeclareMathDelimiter{\llbracket} + {\mathopen}{letters}{130}{largesymbols}{130} + \DeclareMathDelimiter{\rrbracket} + {\mathclose}{letters}{131}{largesymbols}{131} + \normalfont\DeclareTextCommand + \textbullet\encodingdefault{\UseTextSymbol{OMS}\textbullet} + \let\nLeftrightarrow\undefined + \DeclareMathSymbol{\nLeftrightarrow}{\mathrel}{arrows}{105} +}{\ClassWarning{glossa.cls}{Requested fonts not present}}% +\else\relax +\fi +% +\if@times + \RequirePackage[T1]{fontenc}% use T1 font encoding + \IfFileExists{mathptmx.sty}{\RequirePackage{mathptmx}}{} + \IfFileExists{stmaryrd.sty}% + {\RequirePackage{stmaryrd}}% + {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}% + \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}} + \RequirePackage{textcomp} + \RequirePackage{amssymb} + \else\relax +\fi +% +\if@cm +\IfFileExists{stmaryrd.sty}% + {\RequirePackage{stmaryrd}}% + {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}% + \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}} + \RequirePackage{amssymb} + \RequirePackage{textcomp} + \else\relax +\fi + +\if@brill +\IfFileExists{stmaryrd.sty}% + {\RequirePackage{stmaryrd}}% + {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}% + \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}} + \RequirePackage[no-math]{fontspec} + \setmainfont[RawFeature=+tnum]{Brill} %RawFeature ensures proper alignment of examples with linguex + \RequirePackage{amssymb} + \RequirePackage{textcomp} + \else\relax +\fi + +\if@charis +\IfFileExists{stmaryrd.sty}% + {\RequirePackage{stmaryrd}}% + {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}% + \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}} + \RequirePackage[bitstream-charter]{mathdesign} %math font close to Charis SIL + \RequirePackage[no-math]{fontspec} + \setmainfont{CharisSIL} + \RequirePackage{FiraSans} %sf font; download from https://www.fontsquirrel.com/fonts/fira-sans + \RequirePackage{amssymb} + \RequirePackage{textcomp} + \else\relax +\fi + +% Strong widow and orphan control + +\clubpenalty10000 +\widowpenalty10000 + +%===================================================================== +%========================= required packages ========================= +%%% xunicode is not compatible +%%% with pdflatex, and one should not use inputenc with xelatex +%%% LuaLaTeX is incompatible with xunicode, but can safely load tipa +\RequirePackage{iftex} +\ifXeTeX + \RequirePackage{xunicode} %IPA characters are displayed; the commands of the tipa package are understood +\else + \RequirePackage[safe]{tipa} +\fi + +\ifPDFTeX + \RequirePackage[utf8]{inputenc} +\else +\fi +%%% End modification + +\RequirePackage{xspace} +% microtype handles punctuation at the right margin. We want it for the final product, but it's okay if authors lack it. MODIFIED by Coretta 2022-05-23 comment out microtype to circumvent error during compilation +% \IfFileExists{microtype.sty}{% +% \RequirePackage[final,protrusion={true,compatibility}]{microtype} +% }{} +\RequirePackage{ifthen} +\RequirePackage[hyphens]{url} + +\if@biblatex + \RequirePackage[backend=biber, + bibstyle=biblatex-gl, + citestyle=gl-authoryear-comp, + maxcitenames=3, + maxbibnames=99]{biblatex} +\else + \RequirePackage{natbib} + \bibpunct[: ]{(}{)}{; }{a}{}{;~} + \newcommand{\BIBand}{\&} + \setlength{\bibsep}{0pt} + \setlength{\bibhang}{0.25in} + \bibliographystyle{glossa} + \newcommand{\posscitet}[1]{\citeauthor{#1}'s (\citeyear{#1})} + \newcommand{\posscitealt}[1]{\citeauthor{#1}'s \citeyear{#1}} + \newcommand{\possciteauthor}[1]{\citeauthor{#1}'s} + \newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)} + \newcommand{\secposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~$\S$#2)} + \newcommand{\pgcitealt}[2]{\citealt{#1}:~#2} + \newcommand{\seccitealt}[2]{\citealt{#1}:~$\S$#2} + \newcommand{\pgcitep}[2]{(\citealt{#1}:~#2)} + \newcommand{\seccitep}[2]{(\citealt{#1}:~$\S$#2)} + \newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)} + \newcommand{\seccitet}[2]{\citeauthor{#1} (\citeyear{#1}:~$\S$#2)} +\fi + +\RequirePackage[usenames,dvipsnames]{xcolor} +\definecolor{splinkcolor}{rgb}{.0,.2,.4} +\RequirePackage[colorlinks,breaklinks, + linkcolor=splinkcolor, + urlcolor=splinkcolor, + citecolor=splinkcolor, + filecolor=splinkcolor, + plainpages=false, + pdfpagelabels, + bookmarks=false, + pdfstartview=FitH]{hyperref} +\newcommand{\doi}[1]{\url{https://doi.org/#1}} +\urlstyle{rm} +\RequirePackage[leqno,tbtags]{amsmath} +% If the author is using postscript (discouraged), then load the breakurl package, else don't load it. +\RequirePackage{ifpdf} +\ifpdf + \relax +\else +\relax + %\RequirePackage{breakurl} +\fi +\RequirePackage{graphicx} +\RequirePackage{float} +\RequirePackage[hang,FIGBOTCAP,loose]{subfigure} + +% additions to the S&P required packages for Glossa are listed below + +\RequirePackage[normalem]{ulem} +\RequirePackage{enumitem} +\RequirePackage[font=sf,labelfont=bf,labelsep=colon,justification=raggedright,singlelinecheck=off]{caption} +\RequirePackage{booktabs} + +%===================================================================== +%============================= metadata ============================== + +\def\@pdfauthor{\relax} +\newcommand{\pdfauthor}[1]{\gdef\@pdfauthor{#1}} +\def\@pdftitle{\relax} +\newcommand{\pdftitle}[1]{\gdef\@pdftitle{#1}} +\def\@pdfkeywords{\relax} +\newcommand{\pdfkeywords}[1]{\gdef\@pdfkeywords{#1}} + +\hypersetup{pdfauthor=\@pdfauthor, + pdftitle=\@pdftitle, + pdfkeywords=\@pdfkeywords} + +\def\@spvolume{\relax} +\newcommand{\spvolume}[1]{\gdef\@spvolume{#1}} + +\def\@sparticle{\relax} +\newcommand{\sparticle}[1]{\gdef\@sparticle{#1}} + +\def\@spyear{\relax} +\newcommand{\spyear}[1]{\gdef\@spyear{#1}} + +\def\@spdoi{10.5334/.\@spvolume.\@sparticle} +\def\@splastpage{\relax} +\newcommand{\splastpage}[1]{\gdef\@splastpage{#1}} + +%===================================================================== +%========================== page dimensions ========================== + +% Vertical. +\paperheight=297mm +\topmargin=-13mm % +\headheight=5mm % head: 30mm (margin + head + sep = 0.46cm); latex adds 1in) +\headsep=17.6mm % +\topskip=0.1in % included in the textheight +\textheight=237mm % (297mm - 60mm) +\footskip=0.46cm % foot: 30mm total (1.0in leftover) +\parskip=0pt + +% Horizontal. +\paperwidth=210mm +\textwidth=150mm % (210mm - 60mm) +\oddsidemargin=0.46cm % put at 3cm margins (3cm - 1in = 0.46cm) +\evensidemargin=0.46cm % put at 3cm margins (3cm - 1in = 0.46cm) +\raggedbottom % constant spacing in the text; cost is a ragged bottom +\parindent=0.1in +\leftmargini=0.5in +\@ifundefined{mathindent}{}{\mathindent=0.5in\relax}% + +% Tell dvips about our paper. +\special{papersize=210mm,297mm} + +%===================================================================== +%============================== title ================================ + +% Formats individual pairs inside \author. +\newcommand{\spauthor}[1]% +{\begin{minipage}[t]{16pc}\centering + #1% + \end{minipage}\hspace{.5pc plus1pc}% + \ignorespaces +} + +\renewcommand*{\title}[2][]{\gdef\@shorttitle{#1}\gdef\@title{#2}} +\renewcommand*{\author}[2][]{\gdef\@shortauthor{#1}\gdef\@author{#2}} + +% Adapted from JMLR. +\renewcommand{\maketitle}{% + \par + \begingroup + \renewcommand{\thefootnote}{\fnsymbol{footnote}} + \@maketitle\@thanks + \setcounter{footnote}{0} + \endgroup + \let\maketitle\relax \let\@maketitle\relax + \gdef\@thanks{} + \let\thanks\relax% +} + +% From salt.cls. +\newskip\onelineskip +\onelineskip=\baselineskip +\advance\onelineskip by0pt plus 4pt minus 2pt + +\def\@maketitle{% + \vbox{\hsize\textwidth% + \linewidth\hsize% + \centering + \vskip\onelineskip + \LARGE\@title\@@par + \normalsize + \def\institute{\textit}% + \newcommand{\AND}{\ignorespaces}% + \let\par\@empty + \@author + \lineskiplimit\onelineskip + \lineskip\onelineskip + \@@par + }% + \global\everypar{\everypar{}\vskip 3.5ex} +} + +%===================================================================== +%========================== running headers ========================== + +% Creative commons license text. The font is even smaller here than it is elsewhere in the headers so that we have a chance of fitting the whole license on the page. +\newcommand{\cctext}{{\footnotesize This is an open-access article distributed under the terms of a Creative Commons Attribution License + (\http{http://creativecommons.org/licenses/by/3.0/}).}} + +% This boolean switch lets the user control whether the logo is included even when the requisite image file is present. (If it is missing, then the class file accommodates that no matter how the switch is set.) +\newboolean{logo} +\setboolean{logo}{true} % Default true (include logo if it's present) +\newcommand{\splogo}{\setboolean{logo}{true}} +\newcommand{\nosplogo}{\setboolean{logo}{false}} + +% This sets the font size for the header and footer on all pages. +\newcommand{\headerfontsize}{\footnotesize} + +% Prints publication and copyright info on the first page +% Also loads info into metadata (superseded by new metadata commands) +\gdef\@articlenumber{}% +\newcommand{\firstpageheadings}[6]% +{ + \gdef\@articlenumber{#2} + \gdef\@spvolume{#1} + \gdef\@sparticle{#2} + \gdef\@splastpage{#3} + \gdef\@spyear{#4} + \def\ps@spfirstheadings{% + \let\@mkboth\@gobbletwo% + \renewcommand{\@oddhead}{% + \headerfontsize% + % If the switch is set to "include image", + \ifthenelse{\boolean{logo}}{% + \ifpdf + % If the pdf logo is present, + \IfFileExists{sp-logo.pdf}{% + % then insert the pdf version, + \begin{minipage}[c]{.25in} + \includegraphics[width=.25in]{sp-logo.pdf} + \end{minipage}% + }{}% else nothing; closes \IfFileExists + \else + % If the ps logo is present, + \IfFileExists{sp-logo.ps}{% + % then insert the postscript version, + \begin{minipage}[c]{.25in} + \includegraphics[width=.25in]{sp-logo.ps} + \end{minipage}% + }{}% else, nothing; closes \IfFileExists + \fi % close \ifpdf + }{}% closes \ifthenelse + \begin{minipage}[c]{5.25in} + \href{http://glossa.ubiquitypress.com/}{Glossa} Volume \@spvolume, Article \@sparticle: 1--\@splastpage, \@spyear\\ + \href{https://doi.org/10.5334/sp.\@spvolume.\@sparticle}{https://doi.org/10.5334/.\@spvolume.\@sparticle} + \end{minipage}% + }% + \renewcommand{\@oddfoot}{% + \begin{minipage}[c]{1\textwidth}% + \footnotesize\copyright \@spyear\ \@shortauthor\\ + \cctext + \end{minipage}% + }% + \renewcommand{\@evenhead}{}% + \renewcommand{\@evenfoot}{}% + }% + \thispagestyle{spfirstheadings}% +}% + +\newcommand{\firstpagefinalheadings}% +{ + \def\ps@spfirstheadings{% + \let\@mkboth\@gobbletwo% + \renewcommand{\@oddhead}{% + \headerfontsize% + % If the switch is set to "include image", + \ifthenelse{\boolean{logo}}{% + \ifpdf + % If the pdf logo is present, + \IfFileExists{sp-logo.pdf}{% + % then insert the pdf version, + \begin{minipage}[c]{.25in} + \includegraphics[width=.25in]{sp-logo} + \end{minipage}% + }{}% else nothing; closes \IfFileExists + \else + % If the ps logo is present, + \IfFileExists{sp-logo.ps}{% + % then insert the postscript version, + \begin{minipage}[c]{.25in} + \includegraphics[width=.25in]{sp-logo} + \end{minipage}% + }{}% else, nothing; closes \IfFileExists + \fi % close \ifpdf + }{}% closes \ifthenelse + \begin{minipage}[c]{5.25in} + \href{http://http://glossa.ubiquitypress.com/}{Glossa} Volume \@spvolume, Article \@sparticle: 1--\@splastpage, \@spyear\\ + \href{https://doi.org/\@spdoi}{https://doi.org/\@spdoi} + \end{minipage}% + \gdef\@articlenumber{\@sparticle} + }% + \renewcommand{\@oddfoot}{% + \begin{minipage}[c]{1\textwidth}% + \footnotesize\copyright \@spyear\ \@shortauthor\\ + \cctext + \end{minipage}% + }% + \renewcommand{\@evenhead}{}% + \renewcommand{\@evenfoot}{}% + }% + \thispagestyle{spfirstheadings}% +}% + + +% Prints abbreviated article information on non-initial pages. +\def\ps@spheadings{% + \let\@mkboth\@gobbletwo% + \def\@oddhead{{\headerfontsize\sffamily \@shorttitle}\hfill{\headerfontsize\sffamily\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage}}% short title, inner + \def\@oddfoot{%\hfill{\headerfontsize\ifx\@empty\@articlenumber\else\@articlenumber:\fi%\thepage}\hfill + }% centered pg no + \def\@evenhead{{\headerfontsize\sffamily\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage} \hfill {\headerfontsize\sffamily\@shortauthor}}% author names, inner + \def\@evenfoot{%\hfill{\headerfontsize\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage}\hfill + }% centered pg no +} +\pagestyle{spheadings} + +%===================================================================== +%=========================== final typeset =========================== + + +\if@final +\RequirePackage{sp-hyperxmp} +\splogo +\AtBeginDocument{\firstpagefinalheadings} +\else +\nosplogo +\AtBeginDocument{\thispagestyle{plain}} +\fi + + +%===================================================================== +%=========================== frontmatter ============================= + +% The spacing specs (arg 2 of \list) are the same for the mshistory, abstract, and keywords environments, except that the abstract is indented somewhat. + +% Single parameter determines the left and right margin size. +\newcommand{\frontmatterspacing}[1]{% + \small + \topsep 10\p@ \@plus4\p@ \@minus6\p@ % from size12.clo + \advance\topsep by3.5ex plus -1ex minus -.2ex + \setlength{\listparindent}{0em} + \setlength{\itemindent}{0em} + \setlength{\leftmargin}{#1} + \setlength{\rightmargin}{\leftmargin} + \setlength{\parskip}{0em} +} + +\newenvironment{mshistory}% +{\list{}{\frontmatterspacing{0em}}% +\item\relax}% +{\endlist} + +\renewenvironment{abstract}% +{\list{}{\frontmatterspacing{0.25in}}% +\item\relax\textbf{\abstractname} }% +{\endlist} + +\newenvironment{keywords}% +{\list{}{\frontmatterspacing{0em}}% +\item\relax\textbf{Keywords:}}% +{\endlist} + +%===================================================================== +%============================ sectioning ============================= + +\setcounter{secnumdepth}{5} +\setcounter{tocdepth}{5} + +\renewcommand{\thesection}{\arabic{section}.} +\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}} +\renewcommand{\thesubsubsection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}} + +\renewcommand{\section}{\@startsection{section}{1}{0pt}% + {-3.5ex plus -1ex minus -.2ex}% + {1.8ex plus.2ex}% + {\noindent\normalfont\Large\sffamily\bfseries}} + +\renewcommand{\subsection}{\@startsection{subsection}{2}{0pt}% + {-3.5ex plus -1ex minus -.2ex}% + {1.8ex plus.2ex}% + {\noindent\normalfont\large\sffamily\bfseries}} + +\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0pt}% + {-3.5ex plus -1ex minus -.2ex}% + {1.8ex plus.2ex}% + {\noindent\normalfont\normalsize\sffamily\bfseries}} + +\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% + {-3.5ex plus -1ex minus -.2ex}% + {1.8ex plus.2ex}% + {\noindent\normalsize\sffamily\bfseries}} + +\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}% + {-3.5ex plus -1ex minus -.2ex}% + {1.8ex plus.2ex}% + {\noindent\normalsize\sffamily\it}} + +% General formatting --- for punctuating section headings. +\renewcommand{\@seccntformat}[1]{\@nameuse{the#1}\hspace{1em}} + +%===================================================================== +%============================ footnotes ============================== + +\renewcommand{\@makefntext}[1]{% + \parindent=0.25in + \noindent \hbox to \z@{\hss{\textsuperscript{\@thefnmark}} \hfil}#1} + +%===================================================================== +%============================ backmatter ============================= + +% Environment for formatting all the addresses. +\newenvironment{addresses}% +{\@@par + \let\par\@empty + \addvspace{3.25ex}% + \noindent%\textbf{Author addresses} + \small + % Individual author addresses. + \newenvironment{address}% + {% For email addresses inside the address environment. + %\newcommand{\email}{\texttt}% + \begin{minipage}[t]{19pc}\raggedright} + {\end{minipage}\hspace{.15pc plus1pc}}% + \ignorespaces +}% +{\lineskiplimit 1pc + \lineskip 1pc + \@@par} + +%===================================================================== +%======================== other environments ========================= + +% enumerate labeling that won't conflict with standard ex. numbers. +\renewcommand{\theenumi}{\roman{enumi}} +\renewcommand{\labelenumi}{\theenumi.} +\renewcommand{\theenumii}{\alph{enumii}} +\renewcommand{\labelenumii}{\theenumii.} + +% list spacing ought to satisfy \itemsep + \parsep < \topsep + \parskip +\def\@listi{\leftmargin\leftmargini + \parsep 4\p@ \@plus2\p@ \@minus\p@ + \topsep 10\p@ \@plus4\p@ \@minus\p@ + \itemsep4\p@ \@plus2\p@ \@minus\p@} +\let\@listI\@listi +\@listi + +% typeset figures with lines above and below and the caption title and caption texts in boxes next to each other, top aligned. these definitions extend those of float.sty. +% +% sp caption style +%\newcommand\floatc@sp[2]{% +% \parbox[t]{0.15\textwidth}{{\@fs@cfont#1}}% +% \parbox[t]{0.85\textwidth}{#2}}% + +% sp float style; uses the sp caption style +%\newcommand\fs@sp{ +% \def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@sp +% \def\@fs@pre{\hrule\kern5pt}% +% \def\@fs@post{\kern5pt\hrule\relax}% +% \def\@fs@mid{\kern10pt} +% \let\@fs@iftopcapt\iffalse} + +% users can override these commands using float.sty's functionality +%\floatstyle{sp} +%\restylefloat{figure} +%\restylefloat{table} + +%===================================================================== +%=========================== useful macros =========================== + +\newcommand{\spj}{\emph{S\&P}\xspace} + +\def\co{\colon\thinspace} + +\DeclareRobustCommand\dash{% + \unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces} +\pdfstringdefDisableCommands{\renewcommand{\dash}{ - }} + +% based on \url defined in hyperref.sty +\DeclareRobustCommand*{\http}{\hyper@normalise\http@} +\def\http@#1{\hyper@linkurl{\Hurl{#1}}{http://#1}} + +\newcommand{\email}[1]{\href{mailto:#1}{#1}} + +\providecommand{\sv}[1]{\ensuremath{\llbracket #1 \rrbracket}} + +%===================================================================== +%=========================== linguex settings ======================== + +\if@linguex + \RequirePackage{linguex}% + \renewcommand{\firstrefdash}{}% + \AtBeginDocument{\settowidth{\Exlabelwidth}{(110)}} +\else +\relax +\fi + +\RequirePackage{cgloss} %for adding the language name and source of the example on the first line of glossed examples (requires \gll before the foreign language example and \glt before the translation) + +%================================ miscellaneous ====================== +%===================================================================== + +\setlist{nolistsep} %reduce space between items in lists diff --git a/inst/rmarkdown/templates/glossapx/skeleton/sample.bib b/inst/rmarkdown/templates/glossapx/skeleton/sample.bib new file mode 100644 index 000000000..32045f30e --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/skeleton/sample.bib @@ -0,0 +1,26 @@ +%% This BibTeX bibliography file was created using BibDesk. +%% http://bibdesk.sourceforge.net/ + + +%% Created for Guido at 2021-05-17 17:20:20 +0200 + + +%% Saved with string encoding Unicode (UTF-8) + + + + + +@article{tanenhaus1995, + title = {Integration of visual and linguistic information in spoken language comprehension}, + volume = {268}, + issn = {0036-8075, 1095-9203}, + url = {https://www.sciencemag.org/lookup/doi/10.1126/science.7777863}, + doi = {10.1126/science.7777863}, + pages = {1632--1634}, + number = {5217}, + journaltitle = {Science}, + author = {Tanenhaus, M. and Spivey-Knowlton, M. and Eberhard, K. and Sedivy, J.}, + urldate = {2020-09-15}, + date = {1995-06-16}, +} diff --git a/inst/rmarkdown/templates/glossapx/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/glossapx/skeleton/skeleton.Rmd new file mode 100644 index 000000000..ce1abcb0e --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/skeleton/skeleton.Rmd @@ -0,0 +1,201 @@ +--- +title: This is a title and this is too +# Optional short title inside square brackets, for the running headers. +shorttitle: A subtitle goes on another line +shortauthors: Author & Writer +author: +- name: "Person Author" + affiliation: "Big University" + corresponding: yes # Define only 1 corresponding author + email: "person@bigu.edu" +- name: "Other Writer" + affiliation: "Small College" + +classoption: [times] +# +# Possible classoptions: +# - [times] for Times font (default if no option is chosen) +# - [cm] for Computer Modern font +# - [lucida] for Lucida font (not freely available) +# - [brill] open type font, freely downloadable for non-commercial use from +# http://www.brill.com/about/brill-fonts; requires xetex +# - [charis] for CharisSIL font, freely downloadable from http://software.sil.org/charis/ +# - for the Brill an CharisSIL fonts, you have to use the XeLatex +# typesetting engine (not pdfLatex) +# - for headings, tables, captions, etc., Fira Sans is +# used: https://www.fontsquirrel.com/fonts/fira-sans +# - [biblatex] for using biblatex (the default is natbib, DO NOT LOAD the +# natbib package in this file, it is loaded automatically via the document +# class glossa.cls) +# - [linguex] loads the linguex example package +# +# !!! A note on the use of linguex: in glossed examples, the third line of the +# example (the translation) needs to be prefixed with \glt. This is to allow a +# first line with the name of the language and the source of the example. See +# example (2) in the text for an illustration. +# +# !!! A note on the use of bibtex: for PhD dissertations to typeset correctly +# in the references list, the Address field needs to contain the city +# (for US cities in the format "Santa Cruz, CA") +# + +bibliography: sample.bib +link-citations: true +csl : "apa7.csl" + +abstract: | + This document provides a template for glossapx submissions. Articles must have the main text prefaced by an abstract of no more than 300 words summarizing the main arguments and conclusions of the article. + +# Specify up to 6 optional keywords here: +keywords: stylesheet, glossapx, article +# To add the word count, uncomment the following option and replace the number +# with the document word count. +# wordcount: 1000 +output: + bookdown::pdf_book: + base_format: rticles::glossapx_article +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = FALSE) +``` + +# Anonymization + +The names of all authors, affiliations, contact details, biography (optional) and the corresponding author details must be completed online as part of the submission process but should not be added to the submitted files until after editorial acceptance. Please omit information about institutions from which experimental participants were recruited or where participants were tested. Check for any other potentially identifying information. + + +# Main text + +The body of the submission should be structured in a logical and easy to follow manner. The text must follow the instructions in Glossa Psycholinguistics' Style sheet: See the Style Sheet below. Double-spacing is not required and tables and figures should be placed in the appropriate locations in the text. + +# Style sheet +Here is some of the glossa style sheet. For the full information, see https://escholarship.org/uc/glossapsycholinguistics/structure_of_submission. + +## Parts of the text +The title should not contain any capitalization, apart from the first word and words that require capitals in all contexts. The title is followed by the first and last name of the author(s), their affiliation, and e-mail. First names should not include only initials. To ensure double-blind review, any information identifying the author(s) should be removed from the text as long as it is under review. + +Articles are preceded by an abstract of no more than 300 words and up to six keywords. The Abstract and Keywords should also be added to the metadata when making the initial online submission. + +Articles are subdivided into numbered sections (and possibly subsections, numbered 1.1 etc., and subsubsections, numbered 1.1.1 etc.), with a bold-faced heading in each case. The numbering always begins with 1, not 0. Section headings end with a period; subsection headings do not. Neither type of heading has any special capitalization. + +The conclusion is the last numbered section. It may be followed by several unnumbered sections: Abbreviations, Data Accessibility Statement, Ethics and consent, Acknowledgements, Competing Interests, and Authors' contributions, in this order. Of these, only the Abbreviations and Acknowledgments sections are optional. If your paper contains glossed examples, the Abbreviations section. Consult the Glossa website for more information. The last part is the list of bibliographical references (References). For the style of references, see below. + +## Numbered examples and formulae +Examples from languages other than English must be glossed (with word-by-word alignment) and translated (cf. the Leipzig Glossing Rules recommended as basic guidelines here: http://www.eva.mpg.de/lingua/resources/glossing-rules.php). Example numbers are enclosed in parentheses, and left-aligned. Example sentences usually have normal capitalization at the beginning and normal punctuation. The gloss line has no capitalization and no punctuation. + +When the example is not a complete sentence, there is no capitalization and no full stop at the end. If the name of the language is added, the source of the example, or any extra information, this information must be added on an extra first line of the example (with the name of the language in italics). Do not use italics to emphasize any language material in numbered example sentences. Instead, please use bold face to indicate emphasis on particular parts of a numbered example. + +Ungrammatical examples can be given a parenthesized idiomatic translation. A literal translation may be given in parentheses after the idiomatic translation. + +The use of any nonstandard layout in examples beyond what is illustrated above is strongly discouraged, as this will increase production time (and cost) of your paper, as well as increase the chances of the HTML version format including errors in some browsers/screen sizes. If you feel an example needs additional explanation, try as much as possible to provide this in the text that goes with the example. If nonstandard layout is essential then please raise this with the editorial team to discuss the options available. + +Formulae must be proofed carefully by the author(s). Editors will not edit formulae. If special software has been used to create formulae, the way it is laid out is the way they will appear in the publication. + +## In-text citations of language material +For numbered examples, italics are reserved only for the name of the language as in (2) above. However, any in-text reference to a form in an object language should be presented in italics, with its meaning or translation in single quotes. For example: + +The Mandarin long-distance reflexive ziji 'self' may take antecedents outside of the local clause. + +## Use of footnotes/endnotes +Use footnotes rather than endnotes (we refer to these as "Notes" in the online publication). These will appear at the bottom of each page. All notes should be used only where crucial clarifying information needs to be conveyed.^[I'm a footnote.] + +Avoid using notes for purposes of referencing, with in-text citations used instead. If in-text citations cannot be used, a source can be cited as part of a note. Please insert the footnote marker after the end punctuation.[^1] + +The footnote reference number normally follows a period or a comma, though exceptionally it may follow an individual word. Footnote numbers start with 1. Examples in footnotes have the numbers (i), (ii), etc. + + +[^1]:I'm another footnote. + +## Tables and figures + + + +You can cross reference Figures like Figure \@ref(fig:fig1) and Tables like Table \@ref(tab:tab1). + +```{r fig1, fig.cap="I'm a figure caption. Note that I am below the figure and left-aligned."} + +x <- runif(10) +y <- runif(10) + +plot(x,y) + +``` + +```{r tab1} +df <- data.frame(x=x, y=y) + +knitr::kable(df, caption="I'm a table caption. I go above the table.") + +``` + +Tables and figures are treated as floats in typesetting. This means that their placement on the page will not necessarily be where you put it in your manuscript, as this may lead to large parts of the page ending up white (e.g. when a table or figure does not fit on the current page anymore and wraps onto the following page). For this reason, you must always refer to tables and figures in the running text (e.g. “… as shown in Table 1”). Do not refer to tables and figures using the words "following', "below" or "above", as the final placement of your table or figure may be different from where you placed them in your manuscript. + +Tables and figures are numbered consecutively. Each table and each figure has a caption. The caption is placed below figures, but above tables, with only the figure or table number in bold. The caption ends in a full stop. + +All figures must be uploaded separately as supplementary files once the paper is accepted, if possible in colour and at a resolution of at least 300dpi. No file should be larger than 20MB. Standard formats accepted are: jpg, tiff, gif, png, eps. For line drawings, please provide the original vector file (e.g. .ai, or .eps). + +Tables must be created using a word processor's table function, not tabbed text. Tables should be included in the manuscript. + +Tables should not include: + +- Rotated text +- Color to denote meaning (it will not display the same on all devices) +- Images +- Diagonal lines +- Multiple parts (e.g. "Table 1a" and "Table 1b"). These should either be merged into one table, or separated into "Table 1" and "Table 2". + +If there are more columns than can fit on a single page, the table will be rotated by 90 degrees to fit on the page. Do not use tables that cannot fit onto a single page. + +Tree diagrams should be treated as examples, not as figures. If your figure or tree diagram includes text, then for the best match with the typeset text use the font Charis Sil, or Fira Sans. These fonts also support the International Phonetical Alphabet (IPA) symbols. + +## In-text citations +In-text citations should be formatted according to APA style, 7th edition. For details, see the APA Publication Manual, 7th Edition. A useful summary can be found here. + +## References +Please ensure that all in-text citations in the text have a corresponding entry in the reference list. References should be formatted according to the APA Publication Manual, 7th Edition. For more information, please consult this website. APA style (7th edition) for Zotero is available at American Psychological Association 7th edition. + +You can cite things like @tanenhaus1995. + + + +# Abbreviations (optional) {.unnumbered} + +Use abbreviations sparingly. All acronyms should be defined the first time they are used. Remember that over-use of abbreviations and acronyms will make the paper difficult to read. Manuscripts that provide glosses should list in a key all the abbreviations that are used (e.g., NOM = nominative). + +# Data Accessibility (required) {.unnumbered} + +A Data Accessibility Statement section must be added prior to the reference list that provides information on how to access the data and any supplemental files associated with the manuscript, including DOI. Please be sure that during the review process, data repositories are suitably anonymized. For information on how to do this at OSF, please see here: https://help.osf.io/article/155-create-a-view-only-link-for-a-registration. + +# Ethics and consent (required if applicable) {.unnumbered} + +Research involving human subjects, human material, or human data, must have been performed in accordance with the Declaration of Helsinki. Where applicable, the studies must have been approved by an appropriate ethics committee and the authors should include a statement within the article text detailing this approval, including the name of the ethics committee and reference number of the approval. The identity of the research subject should be anonymised whenever possible. For research involving human subjects, informed consent to participate in the study must be obtained from participants (or their legal guardian). + +# Acknowledgements (optional){.unnumbered} + +Any acknowledgements must have a header and be placed in its own paragraph, placed after the main text but before the reference list. If the research was supported by a funding grant, then please add the grant provider and grant number in the acknowledgments. Personal acknowledgements should be included only in the final version of the paper, to avoid compromising blind peer review. Editors should not be acknowledged. + +# Competing interests (required) {.unnumbered} + +If any of the authors have any competing interests then these must be declared. Guidelines for competing interests can be found here. If there are no competing interests to declare then the following statement should be present: The author(s) has/have no competing interests to declare. + +# Authors' contributions (required) {.unnumbered} + +Please add a short paragraph detailing the roles that each author held with regards to the submission. Here is a useful guide to the CRediT system for assigning author credit. + +\newpage + +# References {.unnumbered} + +\begingroup +\setlength{\parindent}{-0.5in} +\setlength{\leftskip}{0.5in} + +
+\endgroup + +\newpage + +# Appendix A {.unnumbered} + +If you have any appendices, they go after references. diff --git a/inst/rmarkdown/templates/glossapx/template.yaml b/inst/rmarkdown/templates/glossapx/template.yaml new file mode 100644 index 000000000..7eab9c438 --- /dev/null +++ b/inst/rmarkdown/templates/glossapx/template.yaml @@ -0,0 +1,4 @@ +name: Glossa Psycholinguistics article +description: > + Template for articles of Glossa Psycholinguistics +create_dir: true diff --git a/man/article.Rd b/man/article.Rd index faac190f2..0b7342393 100644 --- a/man/article.Rd +++ b/man/article.Rd @@ -16,6 +16,7 @@ \alias{elsevier_article} \alias{frontiers_article} \alias{glossa_article} +\alias{glossapx_article} \alias{ims_article} \alias{informs_article} \alias{iop_article} @@ -90,6 +91,8 @@ frontiers_article(..., keep_tex = TRUE) glossa_article(..., keep_tex = TRUE, latex_engine = "xelatex") +glossapx_article(..., keep_tex = TRUE, latex_engine = "xelatex") + ims_article( journal = c("aoas", "aap", "aop", "aos", "sts"), keep_tex = TRUE, @@ -265,6 +268,12 @@ journal of general linguistics. Author Guidelines are available on Template is adapted from \url{https://github.com/guidovw/Glossalatex}. } +\section{\code{glossapx_article}}{ + Format for creating submissions to Glossa Psycholinguistics. +Submission structure from \url{https://escholarship.org/uc/glossapsycholinguistics/structure_of_submission} +Template is adapted from the Glossa rticles template. +} + \section{\code{ims_article}}{ Format for creating submissions to the Institute of Mathematical Statistics \href{https://imstat.org/}{IMS} journals and publications. Adapted from diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index a4cdc7a65..ccb8435e5 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -48,6 +48,7 @@ test_format("ctex", skip = !xfun::is_linux()) # only on linux due to fonts requi test_format("elsevier", skip = !rmarkdown::pandoc_available("2.10")) test_format("frontiers") test_format("glossa") +test_format("glossapx") test_format("ieee") test_format("ims") test_format("ims", output_options = list(journal = "aap"))