Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on pygments.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://anggtwu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://anggtwu.net/e/pygments.e>
#           or at <http://anggtwu.net/e/pygments.e.html>.
#        See also <http://anggtwu.net/emacs.html>,
#                 <http://anggtwu.net/.emacs[.html]>,
#                 <http://anggtwu.net/.zshrc[.html]>,
#                 <http://anggtwu.net/escripts.html>,
#             and <http://anggtwu.net/>.
#
#######





# «.debian»			(to "debian")
# «.pygments»			(to "pygments")
# «.full»			(to "full")
# «.fancyvrb»			(to "fancyvrb")
# «.mypygments.sh»		(to "mypygments.sh")
# «.styles»			(to "styles")
# «.pygments-pip3»		(to "pygments-pip3")

(find-es "minted" "git")




#####
#
# debian
# 2024apr28
#
#####

# «debian»  (to ".debian")
# (find-status   "python-pygments-doc")
# (find-vldifile "python-pygments-doc.list")
# (find-udfile   "python-pygments-doc/")
# (find-udfile   "python-pygments-doc/html/")
# (find-status   "python-pygments")
# (find-vldifile "python-pygments.list")
# (find-udfile   "python-pygments/")
# (find-status   "python3-pygments")
# (find-vldifile "python3-pygments.list")
# (find-udfile   "python3-pygments/")
# file:///usr/share/doc/python-pygments-doc/html/index.html




#####
#
# pygments
# 2020dec24
#
#####

# «pygments»  (to ".pygments")
# (find-es "tex" "minted")
# http://pypi.python.org/pypi/Pygments
# https://pygments.org/
# https://pygments.org/languages/

# (find-man "1 pygmentize")

# (find-sh "pygmentize -h")
# (find-sh "pygmentize -h" "[-o <outfile>] [<infile>]")
# (find-sh "pygmentize -h" "The -L option")

# (find-sh "pygmentize -h" "-H <type> <name>")
# (find-sh "pygmentize -h" "The -H option")
# (find-sh "pygmentize -H lexer lua")
# (find-sh "pygmentize -H lexer lean")
# (find-sh "pygmentize -H formatter html")
# (find-sh "pygmentize -H formatter html" "With the `full` option")
# (find-sh "pygmentize -H formatter latex")
# (find-sh "pygmentize -H formatter latex" "With the `full` option")

# (find-sh "pygmentize -L")
# (find-sh "pygmentize -L lexers")
# (find-sh "pygmentize -L formatters")
# (find-sh "pygmentize -L styles")
# (find-sh "pygmentize -L filters")
# (find-sh "pygmentize -L" "* lean:")
# (find-sh "pygmentize -L" "* lua:")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/pygments/")
rm -Rv /tmp/pygments/
mkdir  /tmp/pygments/
cd     /tmp/pygments/
cp -v ~/LUA/8queens.lua .
cp -v ~/LEAN/luatree1.lean .
pygmentize                         -o 8queens.lua.html 8queens.lua
pygmentize -O full                 -o 8queens.lua.html 8queens.lua
pygmentize -O full -P style=autumn -o 8queens.lua.html 8queens.lua
pygmentize -O full               -o luatree1.lean.html luatree1.lean

# file:///tmp/pygments/8queens.lua.html
# file:///tmp/pygments/luatree1.lean.html

# (find-angg "LUA/8queens.lua")
# (find-angg "LEAN/luatree1.lean")

# (find-fline "/tmp/pygments/8queens.lua.html")
# (find-fline "/tmp/pygments/luatree1.lean.html")





#####
#
# -O full
# 2024apr28
#
#####

# «full»  (to ".full")
# (find-sh "pygmentize -H formatter html")
# (find-sh "pygmentize -H formatter html" "With the `full` option")
# (find-sh "pygmentize -H formatter latex")
# (find-sh "pygmentize -H formatter latex" "With the `full` option")
# (find-sh "pygmentize -H formatter latex" "`envname`")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/pygments/")
rm -Rv /tmp/pygments/
mkdir  /tmp/pygments/
cd     /tmp/pygments/
cp -v ~/LEAN/luatree1.lean .
pygmentize -O full               -o luatree1.lean.html luatree1.lean
pygmentize -O full,cssfile=a.css -o luatree1.lean.html luatree1.lean
laf

pygmentize -O full -o luatree1.lean.tex luatree1.lean
lualatex              luatree1.lean.tex
# (find-fline    "/tmp/pygments/")
# (find-pdf-page "/tmp/pygments/luatree1.lean.pdf")
# (find-pdf-text "/tmp/pygments/luatree1.lean.pdf")

pygmentize         -o luatree1.lean.tex luatree1.lean


# file:///tmp/pygments/8queens.lua.html
# file:///tmp/pygments/luatree1.lean.html

# (find-angg "LUA/8queens.lua")
# (find-angg "LEAN/luatree1.lean")

# (find-fline "/tmp/pygments/")
# (find-fline "/tmp/pygments/8queens.lua.html")
# (find-fline "/tmp/pygments/luatree1.lean.html")
# (find-fline "/tmp/pygments/luatree1.lean.html")
# (find-fline "/tmp/pygments/luatree1.lean.tex" "\\begin{Verbatim}")




#####
#
# fancyvrb
# 2024apr28
#
#####

# «fancyvrb»  (to ".fancyvrb")
# (find-es "tex" "fancyvrb")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/pygments/")
rm -Rv /tmp/pygments/
mkdir  /tmp/pygments/
cd     /tmp/pygments/

