pandoc latex ! Undefined control sequence.

 # pandoc changelog.md --latex-engine=xelatex --template=pandoc.template -o changelog.pdf

! Undefined control sequence.
l.88 ...版本,***\***

  查了好多关于 “! Undefined control sequence.” 的问题,试了所有很多方法无用,最后无意间找到问题所在:

  即 " \ " ,使用 latex 转换,将 " \ " 识别为转义字符,但是后面没有跟需要转移的内容,其实原来的意图是需要使用 " \ ",那么就需要使用 \ 转义或者 ` ` 包含起来即可

  例如:我想表达一个window目录:C:\Windows\Fonts  就可以写作:

1. C:\\Windows\\Fonts

2. C:`\`Windows`\`Fonts

 

若还有有其他问题,可以参考 https://www.overleaf.com/learn/latex/Errors/Undefined_control_sequence (后来找到这里有更具体分析),https://www.jianshu.com/p/dcc2f95cc086?utm_campaign=maleskine 等等

posted @ 2021-04-13 15:50  clovershell  阅读(584)  评论(0编辑  收藏  举报