我希望在通过
如果我通过pandoc进行转换:
pandoc
将Markdown文档转换为(xe)latex PDF输出时,能够得到一张表格,并使用交替行颜色 - 如下所示:https://tex.stackexchange.com/questions/518097/booktabs-but-with-enclosing-border-around-the-table建议使用xcolor
并添加table
选项来实现交替行颜色。因此,我正在尝试使用test.md
文件:---
title: "Testing"
author: Bob Alice
date: July 13, 2010
geometry: margin=2cm
documentclass: extarticle
fontsize: 12pt
header-includes: |
\usepackage[table]{xcolor}
\rowcolors{2}{white}{gray!25}
output: pdf_document
---
Here is a test of a table:
+----------+-------------------+-----------------+
| Box name | Another parameter | The IP address |
+==========+===================+=================+
| Test 1 | random-string-01 | 10.0.0.20 |
| Test 2 | random-string-02 | 10.0.0.30 |
+----------+-------------------+-----------------+
如果我通过pandoc进行转换:
$ pandoc --version
pandoc.exe 2.10 ...
使用以下方法:
pandoc test.md --pdf-engine=xelatex -o test.pdf
...结果如下:
Error producing PDF.
! LaTeX Error: Option clash for package xcolor.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.60 \rowcolors
看起来在这个设置中,似乎加载了 xcolor
,与其他选项冲突,包括 [table]
选项。
是否有可能诱导 pandoc
在没有使用自定义模板的情况下,生成带有交替行颜色的所有Latex/PDF文档中的表格?