[latex] Code highligting in Latex

Example how to bind highliting in Latex: \documentclass{article} \usepackage{color} \usepackage{listings} \usepackage{textcomp} \usepackage{setspace} \usepackage{palatino} \renewcommand{\lstlistlistingname}{Code Listings} \renewcommand{\lstlistingname}{Code Listing} \definecolor{gray}{gray}{0.5} \definecolor{green}{rgb}{0,0.5,0} \lstnewenvironment{python}[1][]{ \lstset{ language=python, basicstyle=\ttfamily\small\setstretch{1}, stringstyle=\color{red}, showstringspaces=false, alsoletter={1234567890}, otherkeywords={\ , \}, \{}, […]

Beitrag lesen →