In English:
The C++ code has proper colors viewed in Obsidian, yet when I export it to PDF all colors turned grey. I’ve tried some plugins like pandoc when exporting yet they all lead to the same result. Plus, the colors also turn grey when exported to HTML or .doc through pandoc.
Screenshot in Obsidian:
In Chinese if there’s someone to help me:
C++代码块在Obsidian中是彩色的,但是导出为PDF后全部变成了灰色。试着使用了诸如Pandoc的第三方插件也没有用,并且Pandoc导出的HTML和.doc中代码都是灰色的。上面分别是在Obsidian和导出的PDF中的截图。
本人初学C++,代码写得很烂,勿cue。