Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
5  
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
show 1 more comment

closed as unclear what you're asking by Jubobs, Peter Jansson, Claudio Fiandrino, Jesse, Martin Schröder Mar 2 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.

1 Answer

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.

\documentclass{scrartcl}

\usepackage{minted}

\begin{document}
\inputminted{cmake}{CMakeLists.txt}
\end{document}

CMake Example

share|improve this answer
add comment

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