-
Notifications
You must be signed in to change notification settings - Fork 521
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
Glossa Psycholinguistics template #526
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,9 @@ Authors@R: c( | |
person("Dmytro", "Perepolkin", , "[email protected]", role = "ctb", | ||
comment = c(ORCID = "0000-0001-8558-6183", github = "dmi3kno")), | ||
person("Tom", "Palmer", , "[email protected]", role = "ctb", | ||
comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot")) | ||
comment = c(ORCID = "0000-0003-4655-4511", github = "remlapmot")), | ||
person("Veronica", "Boyce", , "[email protected]", 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. | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 <https://escholarship.org/uc/glossapsycholinguistics/structure_of_submission> | ||||||||||||||||||
#' 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, ... | ||||||||||||||||||
) | ||||||||||||||||||
Comment on lines
+232
to
+235
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't it be
Suggested change
But are the template different ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be possible to do it with settings differences? I'm not sure, but here's the diff from the glossa template to get something in glossa psycholinguistics format.
I think if it's possible to set toggles for the table captions and section numbering in the yaml that interact with the latex template, then glossa psycholinguistics format could be added to the glossa template by
If this sounds like a better way forward, I can work on adapting the glossa template to support both glossa and glossa psycholinguistics. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to clarify where do you think those change go ? From what I can see in the PR, it seems nothing is different in the I understand now that there may not be an easy way to :
There should be a way to reuse the So, probably clear question is: Is this PR aiming to offer a My understanding is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the PR currently, there are
I agree that the resources/template.tex is the same, so I just need a different skeleton but it's more than just the skeleton.Rmd since it needs the different cls and csl files. I don't know if these would count as configuration variations? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification. I also read the following page: https://escholarship.org/uc/glossapsycholinguistics/structure_of_submission
I understand there are important differences now. I need to understand the maintainance part of this.
Did you make the adaptation ? Is there a Is there anything to change to follow the guideline on their website ? I don't see any mention of original
I don't know if these would count as configuration variations? Different CSL is a configuration with the Regarding If this is really the same resource, but some different skeleton.Rmd and format function, I can think of how to allow that in rticles Thanks a lot for the discussion, I think this is the first case we have like this. Really interesting. |
||||||||||||||||||
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 | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\\ | ||
% [email protected]} | ||
% } | ||
% \AND | ||
% \spauthor{Guido Vanden Wyngaerd \\ | ||
% \institute{KU Leuven}\\ | ||
% \small{Warmoesberg 26, 1000 Brussel\\ | ||
% [email protected]} | ||
% }% | ||
% } | ||
|
||
\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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about naming
glossapsycholx()
as their twitter account ? https://twitter.com/glossapsycholx