【问题标题】:Bookdown: default page size and marginsBookdown:默认页面大小和边距
【发布时间】:2017-08-25 21:51:09
【问题描述】:

创建带有 bookdown 的 pdf 时,默认页面大小和默认边距是多少?例如,使用 bookdown 演示的 index.Rmd 文件中提供的基本配置,我们有:

--- 
title: "A Minimal Book Example"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
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.
---

我请您检查它们是否与亚马逊使用 Createspace 发布所需的页面大小/边距兼容:

https://www.createspace.com/Special/Enterprise/Publisher/submission_guidelines.jsp

谢谢

【问题讨论】:

    标签: r r-markdown pandoc bookdown


    【解决方案1】:

    Gitbook.com报道的官方配置,默认纸张大小为a4,而margin的默认值如下:


    pdf.margin.top  Top margin (default is 56)
    pdf.margin.bottom   Bottom margin (default is 56)
    pdf.margin.right    Right margin (default is 62)
    pdf.margin.left Left margin (default is 62)
    

    偶然发现Gitbook 中的 72 点等于 1 英寸。这些规范是否会延续到 Bookdown?谁知道?我同意你的观点,这个问题的文档不完整。让我们希望他们将来会改进它。

    【讨论】:

    • 新版本的 gitbook don't supportlatex/pdf 了。然后,文档将even like 假装您只需要在标题中像正常一样指定参数并称之为一天。然而,我发现唯一可以最终摆脱默认 letter 的东西i>,将pandoc_args: "--variable=papersize:a4" 添加到_output.yml 中的bookdown::pdf_book
    【解决方案2】:

    为避免依赖默认值,可以使用 yaml 块中的 geometry: 选项指定特定的边距大小:

    --- 
    title: "A Minimal Margin Example"
    author: "Jane Doe"
    geometry: margin=5cm
    output: pdf_document
    ---
    

    见:Set margin size when converting from Markdown to PDF with pandoc

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-19
      • 1970-01-01
      • 2012-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多