2

我正在用 bookdown 制作一本书。HTML 版本完全按照我的预期呈现。

例如,

5. Read Chapter 7 of Myers
  [-@myers_2013_qualitativeresearchbusiness p. 73--91] — 60 minutes.

正确呈现为:

  1. 阅读 Myers 的第 7 章(2013 年,第 73-91 页)——60 分钟。

然而,在 PDF 版本中,引用被呈现为 bibtex 键;IE,

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 

我怀疑我需要再次运行乳胶“引擎”才能正确引用,但我不知道该怎么做。

4

1 回答 1

1

因此,修复似乎是从LaTeX 引擎迁移pdflatex到。xelatex我通过更改 _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工作)。

于 2018-06-14T20:06:57.420 回答