【问题标题】:Sphinx: Linking a Lexer with a style sheet using pygmentsSphinx:使用 pygments 将 Lexer 与样式表链接起来
【发布时间】:2013-05-13 20:04:55
【问题描述】:

晚上好,

假设我在 pygments 中使用内置的 java 词法分析器来突出显示 sphinx 文档中代码块的语法。如何更改与 java lexer 关联的样式表。 (即我想更改突出显示的单词的颜色)。

提前致谢!

【问题讨论】:

    标签: python python-sphinx lexer pygments


    【解决方案1】:

    只需将 pygments_style 设置指向您的自定义 pygments 样式类。另请参阅how to 编写自定义 pygments 样式类。

    理论上应该可行 - 不过我自己还没有尝试过。

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-08
      • 2018-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-08
      • 1970-01-01
      • 2017-10-21
      相关资源
      最近更新 更多