Tag Info

New answers tagged

1

I found recently an alternative using the minted package with pygmentize. The inconvenient is that it is not a fully LaTeX solution. \documentclass{article} \usepackage[margin=2cm]{geometry} \usepackage{textcomp} \usepackage{minted} \begin{document} \begin{minted}{make} .SUFFIXES: .inc .f .f90 .F # all CPP processed fortran files have the extension ...


2

There is no one duplicate of your question, though most parts of the answer can be found in other questions, such as How do I add syntax coloring to my C++ source code in beamer Lyx is ignoring typewriter font setting for program listings When you do Insert --> Program Listing, or Insert --> File --> Child document --> Program listing, LyX uses the ...


4

The easiest thing to do here is to declare all digits as "letters" and define all your keywords with the keywords key alone, eschewing the otherkeywords key completely: \documentclass[12pt]{article} \usepackage{xcolor} \usepackage{listings} \renewcommand{\ttdefault}{pcr} \definecolor{Black}{gray}{0.0} \definecolor{Blue}{rgb}{0.12,0.29,0.53} \lstset{ ...



Top 50 recent answers are included