代码之家  ›  专栏  ›  技术社区  ›  MYaseen208

quarto pdf格式的书的“frontmatter”和“mainmatter”的不同页码

  •  1
  • MYaseen208  · 技术社区  · 3 年前

    我需要获得的单独页码 frontmatter mainmatter 中的书的部分 总体安排我有以下内容 YAML 我的代码 _quarto.yml 文件我很好奇实现这一目标的方法。

    project:
      type: book
    
    execute:
      echo: false
      warning: false
      
    book:
      title: "Title"
      author: "Author"
      chapters:
        - index.qmd
        - Ch01.qmd
        - Ch02.qmd
        - references.qmd
    
    bibliography: references.bib
    
    format:
      pdf:
        documentclass: scrreprt
        toc: true
        toc-depth: 3
        lof: true
        lot: true
    
    1 回复  |  直到 3 年前
        1
  •  1
  •   Shafee ikashnitsky    3 年前

    使用 \pagenumbering{<style>} 命令,其中 <style> 可以是其中之一,

    • arabic :使用阿拉伯数字(1,2,3,…)
    • roman :使用小写罗马数字(i,ii,iii,…)
    • Roman :使用大写罗马数字(I、II、III…)
    • alph :使用小写字母(a、b、c…)
    • Alph :使用大写字母(A、B、C…)

    所以为了得到 古罗马的 页码最多为 Ch01 使用 \pagenumbering{Roman} 使用 include-before-body 哪个开始 古罗马的 标题页后面的页码。然后在顶部 Ch01.qmd 使用 \pagenumbering{arabic} 要重置中的页码 阿拉伯语 数字。

    project:
      type: book
    
    execute:
      echo: false
      warning: false
      
    book:
      title: "Title"
      author: "Author"
      chapters:
        - index.qmd
        - Ch01.qmd
        - Ch02.qmd
        - references.qmd
    
    bibliography: references.bib
    
    format:
      pdf:
        documentclass: scrreprt
        toc: true
        toc-depth: 3
        lof: true
        lot: true
        include-before-body: 
          text: |
            \pagenumbering{Roman}
          
    

    Ch01 qmd

    \pagenumbering{arabic}
    
    # Introduction
    
    This is a book created from markdown and executable code.
    
    See @knuth84 for additional discussion of literate programming.