简体   繁体   English

Pandoc用户数据目录

[英]Pandoc user data directory

I want to use a custom latex template with Pandoc. 我想在Pandoc中使用自定义的乳胶模板。

I followed the instructions (--data-dir) but then I couldn't find the user data directory on my mac as explained here . 我跟着指示 (--data-DIR),但是我找不到我的Mac用户数据目录解释这里

So I created the .pandoc/templates folders manually, put my template inside ~/.pandoc/templates , run pandoc input.md --template=mytemplate.latex -o output.pdf 所以我手动创建了.pandoc / templates文件夹,将模板放入~/.pandoc/templates ,运行pandoc input.md --template=mytemplate.latex -o output.pdf

and this is what I get 这就是我得到的

pandoc: Could not find data file /usr/local/Cellar/pandoc/1.18/share/x86_64-osx-ghc-8.0.1/pandoc-1.18/data/templates/mytemplate.latex

I could easily move my template inside that folder but I'm quite sure that's not the right way, if only for the fact that it would stop working as soon as I upgrade to v.1.19. 我可以轻松地将模板移到该文件夹​​中,但是我很确定这不是正确的方法,即使仅仅是因为我将其升级到v.1.19也会停止工作。

Ok, solved. 好,解决了 For some reason it couldn't read my template file. 由于某种原因,它无法读取我的模板文件。

Instead I've edited the template that pandoc -D latex > ~/.pandoc/templates/default.latex generated and renamed it to mytemplate.latex. 相反,我编辑了生成pandoc -D latex > ~/.pandoc/templates/default.latex ,并将其重命名为mytemplate.latex。

It's working now. 现在正在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM