小编Dai*_* Li的帖子

如何在 Markdown 文件中的标点符号内移动上标引用编号?

我正在使用 Rmarkdown 写一篇带有引文的论文。当我使用 Nature 的 CSL(或任何上标数字样式)并使用 Pandoc 和 pandoc-citeproc 进行渲染时,行内引用位于标点符号之外。如何将它们移动到标点符号内?谢谢!

这是一个 Rmd 文件示例:

---
title: "Test"
author: "Daijiang Li"
date: '`r format(Sys.time(), "%d %B, %Y")`'
output:
  bookdown::pdf_document2:
    keep_tex: yes
    latex_engine: xelatex
    number_sections: no
    toc: no
fontsize: 12pt
linestretch: 1.5
link-citations: yes
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/nature.csl
bibliography: ref.bib
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: …
Run Code Online (Sandbox Code Playgroud)

pandoc knitr r-markdown csl pandoc-citeproc

6
推荐指数
1
解决办法
1174
查看次数

更新到macOS Catalina后无法使用C ++代码编译R软件包

我刚刚更新到macOS Catalina,并尝试编译我正在开发的R软件包。但是,现在不起作用。我不确定是因为操作系统还是Rcpp程序包。任何帮助,将不胜感激!

> devtools::load_all(".")
Loading phyr
Re-compiling phyr
?  installing *source* package ‘phyr’ ...
   ** using staged installation
   ** libs
   /usr/local/clang4/bin/clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Users/dli/R/Rcpp/include" -I"/Users/dli/R/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
   In file included from RcppExports.cpp:4:
   In file included from /Users/dli/R/RcppArmadillo/include/RcppArmadillo.h:31:
   In file included from /Users/dli/R/RcppArmadillo/include/RcppArmadilloForward.h:26:
   In file included from /Users/dli/R/Rcpp/include/RcppCommon.h:29:
   In file included from /Users/dli/R/Rcpp/include/Rcpp/r/headers.h:59:
   In file included from /Users/dli/R/Rcpp/include/Rcpp/platform/compiler.h:100:
   /usr/local/clang4/bin/../include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace …
Run Code Online (Sandbox Code Playgroud)

c++ macos r rcpp

3
推荐指数
2
解决办法
1249
查看次数

标签 统计

c++ ×1

csl ×1

knitr ×1

macos ×1

pandoc ×1

pandoc-citeproc ×1

r ×1

r-markdown ×1

rcpp ×1