作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 pandoc/markdown 生成的目录之前添加一个表格。
我找到了参数“include-before”。有了这个,我可以在目录之前添加文本。但是有没有办法添加表格?
在下面显示我的代码。我希望目录位于两个表和 header1 之间,而不是在表之前。
还有其他方法可以实现吗?我只想为这一代使用一个文件。
谢谢你的帮助
---
geometry: margin=1in
fontfamily: qbookman
numbersections: true
toc: true
toc-title: Table des matières
header-includes: |
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\headheight{20pt}
\lhead{\includegraphics[width=4cm]{C:/logo.png}}
\rhead{Doc generator}
---
+---------------+---------------------------------------------------------------+
| **Title** | Markdown - Pandoc - Plantuml \
|
+---------------+---------------------------------------------------------------+
| **Customer** | Customer \
|
+---------------+---------------------------------------------------------------+
| **Project** | Doc generator
|
+---------------+---------------------------------------------------------------+
----------------------------------------------------------------------------------
**VERSION** **DATE** **MODIFICATION** **AUTHOR**
----------- ------------- ------------------------------------------- -----------
1.0 20-12-2018 Initial DGO
----------------------------------------------------------------------------------
# Header 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
最佳答案
有两种选择:您可以使用 include-before 字段,它适用于文本以及列表或表格。只需确保缩进表格即可。
---
toc: true
toc-title: Table des matières
include-before: |
----------------------------------------------------------------------
**VERSION** **DATE** **MODIFICATION** **AUTHOR**
----------- ------------- ------------------------------- -----------
1.0 20-12-2018 Initial DGO
----------------------------------------------------------------------
或者,您可以禁用 pandoc 的目录机制并手动添加 LaTeX 命令以在所需位置生成目录:
---
geometry: margin=1in
fontfamily: qbookman
numbersections: true
toc: false
header-includes: |
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\headheight{20pt}
\lhead{\includegraphics[width=4cm]{C:/logo.png}}
\rhead{Doc generator}
---
+---------------+---------------------------------------------------------------+
| **Title** | Markdown - Pandoc - Plantuml \
|
+---------------+---------------------------------------------------------------+
| **Customer** | Customer \
|
+---------------+---------------------------------------------------------------+
| **Project** | Doc generator
|
+---------------+---------------------------------------------------------------+
----------------------------------------------------------------------------------
**VERSION** **DATE** **MODIFICATION** **AUTHOR**
----------- ------------- ------------------------------------------- -----------
1.0 20-12-2018 Initial DGO
----------------------------------------------------------------------------------
\renewcommand*\contentsname{Table des matières}
\tableofcontents
# Header 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
关于markdown - 潘多克 : How to add a table before the table of content?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53882881/
我是一名优秀的程序员,十分优秀!