gpt4 book ai didi

markdown - 潘多克 : How to add a table before the table of content?

转载 作者:行者123 更新时间:2023-12-05 02:14:12 26 4
gpt4 key购买 nike

我想在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com