Does anyone have/know of a style file for the listings package which would enable the correct syntax highlighting of cmake files in LaTeX?

closed as unclear what you're asking by jub0bs, Peter Jansson, Claudio Fiandrino, Jesse, Martin Schröder Mar 2 '14 at 12:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    The minted manual says it supports all languages that Pygments does, which includes CMake. I know this doesn't answer the question, just pointing out an alternative. – Psirus Jan 11 '13 at 15:14
  • As @Psirus mentioned, you can try minted. If you are not satisfied and want to try it out with listings then try to copy the style of the one minted outputs into your listings cmake language environment with your own modifications. – hpesoj626 Jan 12 '13 at 3:33
  • @Psirus: I think you comment is also an answer. Of course an alternative one. – Marco Daniel Mar 9 '13 at 17:52
  • @MarcoDaniel I've added an alternative answer. – Psirus Mar 10 '13 at 17:04
  • @Psirus: +1 ;-) – Marco Daniel Mar 10 '13 at 17:05

This does not answer your question specifically, but it is possible to pretty print CMake lists using the minted package. Here an example using the CMakeLists.txt from the Lua Programming Language.




CMake Example

Not the answer you're looking for? Browse other questions tagged or ask your own question.