Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on groff, troff, nroff, etc.
#
# 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://angg.twu.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://angg.twu.net/e/groff.e>
#           or at <http://angg.twu.net/e/groff.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######






# «.groff-debian»	(to "groff-debian")
# «.groff-from-git»	(to "groff-from-git")
# «.mom»		(to "mom")
# «.manpage_via_groff»	(to "manpage_via_groff")
# «.groff»		(to "groff")





#####
#
# groff on debian
# 2019may11
#
#####

# «groff-debian» (to ".groff-debian")
# (find-zsh "installeddebs | sort | grep groff")
# (find-zsh "availabledebs | sort | grep groff")
# (find-status   "groff")
# (find-vldifile "groff.list")
# (find-udfile   "groff/")
# (find-status   "groff-base")
# (find-vldifile "groff-base.list")
# (find-udfile   "groff-base/")
# (find-node "(groff)Top")
# (find-man "1 man" "info groff")




#####
#
# groff-from-git
# 2019may11
#
#####

# «groff-from-git» (to ".groff-from-git")
# https://en.wikipedia.org/wiki/Groff_(software)
# https://git.savannah.gnu.org/git/groff.git/
# https://gnu.org/software/groff/




#####
#
# mom
# 2021jan22
#
#####

# «mom»  (to ".mom")
# (find-man "mom")
# (find-status   "groff-base")
# (find-vldifile "groff-base.list")
# (find-udfile   "groff-base/")
# (find-status   "groff")
# (find-vldifile "groff.list")
# (find-udfile   "groff/")
# (find-udfile "groff-base/examples/mom/")
# (find-udfile "groff-base/examples/mom/README.txt")
# (find-udfile "groff-base/html/mom/")
# (find-man "1 pdfmom")
# (find-man "7 groff_mom")

;; (find-fline "/usr/share/doc/groff-base/examples/mom/")
;; (find-pdf-page "/usr/share/doc/groff-base/examples/mom/mom-pdf.pdf.gz")





#####
#
# Making a manpage (I gave up this in favor of pod, see below)
# 99sep??
#
#####

# «manpage_via_groff»  (to ".manpage_via_groff")
# (find-es "debiandev" "writing_pods")

# (find-fline "~/.zshrc" "man2t")
# (find-vldifile "groff.list")
# (find-fline "/usr/doc/groff/")
# (eeman "groff_man")
# (eeman "colcrt")
# (eeman "col")

man --help

cd /tmp/
man -Tascii groff_man > groff_man
# col -b < groff_man > groff_man.txt
colcrt groff_man > groff_man.txt
man -Tascii troff | colcrt > /tmp/troff.txt
man -Tascii 7 man | colcrt > /tmp/7man.txt

# (find-fline "/tmp/groff_man.txt")
# (find-fline "/tmp/troff.txt")
# (find-fline "/tmp/7man.txt")

groff -Tps -man < /usr/lib/deb-make/debian/manpage.1.ex > /tmp/manpage.ps
gv /tmp/manpage.ps &

man -Tps 7 man > /tmp/7man.ps
gv /tmp/7man.ps &

# (find-fline "/usr/lib/deb-make/debian/manpage.1.ex")
# (find-fline "/tmp/manpage.ps")

# (find-fline "/usr/share/groff/tmac/tmac.an")
# (find-fline "/usr/share/groff/tmac/tmac.andoc")

apti manpages-dev
# (find-vldifile "manpages-dev.list")
# (find-fline "/usr/doc/manpages-dev/")

# (find-fline "/usr/doc/mktclapp/")
# (find-fline "/usr/doc/mktclapp/quickref.html")
# (find-fline "~/debian/mktclapp/m.1")
# (find-fline "/usr/man/man7/undocumented.7.gz")
# (find-fline "/usr/man/man1/gcc.1.gz")
# (find-fline "/usr/man/man7/man.7.gz")

lynx $LH/cgi-bin/man2html





#####
#
# groff
# 99oct??
#
#####

# «groff»  (to ".groff")
pdsc /big/slinks2/dists/slink/main/source/text/groff_1.11a-7.dsc
cd /usr/src/groff-1.11a/
etags troff/{*.cc,*.h}

# (code-c-d "grof" "/usr/src/groff-1.11a/")
# (find-groffile "")
# (find-groffile "tmac/")
# (find-groffile "tmac/tmac.an")
# (find-groffile "tmac/tmac.e")
# (find-groffile "tmac/tmac.s")
# (find-groffile "tmac/tmac.safer")
# (find-groffile "tmac/tmac.trace")
# (find-groffile "tmac/tmac.tty")
# (find-groffile "tmac/tmac.tty-char")


#
# To understand tmac.an:
#

# (defun find-tcom (n &rest lixo) (eeman "troff" n))
# (defun find-tcom (n &rest lixo) (find-fline "/tmp/troff.txt" n))
# (defun find-trofs (f s) (find-groffile (format "troff/%s" f) (format "\"%s\"" s)))

man -Tascii troff | col -b > /tmp/troff.txt

cd /usr/src/groff-1.11a/troff/
# for i in *.cc *.h; do getstrings < $i; done | sort > ogss
for i in *.cc *.h; do echo "\n\n  __ $i\n"; getstrings < $i; done > ogs
awk '/__/ { file = $2 }
     NF==1 && /^\.?[A-Za-z]+$/ {
       # printf "(find-groffile \"troff/%s\" \"\\\"%s\\\"\")\n", file, $1
       printf "(find-trofs \"%s\" \"%s\")\n", file, $1
     } ' \
  < ogs > ogsa

# (find-groffile "troff/ogs")
# (find-groffile "troff/ogsa")
# (find-fline "/tmp/troff.txt")

# (find-groffile "tmac/tmac.an")

lynx $S/http/www.kohala.com/~rstevens/troff/troff.html

$S/http/plan9.bell-labs.com/7thEdMan/vol2/troff.bun
$S/http/plan9.bell-labs.com/7thEdMan/vol2/trofftut.bun

cd /tmp
rm -Rv troff
mkdir troff
cd /tmp/troff/
sh $S/http/plan9.bell-labs.com/7thEdMan/vol2/troff.bun
# (find-fline "/tmp/troff/")
# (find-fline "/tmp/troff/tprint")
groff -Tascii -me add
groff -Tascii -mm m0
groff -Tascii -me add
groff -Tascii -me add
groff -Tascii -me add
groff -Tascii -me add
groff -Tascii -me add






# (find-fline "~/.zshrc" "heredoc")
# (find-zshfile "")
# (find-zshfile "Src/builtin.c" "to start a new option parse")


strace-to ~/s man -Tascii troff

rm -v /tmp/grotty /tmp/o
cd /tmp/
heredoc grotty -m 0777 <<'---'
#!/bin/sh
tee /tmp/o | /usr/bin/grotty
---
laf


PATH=/tmp:$PATH man -Tascii 2 undocumented > u






strace -f -etrace=open,fork,execve,wait4 -o ~/s man -Tascii 2 undocumented
strace -f -etrace=fork,execve,wait4 -o ~/s man -Tascii 2 undocumented

# (find-fline "~/s")

grep -v '\-1 E' s | egrep -v 'wait4|resume|exited|fork'








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