rstudio / rticles

LaTeX Journal Article Templates for R Markdown
https://pkgs.rstudio.com/rticles/
1.46k stars 516 forks source link

Add custom environment for all part after body in MDPI template #527

Open cderv opened 1 year ago

cderv commented 1 year ago

From https://github.com/rstudio/rticles/pull/515#discussion_r1168874477 with @mps9506

We should allow such environment

::: informedconsent
Any research article describing a study involving humans should contain this 
statement. Please add ``Informed consent was obtained from all subjects 
involved in the study.'' OR ``Patient consent was waived due to REASON 
(please provide a detailed justification).'' OR ``Not applicable'' for 
studies not involving humans. You might also choose to exclude this statement 
if the study did not involve humans.

Written informed consent for publication must be obtained from participating 
patients who can be identified (including by the patients themselves). Please 
state ``Written informed consent has been obtained from the patient(s) to 
publish this paper'' if applicable.
:::

and use Lua to catch those Divs and set them as variables for the Pandoc's template. This is similar idea to this filter https://github.com/pandoc-ext/abstract-section