Elsevier rticle not rendering affiliation properly - r-markdown

I am using the elsevier rticle template to prepare a paper with rmarkdown. When I knit it, commas do not get rendered in the institutional affiliation. This can be reproduced by installing rticles, creating a rmarkdown from the elsevier template, and knitting it. As can be seen below, the commas between Department, Street etc fail to render out of the box.
Any help would be appreciated.

You can use a raw attribute in the yaml block to properly format the latex code used to specify affiliations. Here I modified the yaml block in the rticles template:
title: Short Paper
author:
- name: Alice Anonymous
email: alice#example.com
affiliation: a
correspondingauthor: true
footnote: 1
- name: Bob Security
email: bob#example.com
affiliation: b
- name: Cat Memes
email: cat#example.com
affiliation: b
footnote: 2
- name: Derek Zoolander
email: derek#example.com
affiliation: b
footnote: 2
address:
- code: a
address: |
```{=latex}
organization={Some Institute of Technology},
addressline={Street},
city={City}, state={State}, postcode={Zip},
country={United States}
```
- code: b
address: |
```{=latex}
organization={Another University},
addressline={Street},
city={City}, state={State}, postcode={Zip},
country={United States}
```

Related

Citations not generating in RMarkdown

new to Stackoverflow, and relatively new to writing documents in RMarkdown. I have most other things down, however, I cannot generate citations and the bibliography in RMarkdown. For the example code below, I have used the \cite{REFNAME} as well as [#REFNAME] syntax. The [#REFNAME] will not even let the document be generated, the \cite{} generates the document but the citation is [?] and the reference is not after the #References section.
I have looked through this site and I cannot get suggested fixes to work. I am hoping that the error I am showing after the code sections will tell someone what the error really is.
---
title: "Title for my document"
date: "`r format(Sys.Date(), '%d %B, %Y')`"
output:
pdf_document:
fig_caption: yes
keep_tex: true
number_sections: true
geometry: margin=0.5in
header-includes: \usepackage{float}
urlcolor: blue
bibliography: bibliography_file.bib
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
knitr::knit_hooks$set(mysize = function(before, options, envir) {
if (before)
return(options$size)
})
```
text written \cite{neil_increasing_2008} more text written
# References
My .bib file entry looks like this
#article{neil_increasing_2008,
title = {Increasing incidence of legionellosis in the {United} {States},
1990-2005: changing epidemiologic trends.},
volume = {47},
journal = {Clinical Infectious Diseases},
author = {Neil, K. and Berkelman, R.},
year = {2008},
pages = {591--599}
}
The error is:
Warning message: LaTeX Warning(s): Citation `neil_increasing_2008'
on page 1 undefined on input lin There were undefined references.
If I use the [#neil_increasing_2008] as opposed to the \cite{} then the following error is generate, and it does not generate the document either
pandoc-citeproc: Cannot decode byte '\x87':
Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
pandoc.exe: Error running filter pandoc-citeproc Filter returned error
status 1 Error: pandoc document conversion failed with error 83
Execution halted

rmarkdown: yaml references to bibliography

In rmarkdown/bibliography, how can I convert a bunch of YAML encoded references into one of the files formats accepted by the bibliography?
I am currently using:
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
container-title: Nature Materials
volume: 11
URL: 'http://dx.doi.org/10.1038/nmat3283'
DOI: 10.1038/nmat3283
issue: 4
publisher: Nature Publishing Group
page: 261-263
type: article-journal
issued:
year: 2012
month: 3
and would like to use:
bibliography: bibliography.???
Turns out I needed to copy the references into a .yaml file. AND to add
---
references:
at the start of the file and --- at the end of the file

bibtext references not processing in bookdown

I have a bookdown document that cites other documents using a bibtex bibliography file. It appears to no process at all, since the output (both gitbook format and pdf) don't translate the actual citation to a reference. The output always copies the plain text of the citation, not the actual reference, like this:
Here's a minimal reproducing example, which I build using:
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")'
index.Rmd:
---
title: "test"
site: "bookdown::bookdown_site"
documentclass: book
bibliography: test.bib
biblio-style: apalike
link-citations: true
# toc: yes
# toc_depth: 2
---
# Introduction {#ch:intro}
Conference publication takes the lead role in describing innovative research,
while journals are often delegated to archival purposes [#vrettas15:conferences].
```{r echo=FALSE}
sessionInfo()
```
test:bib:
#article{vrettas15:conferences,
title = {Conferences versus journals in computer science},
author = {Vrettas, George and Sanderson, Mark},
journal = {Journal of the Association for Information Science and Technology},
volume = 66,
number = 12,
pages = {2674--2684},
year = 2015,
publisher = {Wiley Online Library}
}
_bookdown.yml:
rmd_files: [
"index.Rmd",
]
new_session: no
bookdown::gitbook:
split_bib: no
It turns out to be due to the too low version of Pandoc. A version 1.19.x or higher should fix the problem.

splunk regex eliminate final quote

I have:
Row 114005: Requester Name: "RETAIL\S2343W01$" Issued Common Name: "S2343W01.retail.fakename.com" User Principal Name: "S2343W01.retail.fakename.com" Serial Number: "4c22be0100010002d317" Certificate Template: Client Authentication - Retail Desktops Certificate Effective Date: 12/1/2011 10:38 AM Certificate Expiration Date: 11/30/2012 10:38 AMMaximum Row Index: 114005
And I have regex:
(?i)Serial Number: “(?P<cert_SN>.+?\n)
Result is like:
cert_SN = 4c22be0100010002d317"
How can I eliminate the final quote?
Try:
(?i)Serial Number:\s\"(?P<cert_sn>\w+)
Or if need to capture empty fields:
(?i)Serial Number:\s\"(?P<cert_sn>[^\"]*)\"
you can replace .+?\n by [^"]+
[^"] is a character class that doesn't contain the double quote.

Single Table Inheritance and Yaml configuration

I want to use in my project Single Table Inheritance for symfony2/doctrine, but I can't find any working examples with yaml configuration for it. In official documentation there is only annotation configuration presented. I found xml examples, but I want to use yaml configuration. Can somebody help and share with some working code?
Okay built-in converter saves life.
In order to save time this an example of inheritance converted into yaml :
#file: Resources/config/doctrine/Person.orm.yml
Person:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
inheritanceType: SINGLE_TABLE
discriminatorColumn:
name: discr
type: string
length: 255
discriminatorMap:
person: Person
employee: Employee
lifecycleCallbacks: { }
#file: Resources/config/doctrine/Employee.orm.yml
Employee:
type: entity
table: null
lifecycleCallbacks: { }
Here is an example of YAML markup:
Entities config files should be put into src/Acme/StoreBundle/Resources/config/doctrine/<EntityName>.orm.yml according to reference.
Also built-in converter can be used: how to model inheritance in doctrine2 with yaml?