少女祈祷中...

尝试在obsidian上将md文件导出为pdf遇到的问题, 以及相关的解决方案.

markdown to pdf

尝试在obsidian上将md文件导出为pdf, 发现文字的颜色被设置成了白色.

于是尝试通过命令行来完成. 下载了相关转换器.
https://stackoverflow.com/questions/17630486/how-to-convert-a-markdown-file-to-pdf

1
sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra
1
2
pandoc MANUAL.txt -o example13.pdf
pandoc MANUAL.md -o example13.pdf

尝试转换文件
报错

1
2
3
4
5
Error producing PDF.
! LaTeX Error: Unicode character 控 (U+63A7)
not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.

稍微搜索了一下解决方案. 有非常麻烦的方案, 也有比较简单的.

打算先尝试一下简单的方案, 毕竟对这件事的需求没那么搞. 麻烦的事情之后再做好了.

https://blog.csdn.net/m0_47696151/article/details/124322754

https://gist.github.com/kevinclcn/c10764725a7a46153a8bbef091aedf48

https://forum-zh.obsidian.md/t/topic/16783

最终什么方法都没有采用. 因为发现把obsidian的主题换成light就可以正常工作了. 所以干脆就没折腾这些东西.
需要转换PDF的场景也不经常遇到. 遇到的时候再转换主题吧.