我正在制作一本书。 HTML版本完全按照我的预期呈现。
例如,
5. Read Chapter 7 of Myers
[-@myers_2013_qualitativeresearchbusiness p. 73--91] — 60 minutes.
正确呈现为:
但是,在PDF版本中,引文呈现为bibtex键;即,
5. Read Chapter 7 of Myers (myers_2013_qualitativeresearchbusiness) — 60 minutes.
我的脚本按照以下方式制作pdf。
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::pdf_book')"
和我的_output.yml看起来像这样:
bookdown::gitbook:
css: style.css
split_bib: no
config:
toc:
collapse: section
before: |
<li><a href="./">Qualitative Research Methods</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/psmith1303/business705/edit/master/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: lualatex
citation_package: biblatex
keep_tex: yes
bookdown::epub_book: default
在所有这一切结束时运行的实际pandoc命令是:
/usr/local/bin/pandoc +RTS -K512m -RTS business705.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output business705.tex --table-of-contents --toc-depth 2 --template /usr/home/psmith/NAS/Programming/R/Libs/rmarkdown/rmd/latex/default-1.17.0.2.tex --number-sections --highlight-style tango --latex-engine lualatex --biblatex --include-in-header preamble.tex --variable graphics=yes --variable 'geometry:margin=1in' --variable tables=yes --standalone --bibliography book.bib
我怀疑我需要运行乳胶&#39;引擎&#39;再次提出引文是正确的,但我无法弄清楚如何做到这一点。
答案 0 :(得分:1)
所以,修复似乎是从pdflatex
转移到xelatex
作为LaTeX引擎。我是通过改变_output.yml
bookdown::gitbook:
css: style.css
split_bib: no
config:
toc:
collapse: section
before: |
<li><a href="./">Qualitative Research Methods</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/psmith1303/business705/edit/master/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: biblatex
keep_tex: yes
bookdown::epub_book: default
(对我来说这是一项非常重要的练习,我不得不抛弃我的texlive
安装,并切换到TinyTex
以使biber
正常工作。