cp -v ~/LEAN/luatree1.lean .

pygmentize -O full -o luatree1.lean.full.tex luatree1.lean
lualatex              luatree1.lean.full.tex

# (find-fline    "/tmp/pygments/")
# (find-fline    "/tmp/pygments/luatree1.lean.full.tex")
# (find-pdf-page "/tmp/pygments/luatree1.lean.full.pdf")
# (find-pdf-text "/tmp/pygments/luatree1.lean.full.pdf")

# Extract the defs
cat luatree1.lean.full.tex | gawk '
  /makeatletter/ { out = 1 }
  out == 1       { print }
  /makeatother/  { out = 0 }
' | tee luatree1.lean.defs.tex

# Generate just a Verbatim block
pygmentize         -o luatree1.lean.mini.tex luatree1.lean

cat > luatree1.lean.outer.tex <<'---'
\documentclass{article}
\usepackage{fancyvrb}
\usepackage{color}
\usepackage[utf8]{inputenc}
\begin{document}
  \input luatree1.lean.defs.tex
  \input luatree1.lean.mini.tex
\end{document}
---

lualatex luatree1.lean.outer.tex
# (find-fline "/tmp/pygments/")
# (find-fline "/tmp/pygments/luatree1.lean.outer.tex")
# (find-pdf-page "/tmp/pygments/luatree1.lean.outer.pdf")
# (find-pdf-text "/tmp/pygments/luatree1.lean.outer.pdf")




# Incomplete!



pygmentize         -o luatree1.lean.mini.tex luatree1.lean
pygmentize -O full -o luatree1.lean.full.tex luatree1.lean
lualatex              luatree1.lean.full.tex

# (find-es "awk" "between")
cat luatree1.lean.full.tex | gawk '
  /makeatletter/ { out = 1 }
  out == 1       { print }
  /makeatother/  { out = 0 }
' | tee luatree1.lean.defs.tex




pygmentize         -o luatree1.lean.mini.tex luatree1.lean

pygmentize         -o luatree1.lean.tex luatree1.lean




#####
#
# mypygments.sh
# 2024apr28
#
#####

# «mypygments.sh»  (to ".mypygments.sh")
# (find-angg "bin/mypygments.sh" "extractdefs")
# (find-angg "bin/mypygments.sh" "outertex")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
. ~/bin/mypygments.sh; # (find-angg "bin/mypygments.sh")
rm -Rv /tmp/pygments/
mkdir  /tmp/pygments/
cd     /tmp/pygments/

STEM=luatree2
cp -v ~/LEAN/${STEM}.lean .

echo pygmentize -O full -o ${STEM}.lean.full.tex  ${STEM}.lean
     pygmentize -O full -o ${STEM}.lean.full.tex  ${STEM}.lean
     pygmentize -O full -o ${STEM}.lean.full.html ${STEM}.lean


# (find-fline "/tmp/pygments/")



outertex A B







#####
#
# styles
# 2024apr28
#
#####

# «styles»  (to ".styles")
# https://stackoverflow.com/questions/62546404/how-to-use-dracula-theme-as-a-style-in-pygments
# https://tex.stackexchange.com/questions/482623/custom-pygments-styles-in-minted-not-taking-effect
# https://pygments.org/docs/styles/
# https://pygments.org/docs/styledevelopment/

# (find-sh "locate autumn.py")
# (find-fline "/usr/lib/python3/dist-packages/pygments/styles/")
# (find-fline "/usr/lib/python3/dist-packages/pygments/styles/autumn.py")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/pyg-styles/")
rm -Rv /tmp/pyg-styles/
mkdir  /tmp/pyg-styles/
cd     /tmp/pyg-styles/

# (find-fline "~/MAXIMA/myqdraw3.mac")
ORIGFNAME=$HOME/MAXIMA/myqdraw3.mac
ORIGFNAME0=myqdraw3.mac

STYLES=( abap algol algol_nu arduino autumn borland bw colorful
  default emacs friendly fruity igor inkpot lovelace manni monokai
  murphy native paraiso_dark paraiso_light pastie perldoc rainbow_dash
  rrt sas solarized stata_dark stata_light tango trac vim vs xcode )

f () { pygmentize -O full -P style=$1 -o $ORIGFNAME0.$1.html $ORIGFNAME; }

cd     /tmp/pyg-styles/
for i in $STYLES; do echo $i; f $i; done

# Error: Could not find style class 'Paraiso_DarkStyle' in style module.
# Error: Could not find style class 'Paraiso_LightStyle' in style module.
# Error: Could not find style class 'SolarizedStyle' in style module.
# Error: Could not find style class 'Stata_DarkStyle' in style module.
# Error: Could not find style class 'Stata_LightStyle' in style module.

f algol
f fruity
f monokai

# file:///tmp/pyg-styles/myqdraw3.mac.fruity.html
# file:///tmp/pyg-styles/myqdraw3.mac.monokai.html




#####
#
# pygments-pip3
# 2024apr28
#
#####

# «pygments-pip3»  (to ".pygments-pip3")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pip3 install Pygments

# (find-pip3-links "Pygments")

# (find-sh "pip3 show Pygments")
# (find-importlib-links "pygments")
# (find-pypi-links      "Pygments")




https://oremacs.com/2014/12/24/light-it-up/
https://pygments.org/docs/lexerdevelopment/







#  Local Variables:
#  coding:               utf-8-unix
#  End: