cpp2html

convert source code to syntax highlighted document

Install

All systems
curl cmd.cat/cpp2html.sh
Debian Debian
apt-get install source-highlight
Ubuntu
apt-get install source-highlight
Arch Arch Linux
pacman -S source-highlight
image/svg+xml Kali Linux
apt-get install source-highlight
CentOS
yum install source-highlight
Fedora
dnf install source-highlight
Windows (WSL2)
sudo apt-get update sudo apt-get install source-highlight
OS X
brew install source-highlight
Raspbian
apt-get install source-highlight

source-highlight

convert source code to syntax highlighted document

This program, given a source file, produces a document with syntax highlighting. It supports syntax highlighting for over 100 file formats, including major programming languages, markup formats, and configuration file formats. For output, the following formats are supported: HTML, XHTML, LaTeX, Texinfo, ANSI color escape sequences, and DocBook.