Install elpa-htmlize by entering the following commands in the terminal:
sudo apt update sudo apt install elpa-htmlize
Description:
convert buffer text and decorations to HTML
This package converts the buffer text and the associated decorations to HTML. It supports three types of HTML output, selected by setting htmlize-output-type: css, inline-css (optimized for code snippets), and font (simpler output, doesn't rely on CSS). You can also use htmlize from your Emacs Lisp code.
Homepage: https://github.com/hniksic/emacs-htmlize
Version: 1.51-1
Section: universe/lisp