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进行简单更改来校准日志记录级别
- 错误和异常会转到适当的 WARN 和/或 ERROR 日志记录级别
- 没有“裸”
- 错误和异常
- 几乎从未“吞下”
- 仅在易于理解的情况下才会发生
- 必须在代码中清楚地记录它们被吞下的原因
- 只有特定的异常或错误可以通过这种方式被吞掉
- 特别是不能对一般异常执行此操作。
- Throwable 永远不能以这种方式处理
- 仅在易于理解的情况下才会发生
- 几乎从未“吞下”
- 记录
使用命令行
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
包将其他级别添加到序言中,如此处建议的 https://tex.stackexchange.com/a/464459/45938 - 但没有效果(产生相同的错误):
---
title: My Review
subtitle: My subtitle
documentclass: extarticle
author: First Last Sept 15, 2019
geometry: "left=1.5cm,right=1.5cm,top=2cm,bottom=2cm"
header-includes:
- \usepackage{unicode-math}
- \setmainfont{TeX Gyre Schola}
- \setmathfont{TeX Gyre Schola Math}
- \usepackage{enumitem}
- \setlistdepth{20}
- \renewlist{itemize}{itemize}{20}
- \setlist[itemize]{label=$\cdot$}
- \setlist[itemize,1]{label=\textbullet}
- \setlist[itemize,2]{label=--}
- \setlist[itemize,3]{label=*}
output:
rmarkdown::html_document:
theme: lumen
fig_caption: yes
---
最佳答案
使用enumitem
是正确的方法。但是,您必须扩展 enumerate
和 itemize
环境:
---
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
文件。
关于latex - 使用带有 markdown 的 pandoc 在第四个嵌套级别嵌套得太深?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57945414/