obsidian-enhancing-export icon indicating copy to clipboard operation
obsidian-enhancing-export copied to clipboard

Error with exporting as PDF

Open YmmitZtrol opened this issue 2 years ago • 1 comments

When exporting a file as pdf using pandoc version 2.19.2 on Windows 11 I get the following error. image

YmmitZtrol avatar Sep 08 '22 04:09 YmmitZtrol

You need to install pdf-engine.

图片

Pelase follow the guide of https://pandoc.org/getting-started.html

mokeyish avatar Sep 10 '22 03:09 mokeyish

image 我是不是也是一样的情况?

chenxin0397 avatar Sep 23 '22 07:09 chenxin0397

PDF 可以参考 https://github.com/mokeyish/obsidian-enhancing-export/issues/21#issuecomment-1250181013

不过你这导出不是 pdf 的命令。

mokeyish avatar Sep 23 '22 07:09 mokeyish

有中文版说明吗?

chenxin0397 avatar Sep 25 '22 15:09 chenxin0397

image image 我还是不知道我哪里设置错了

chenxin0397 avatar Sep 25 '22 16:09 chenxin0397

我是windows用户,装了MiKTeX,然后就不知道怎么操作了

chenxin0397 avatar Sep 25 '22 16:09 chenxin0397

我是windows用户,装了MiKTeX,然后就不知道怎么操作了

配置下环境变量,或者设置pdf engine 的绝对路径。我也没用过 pdf 的导出,我觉得安装太麻烦了。我直接用 obsidian 官方的功能。

mokeyish avatar Sep 25 '22 23:09 mokeyish

pandoc 简单,就一个单文件。 pdf engine ,我看了下,要安装一堆文件,还依赖其他的,就懒得搞了

mokeyish avatar Sep 25 '22 23:09 mokeyish

行吧,其实我就是想导出PDF的时候带大纲,目前对自带的这个功能还很满意,美中不足的就是没有大纲

chenxin0397 avatar Sep 27 '22 12:09 chenxin0397

行吧,其实我就是想导出PDF的时候带大纲,目前对自带的这个功能还很满意,美中不足的就是没有大纲

@chenxin0397 你可以摸索一下,直接用命令行,能不能搞定你这个需求,搞定了再把命令搬到这个插件来,后续就 UI 上点点,省去每次敲命令

mokeyish avatar Sep 28 '22 00:09 mokeyish

行吧,其实我就是想导出PDF的时候带大纲,目前对自带的这个功能还很满意,美中不足的就是没有大纲

@chenxin0397 你可以摸索一下,直接用命令行,能不能搞定你这个需求,搞定了再把命令搬到这个插件来,后续就 UI 上点点,省去每次敲命令

我是图像思维,命令行对我来说太难了,一直学不会

chenxin0397 avatar Sep 28 '22 00:09 chenxin0397

同样的pandoc命令,obsidian里就是错误{1},命令行正常

image

image

joezhouchenye avatar Dec 09 '22 05:12 joezhouchenye

同样的pandoc命令,obsidian里就是错误{1},命令行正常

@joezhouchenye 指定 pandoc 的绝对路径试试,我也不能重现,只能靠你们能重现的,找解决办法了。

mokeyish avatar Dec 09 '22 06:12 mokeyish

似乎跟pdf-engine的调用有关,用的miktex,另一个插件pandoc plugin导出,如果缺少宏包会跳出miktex,这个插件不会。主要pandoc plugin不能用${vaultDir}这种,还不能多配置,不太适合我。

暂时可以先导出成html之类的,再打印成pdf

joezhouchenye avatar Dec 09 '22 07:12 joezhouchenye

似乎跟pdf-engine的调用有关,用的miktex,另一个插件pandoc plugin导出,如果缺少宏包会跳出miktex,这个插件不会。主要pandoc plugin不能用${vaultDir}这种,还不能多配置,不太适合我。

暂时可以先导出成html之类的,再打印成pdf

就是说导出 html 是正常的,是么?我当初加 html 导出,也是因为导出 pdf 不能很好的显示 gif 动画,分享给同事就不太好,但导出 html 的话,gif 动画就可以正常显示了。

mokeyish avatar Dec 09 '22 08:12 mokeyish

html正常的,就是xelatex调用的问题,打开调试可以看到出错。

image

Environment HOME is not set.

貌似Obsidian里调用的cmd无法获取系统的环境变量?

Pandoc Plugin貌似调用方式不一样,他的调试Console里没有cmd: 加pandoc命令这样的显示,是直接插件给的信息

joezhouchenye avatar Dec 13 '22 05:12 joezhouchenye

@joezhouchenye 抱歉,一直没注意到你的消息,xelatex 需要 HOME 环境变量吗? 我加上了。

mokeyish avatar Mar 17 '23 15:03 mokeyish

有空再试试,虽然感觉不会再这么用了,直接自带的导出算了。

之前是想参考文献啥的,pandoc可以,还写了obsidian格式转换的filter啥的。

现在觉得太麻烦了,还不能实时看到效果,用回了vscode,把md文件放obsidian库里管理一样,没必要纠结。

joezhouchenye avatar Mar 18 '23 05:03 joezhouchenye

Currently, the --pdf-engine can be typst, typst is easy to install. (The latest pandoc is required)

图片

mokeyish avatar May 06 '23 16:05 mokeyish