Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

CriticMarkup code is captured within citations in square brackets #71

Open
shirdekel opened this issue Apr 9, 2020 · 1 comment
Open

Comments

@shirdekel
Copy link

shirdekel commented Apr 9, 2020

reprex.bib

@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

reprex.Rmd

---
title: Reversible R Markdown Document
subtitle: Your subtitle
author: Your Name
date: Created `r Sys.Date()`
bibliography: reprex.bib
output:
  redoc::redoc:
    highlight_outputs: TRUE
    margins: 1 
    line_numbers: FALSE 
---

text {++ edit ++} text @einstein text

text {++ edit ++} text [@einstein] text

Output

reprex.docx

Dedoc

---
title: Reversible R Markdown Document
subtitle: Your subtitle
author: Your Name
date: Created `r Sys.Date()`
bibliography: reprex.bib
output:
  redoc::redoc:
    highlight_outputs: yes
    margins: 1
    line_numbers: no
---

text edit text @einstein text

text [ edit ]{.insertion author="Shir Dekel" date="2020-04-09T11:19:07Z"} text [@einstein] text

Einstein, Albert. 1905. "Zur Elektrodynamik bewegter Körper. (German) \[on the
Electrodynamics of Moving Bodies\]." *Annalen Der Physik* 322 (10): 891--921.
<https://doi.org/http://dx.doi.org/10.1002/andp.19053221004>.

It seems as though the CriticMarkup code gets captured in the citationwrap regex.


Session Info
Session info ────────────────────────────────────
 setting  value                       
 version  R version 3.5.3 (2019-03-11)
 os       macOS Mojave 10.14.6        
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_AU.UTF-8                 
 ctype    en_AU.UTF-8                 
 tz       Australia/Sydney            
 date     2020-04-09        

Pandoc version (get with rmarkdown::pandoc_version): 2.3.1

RStudio version (if applicable): 1.3.300

@shirdekel
Copy link
Author

Seems to be fixed by moving citationwrap in front of cmwrap in the wrappers argument in redoc().

i.e., from

wrappers = list(
                    htmlcommentwrap, latexwrap,
                    rawblockwrap, rawspanwrap,
                    cmwrap, citationwrap
                  )

to

wrappers = list(
                    htmlcommentwrap, latexwrap,
                    rawblockwrap, rawspanwrap,
                    citationwrap, cmwrap
                  )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant