Latex 使用带有降价的pandoc在第四个嵌套级别嵌套过深?

Latex 使用带有降价的pandoc在第四个嵌套级别嵌套过深?,latex,markdown,r-markdown,pandoc,Latex,Markdown,R Markdown,Pandoc,pandoc不接受以下代码: 1. Code Behaviors 1. Logging 1. No "bare" `System.out.println`'s 1. Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties 1. Errors and exceptions go to appropriate WARN

pandoc不接受以下代码:

1. Code Behaviors
    1. Logging
        1. No "bare" `System.out.println`'s
        1. Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties
        1. Errors and exceptions go to appropriate WARN and/or ERROR logging levels
    1. Errors and Exceptions
        1. Almost never "swallowed"
            1. Can only happen for well understood situations
                1. Must be documented clearly in code why they are swallowed
                1. Only a specific exception or error may be swallowed this way
                - In particular can not be done for general Exception.
                - Throwable can never be handled this way
应该是这样的:

  • 代码行为
  • 伐木
  • 没有“裸”
    System.out.println
  • 可以通过对Logging.xml和/或log4j.properties的简单更改来校准日志记录级别
  • 错误和异常将转到相应的警告和/或错误日志记录级别
  • 错误和例外
  • 几乎从不“吞咽”
  • 只有在理解清楚的情况下才能发生
  • 必须在代码中清楚地记录它们被吞食的原因
  • 只有特定的异常或错误可以通过这种方式接受
    • 特别是不能做一般例外
    • 丢弃的东西永远不能这样处理
  • 使用命令行

    pandoc --toc  --toc-depth=6 -V fontsize=10pt --pdf-engine xelatex
      -V geometry:"left=1.5cm,right=1.5cm,top=2cm,bottom=2cm" -o review.pdf review.md
    
    我们得到

    Error producing PDF.
    ! LaTeX Error: Too deeply nested.
    
    See the LaTeX manual or LaTeX Companion for explanation.
    Type  H <return>  for immediate help.
     ...
    
    l.159         \begin{enumerate}
    

    使用
    enumitem
    是正确的方法。但是,您必须扩展
    枚举
    逐项列出
    环境:

    ---
    header-includes:
      - \usepackage{enumitem}
      - \setlistdepth{20}
      - \renewlist{itemize}{itemize}{20}
      - \renewlist{enumerate}{enumerate}{20}
      - \setlist[itemize]{label=$\cdot$}
      - \setlist[itemize,1]{label=\textbullet}
      - \setlist[itemize,2]{label=--}
      - \setlist[itemize,3]{label=*}
    output:
      rmarkdown::pdf_document:
          keep_tex: yes
    ---
    
    1. Code Behaviors
        1. Logging
            1. No "bare" `System.out.println`'s
            1. Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties
            1. Errors and exceptions go to appropriate WARN and/or ERROR logging levels
        1. Errors and Exceptions
            1. Almost never "swallowed"
                1. Can only happen for well understood situations
                    1. Must be documented clearly in code why they are swallowed
                    1. Only a specific exception or error may be swallowed this way
                        - In particular can not be done for general Exception.
                        - Throwable can never be handled this way
    
    输出:


    注意:
    output.rmakrdown::pdf_document.keep_tex
    标志表示保留中间
    tex
    文件。

    是的,这是一个限制。顺便说一句,您应该将发布的输入格式化为一个代码块,以便…您可以将中间.tex文件添加到您的问题中吗?@mb21尝试使用扩展base
    lateX
    enumitem
    包,但仍然相同error@samcarter如何生成中间
    tex
    文件?太棒了!!我使用pandoc/teX/pdf来处理所有事情,所以这非常重要。对于其他读者-此处添加的特定修复代码是
    -\renewlist{enumerate}{enumerate}{20}
    ---
    header-includes:
      - \usepackage{enumitem}
      - \setlistdepth{20}
      - \renewlist{itemize}{itemize}{20}
      - \renewlist{enumerate}{enumerate}{20}
      - \setlist[itemize]{label=$\cdot$}
      - \setlist[itemize,1]{label=\textbullet}
      - \setlist[itemize,2]{label=--}
      - \setlist[itemize,3]{label=*}
    output:
      rmarkdown::pdf_document:
          keep_tex: yes
    ---
    
    1. Code Behaviors
        1. Logging
            1. No "bare" `System.out.println`'s
            1. Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties
            1. Errors and exceptions go to appropriate WARN and/or ERROR logging levels
        1. Errors and Exceptions
            1. Almost never "swallowed"
                1. Can only happen for well understood situations
                    1. Must be documented clearly in code why they are swallowed
                    1. Only a specific exception or error may be swallowed this way
                        - In particular can not be done for general Exception.
                        - Throwable can never be handled this way