使用latex文件中的bookdown输出生成phd html站点

时间:2017-06-29 12:58:04

标签: r latex rstudio bookdown

嗯,我试图了解R Bookdown如何生成不同的html输出,以便在html网站上轻松迁移我的博士。

\usepackage[backend=biber,backref=true, natbib=true, isbn=false, doi=true, url=true, style=authoryear,maxcitenames=1, maxbibnames=999, sorting=nyt, refsection=chapter, hyperref]{biblatex}

如您所见,我的论文使用biblatex与biber和natbib,允许我使用\autocite\autocites命令。我尝试多种配置直接在markdown中重复使用这种类型的引用(而不是[@key]或@key引用),但没有成功。

我从index.Rmd:

中的简单事物开始
--- 
title: "A Minimal Book Example"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [these.bib]
biblio-style: apalike
latex_engine: xelatex
citation_package: natbib
link-citations: yes
github-repo: rstudio/bookdown-demo
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
---

# Introduction

test my citation with \autocite{Pumain1997}.

these.bib包含这个简单的引文:

@article{Pumain1997,
author = {Pumain, Denise},
doi = {10.3406/spgeo.1997.1063},
issn = {0046-2497},
journal = {Espace g\'{e}ographique},
number = {2},
pages = {119--134},
title = {{Pour une th\'{e}orie \'{e}volutive des villes}},
url = {http://www.persee.fr/web/revues/home/prescript/article/spgeo\_0046-2497\_1997\_num\_26\_2\_1063},
volume = {26},
year = {1997}
}

1 个答案:

答案 0 :(得分:1)

您需要记住,在呈现Rmd文件时应用以下规则

  1. bookdown具体命令将由bookdown翻译成相关的LaTeX \ HTML等效文件
  2. markdown将由pandoc转换为相关的LaTeX \ HTML等效文件
  3. 当输出格式为LaTeXHTML)时,
  4. LaTeXHTML)将按原样传递 当输出格式为LaTeXHTML
  5. 时,
  6. HTMLLaTeX)将被忽略

    底线:如果您要将文档转换为@key[@key]

    ,请使用LaTeXHTML