Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts for TeX-related things.
#
# 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.
#
# 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/tex.e>
#           or at <http://angg.twu.net/e/tex.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/>.
#
#######



# «.index»
# «.docs»		(to "docs")
# «.minimal»		(to "minimal")
# «.source2e»		(to "source2e")
# «.source2e.dvi»	(to "source2e.dvi")
# «.equation-numbers»	(to "equation-numbers")
# «.texbook»		(to "texbook")
# «.mfbook»		(to "mfbook")
# «.ps-720dpi»		(to "ps-720dpi")
# «.latex2html»		(to "latex2html")
# «.pstoimg»		(to "pstoimg")
# «.dtx2dvi»		(to "dtx2dvi")
# «.kpathsea»		(to "kpathsea")
# «.stmaryrd»		(to "stmaryrd")
# «.testfont»		(to "testfont")
# «.testfontcmds»	(to "testfontcmds")
# «.testfont.tex»	(to "testfont.tex")
# «.mf_X»		(to "mf_X")
# «.mf_X.1»		(to "mf_X.1")
# «.mf_X.2»		(to "mf_X.2")
# «.metapost-old»	(to "metapost-old")
# «.metapost»		(to "metapost")
# «.tetex-bin»		(to "tetex-bin")
# «.weaving»		(to "weaving")
# «.leo_moura_eev»	(to "leo_moura_eev")
# «.babel»		(to "babel")
# «.portug-hyph»	(to "portug-hyph")
# «.gftype»		(to "gftype")
# «.gftodvi»		(to "gftodvi")
# «.bbold_and_rsfs»	(to "bbold_and_rsfs")
# «.arabtex»		(to "arabtex")
# «.pic_manual»		(to "pic_manual")
# «.xdvi-gz»		(to "xdvi-gz")
# «.xdvi-pid»		(to "xdvi-pid")
# «.rail»»		(to "rail")
# «.src2tex»		(to "src2tex")
# «.auctex»		(to "auctex")
# «.twocolumn»		(to "twocolumn")
# «.show_and_tracing»	(to "show_and_tracing")
# «.show_box_dims»	(to "show_box_dims")
# «.smash»		(to "smash")
# «.indices»		(to "indices")
# «.tatsutaproof»	(to "tatsutaproof")
# «.bussproofs»		(to "bussproofs")
# «.ptproof-old»	(to "ptproof-old")
# «.ptproof»		(to "ptproof")
# «.texcad»		(to "texcad")
# «.arrow.tex»		(to "arrow.tex")
# «.picture_mode»	(to "picture_mode")
# «.thin_supset»	(to "thin_supset")
# «.begin»		(to "begin")
# «.realcalc»		(to "realcalc")
# «.tex-br»		(to "tex-br")
# «.LaTeX-demo»		(to "LaTeX-demo")
# «.cmsy10_scaled»	(to "cmsy10_scaled")
# «.bibtex»		(to "bibtex")
# «.makebbl»		(to "makebbl")
# «.TOCs»		(to "TOCs")
# «.mytoc»		(to "mytoc")
# «.enlarge-pool_size»	(to "enlarge-pool_size")
# «.fraktur»		(to "fraktur")
# «.newbox»		(to "newbox")
# «.prime-bug»		(to "prime-bug")
# «.ignoring»		(to "ignoring")
# «.makeindex»		(to "makeindex")
# «.greek»		(to "greek")
# «.ThesisPUC»		(to "ThesisPUC")
# «.texdoc»		(to "texdoc")
# «.ite»		(to "ite")
# «.psfonts»		(to "psfonts")
# «.pstricks-old»	(to "pstricks-old")
# «.pstricks»		(to "pstricks")
# «.cartao-claudia»	(to "cartao-claudia")
# «.png_screenshots»	(to "png_screenshots")
# «.cv-packages»	(to "cv-packages")
# «.cv»			(to "cv")
# «.currvita»		(to "currvita")
# «.currvitaedrx»	(to "currvitaedrx")
# «.TEXINPUTS»		(to "TEXINPUTS")
# «.dvipng»		(to "dvipng")
# «.tetex-and-texlive»	(to "tetex-and-texlive")
# «.fontdimen»		(to "fontdimen")
# «.quote»		(to "quote")
# «.quotation»		(to "quotation")
# «.verse»		(to "verse")
# «.running-TeX-show»	(to "running-TeX-show")
# «.tesemestr»		(to "tesemestr")
# «.framebox»		(to "framebox")
# «.dags»		(to "dags")
# «.figure-and-caption»	(to "figure-and-caption")
# «.miniforth.bib»	(to "miniforth.bib")
# «.magnification-in-tex»	(to "magnification-in-tex")
# «.magnification-in-latex»	(to "magnification-in-latex")
# «.dvi2dvi»		(to "dvi2dvi")
# «.savebox»		(to "savebox")
# «.indentfirst»	(to "indentfirst")
# «.verbatim»		(to "verbatim")
# «.smallmatrix»	(to "smallmatrix")
# «.inputenc»		(to "inputenc")
# «.weaving-tex.web»	(to "weaving-tex.web")
# «.latex-general»	(to "latex-general")
# «.leavevmode»		(to "leavevmode")
# «.texbytopic»		(to "texbytopic")
# «.color»		(to "color")
# «.bicolorhbox»	(to "bicolorhbox")
# «.protect»		(to "protect")
# «.psnfss-avant-garde»	(to "psnfss-avant-garde")
# «.ovals»		(to "ovals")
# «.xfig»		(to "xfig")
# «.eepic»		(to "eepic")
# «.tac.cls»		(to "tac.cls")
# «.demobox»		(to "demobox")
# «.matrix»		(to "matrix")
# «.math-atoms»		(to "math-atoms")
# «.lshort»		(to "lshort")
# «.left-quote-double-hat»	(to "left-quote-double-hat")
# «.message»		(to "message")
# «.newlinechar»	(to "newlinechar")
# «.debugging-diagxy»	(to "debugging-diagxy")
# «.cmtt-and-cmttb»	(to "cmtt-and-cmttb")
# «.math-lists»		(to "math-lists")






#####
#
# some docs
# 2000oct02
#
#####

# «docs»  (to ".docs")
# (to "texbook")
# (to "xdvi-gz")
# (find-angg ".zshrc" "zxdvi")
# (find-vldifile "tetex-doc.list")
# (find-vldifile "tetex-src.list")
#
#   texbook:   p.427=438 font charts
#              p.434=445 symbol commands
#   essential: p.20      huge table of symbols commands (<- use this)
#   amsguide:  p.20=21   symbol commands
#
#   amsldoc:   many examples of ams math mode

# (find-angg "X")
# export DISPLAY=:0.0
xdvi +438 $SCTAN/systems/knuth/tex/texbook.dvi &
xdvi +445 $SCTAN/systems/knuth/tex/texbook.dvi &
zxdvi /usr/share/doc/texmf/latex/general/essential.dvi.gz +20 &
xdvi /usr/share/doc/texmf/amstex/amsguide.dvi.gz         +21 &
zxdvi /usr/share/doc/texmf/latex/amslatex/amsldoc.dvi.gz  +10 &

gv   /usr/share/doc/texmf/generic/xypic/xyrefer.ps.gz &
gv   /usr/share/doc/texmf/generic/xypic/xyguide.ps.gz &
xdvi /usr/share/texmf/source/generic/xypic/doc/xyrefer.dvi &
xdvi /usr/share/texmf/source/generic/xypic/doc/xyguide.dvi &

xdvi $SCTAN/systems/knuth/mf/mfbook.dvi &
gv /usr/share/doc/texmf/metapost/base/mpman.ps.gz &

zxdvi /usr/share/doc/texmf/latex/base/cfgguide.dvi.gz &
zxdvi /usr/share/doc/texmf/latex/base/clsguide.dvi.gz &
zxdvi /usr/share/doc/texmf/latex/base/fntguide.dvi.gz &
zxdvi /usr/share/doc/texmf/latex/base/usrguide.dvi.gz &
zxdvi /usr/share/doc/texmf/latex/general/guide.dvi.gz &


# The paths below this point are not yet potatoized, and I need to
# rewrite the e-scripts that generate testmath.dvi and source2e.dvi...

xdvi /usr/lib/texmf/source/latex/amslatex/math/testmath.dvi &

# (find-knuthfile "tex/texbook.tex" 25862)
# xdvi /usr/lib/texmf/texmf/doc/ams/amslatex/testmath.dvi &

# Source2e:
xdvi /usr/lib/texmf/source/latex/base/source2e.dvi &
# and its index...
# (find-lsrcfile "base/source2e.tex")
# (find-lsrcfile "base/source2e.ind")
cd /usr/lib/texmf/source/latex/base/
agrep '\{part\}...hspace' source2e.toc

xdvi $SCTAN/systems/knuth/tex/texbook.dvi &
#
# (find-fline "$SCTAN/systems/knuth/mf/mfbook.tex")
# (find-fline "$SCTAN/systems/knuth/tex/texbook.tex")
# (find-web2cfile "tex/tex.web")
# (find-web2cfile "mf/mf.web")
# (find-knuthfile "tex/index.tex")

# (find-fline "/usr/doc/texmf/latex/amslatex/testmath.tex.gz")
# (find-fline "/usr/lib/texmf/source/latex/amslatex/math/testmath.tex")
# (find-fline "/usr/share/texmf/source/latex/guide/essential.tex")
# (find-fline "/usr/share/texmf/source/latex/guide/essential2e.tex")

# xdvi /usr/lib/texmf/texmf/doc/latex/general/guide.dvi &
# xdvi /usr/lib/texmf/texmf/doc/latex/general/l2kurz.dvi &

# (find-node "(latex)Top")
xdvi /usr/lib/texmf/texmf/doc/latex/general/latex2e.dvi &
# (find-lshfile "lshort2e.tex")
xdvi /usr/lib/texmf/texmf/doc/latex/general/lshort2e.dvi &
xdvi /usr/lib/texmf/texmf/doc/latex/base/fntguide.dvi &

cd /usr/lib/texmf/texmf/doc/ams/amslatex/
latex testmath.tex
latex testmath.tex
latex testmath.tex

xdvi /snarf/ftp/ftp.dcs.qmw.ac.uk/pub/tex/contrib/pt/proofs/prooftree-doc.dvi &

# amsldoc has many examples of ams math mode.
#
xdvi /usr/lib/texmf/texmf/doc/ams/amslatex/amsldoc.dvi &
xdvi /usr/lib/texmf/texmf/doc/ams/amslatex/instr-l.dvi &
xdvi /usr/lib/texmf/texmf/doc/ams/amstex/amsguide.dvi &

# amsfndoc has font charts at the end.
xdvi /usr/lib/texmf/texmf/doc/ams/amsfonts/amsfndoc.dvi &
xdvi /usr/lib/texmf/texmf/doc/ams/amsfonts/amsfonts.dvi &
xdvi /usr/share/doc/texmf/fonts/amsfonts/eufrak.dvi.gz &
xdvi /usr/share/doc/texmf/fonts/amsfonts/euscript.dvi.gz &

# Install the LaTeX2e texinfo docs, to be accessed with, e.g.:
# (find-node "(latex)Top")
#
cd /usr/lib/texmf/source/info/
makeinfo latex2e.texi
mv -v latex latex-* /usr/info/

locate '/usr/*.dvi' | sort

# 2008jun07:
# amsldoc and instr-l are broken...
# (find-dvipage  "/usr/share/doc/tetex-doc/amstex/amsguide.dvi.gz")
# (find-xpdfpage "/usr/share/doc/tetex-doc/latex/amsmath/amsldoc.pdf.gz")
# (find-fline    "/usr/share/doc/tetex-doc/latex/amsmath/amsldoc.pdf.gz")
# (find-xpdfpage "/usr/share/doc/tetex-doc/latex/amscls/instr-l.pdf.gz")
# (find-fline    "/usr/share/doc/tetex-doc/latex/amscls/instr-l.pdf.gz")




#####
#
# A minimal LaTeX file
# 2000oct31
#
#####

# «minimal»  (to ".minimal")
#*
cd /tmp/
cat > ltest.tex <<'---'
\documentclass{book}
\begin{document}
Hello
\end{document}
---
latex ltest.tex
xdvi ltest.dvi &
#*




#####
#
# TeXing testmath (potato)
# 2000oct31
#
#####

# «testmath»  (to ".testmath")
#*
cd ~/tmp/
rm -v testmath.{aux,log,dvi}
zcat /usr/share/doc/texmf/latex/amslatex/testmath.tex.gz > testmath.tex
# cp /usr/share/texmf/source/latex/amslatex/math/testmath.tex .
latex testmath.tex
latex testmath.tex
latex testmath.tex
#*
xdvi ~/tmp/testmath.dvi &
xdvi +29 ~/tmp/testmath.dvi &

# (find-fline "~/tmp/testmath.tex")





#####
#
# source2e.tex (generating a dvi doc for the LaTeX base files)
# 00oct04
#
#####

# «source2e»  (to ".source2e")
# (find-lsrcfile "base/texpert.txt" "print the LaTeX source")
# (find-lsrcfile "base/texpert.txt" "To typeset a documented code file")
# (find-lsrcfile "base/source2e.tex" "to produce a fully indexed source code")
#*
# (find-fline "/tmp/texsrc/latex/base/source2e.ind")
# (find-fline "/tmp/texsrc/latex/base/source2e.ind" "\\put")

cd /tmp/texsrc/latex/base/
grep '{part}' source2e.toc \
  | sed 's/\\hspace {1em}/ /g' \
  | sed 's/\\contentsline {part}{\(.*\)}{\(.*\)}/\2	\1/g'

#*




####
#
# typesetting source2e.dvi
# 2004jan27
#
####

# «source2e.dvi»  (to ".source2e.dvi")
# (find-angg ".emacs" "source2e")
# (find-angg ".emacs" "source2e-parts")
# (find-lsrcfile "base/manifest.txt")
# (find-lsrcfile "base/texpert.txt" "How to print the LaTeX source")
# (find-lsrcfile "base/texpert.txt" "source2e.tex")
# (find-lsrcfile "base/")

# (code-c-d "latexsrc" "~/usrc/latex/base/")
# (defun find-source2epage (n &rest r) (find-dvipage "~/usrc/latex/base/source2e.dvi" n))
# (find-source2epage (+ 9 487) "Index")
# (find-latexsrcfile "")
#*
rm -Rv   ~/usrc/latex/base/
mkdir -p ~/usrc/latex/base/
cd /usr/share/texmf-tetex/source/latex/base/
cp -v *  ~/usrc/latex/base/
cd       ~/usrc/latex/base/

# (find-lsrcfile "base/source2e.tex" "latex source2e.tex")
latex source2e.tex
makeindex -s source2e.ist source2e.idx
makeindex -s gglo.ist -o source2e.gls source2e.glo
latex source2e.tex
latex source2e.tex	|& tee ols
pdflatex source2e.tex   |& tee opls

#*
# (code-c-d "source2e" "~/usrc/latex/base/")
# (code-dvi       "source2e" "~/usrc/latex/base/source2e.dvi")
# (code-pdftotext "source2e" "~/usrc/latex/base/source2e.pdf")
# (find-source2efile "")
# (find-source2epage 1)
# (find-source2etext)

# (find-man "1 dvipdf")
# (find-node "(dvips)Option summary")
# dvipdf source2e.dvi source2e.pdf    |& tee odvipdf
#
# dvips: Font tcrm1000 not found, characters will be left blank.
# dvips: Font ecrm1000 at 8000 not found; scaling 600 instead.
# dvips: Such scaling will generate extremely poor output.
# dvips: Font tcbx1000 not found, characters will be left blank.

# (code-c-d "ulsrc" "~/usrc/latex/base/" :xdvi)
# (find-ulsrcxdvi "source2e.dvi")
# (find-ulsrcfile "ltlists.dtx")
# (find-ulsrcxdvi "source2e.dvi" (+ 9 245))

#*
# (find-latexsrcfile "source2e.tex" "\\DocInclude{ltdirchk}")
# (find-latexsrcfile "ltxdoc.dtx" "\\section{DocInclude}")
# (find-latexsrcfile "ltxdoc.dtx" "\\section{DocInclude}" "\\thepart=")

#*
# Jumping from index entries to source lines
# (find-latexsrcfile "source2e.ind")
# (find-source2epage (+ 9 487) "Index")
# (find-latexsrcfile "source2e.toc")

cd ~/usrc/latex/base/
grep '{part}' source2e.toc | grep hspace | tee .parts0

# (find-latexsrcfile ".parts0")
# \contentsline {part}{a\hspace {1em}ltdirchk.dtx}{1}

lua50e '
  for line in io.lines(".parts0") do
    _, __, c, fname, page = string.find(line, "{part}{(.).-{1em}(.-)}{(.-)}")
    if _ then
      print(string.format("\"%s\" %-14s %3s", c, "\""..fname.."\"", page))
    end
  end
' | tee .parts

#*
cd ~/usrc/latex/base/
latex doc.dtx
latex doc.dtx
latex doc.dtx
#*
;; (find-latexsrcfile ".parts")




#####
#
# Putting equation numbers in parts of a diagram
# 2004jan28
#
#####

# «equation-numbers»  (to ".equation-numbers")
# (source2e-ind "ttfamily equation")
# (find-source2e "")
# (find-source2e "ltmath.dtx")

\@definecounter{equation}
\def\equation{$$\refstepcounter{equation}}
\def\endequation{\eqno \hbox{\@eqnnum}$$\@ignoretrue}

%*
% (eelatex-bounded)
\makeatletter

\begin{equation} a \end{equation}
\begin{equation} b \end{equation}
%
\refstepcounter{equation}
%
\begin{equation} c \end{equation}
$$ d \eqno                 $$
$$ e \eqno \hbox{\@eqnnum} $$
$$ f       \hbox{\@eqnnum} $$
$$ g                       $$
\begin{equation} h \end{equation}

%*





#####
#
# more on jumping to source lines in .dtx files
# 2004jan27
#
#####

(find-source2e "doc.dtx")

(find-source2e "doc.dtx" 17)
(find-dvipage (ee-latexsrcfile "doc.dvi") 14)

(find-source2e "doc.dtx" 100)
(find-dvipage (ee-latexsrcfile "doc.dvi") 18)

(find-source2e "doc.dtx" 151)
(find-dvipage (ee-latexsrcfile "doc.dvi") 20)

;; Na linha 152 a gente já se ferra:
;; tem umas linhas "%" começando na margem...
(find-source2e "doc.dtx" 151 "\\begin{macrocode}\n%")
(find-source2e "doc.dtx" 152)
(find-dvipage (ee-latexsrcfile "doc.dvi") 20)

;; Depois ainda tem truques com catcodes:
(find-source2e "doc.dtx" 152 "^^A")
(find-source2e "doc.dtx" 152 "\\catcode`\\%=12")


(find-source2e "doc.dtx" 1 "four spaces between the |%|")
(progn
  (find-latexsrcfile "doc.dtx")
  (ee-isearch-re "%    \\\\\\(begin\\|end\\){macrocode\\*?}\n")
)

# (find-elnode "Selective Display")
# (find-elnode "Invisible Text")









(source2e-tofname "a")
(source2e-tofname "doc.dtx")

# (find-elnode "Regexp Search" "Command: re-search-forward")
# (find-elnode "Regexp Special" "matches only at the end of a line")


(progn
  (find-source2e "doc.dtx" 1)
  (re-search-forward "\n\\([^%]\\|$\\|%<\\)" nil nil 2))

  (find-source2e "doc.dtx" 1)


(= 1 (length "c"))

(defun source2e-file (c) (interactive "sPart: ")
  (let* ((fname (second (member c source2e-parts-list)))
	 (fullfname (ee-latexsrcfile fname)))
    (find-fline fullfname)))

(defun source2e-part (c) (interactive "sPart: ")
  (let* ((page (third (member c source2e-parts-list)))
	 (realpage (+ 9 page))
	 (dvifname (ee-latexsrcfile "source2e.dvi")))
    (find-dvipage dvifname realpage)))

;; (source2e-file "C")
;; (source2e-part "C")





# (find-latexsrcfile "source2e.ind")
# (find-latexsrcfile "")

# (find-latexsrcfile "source2e.aux")
# (find-latexsrcfile "source2e.log")
# (find-latexsrcfile "source2e.tex")





ols

# (find-latexsrcfile "manifest.txt")




# Index:
# (find-lsrcfile "base/source2e.ind")
cd /usr/lib/texmf/source/latex/base/
agrep '\{part\}...hspace' source2e.toc

# Compiling:
cd /usr/lib/texmf/source/latex/base/
latex source2e.tex
makeindex -s source2e.ist source2e.idx
makeindex -s gglo.ist -o source2e.gls source2e.glo
latex source2e.tex
latex source2e.tex	|& tee ols

xdvi /usr/lib/texmf/source/latex/base/source2e.dvi &

# Índice das seções:

# (find-lsrcfile "base/ols")
# (find-pl5pod "var" "undef $/;")
cd /usr/lib/texmf/source/latex/base/
grep -v '^\*' ols | perl -e '
  undef $/; $ols = <STDIN>;
  $i = 0;
  @letras = split(//, " abdefghiklmnopqrstuwyzABCDEFGHIJKLMNO  ");
  # @letras = split(//, " abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNO  ");
  while ($ols =~ m/\(([a-z0-9.]*)[ \n]\[([0-9]*)\]/g) {
    # print "$1 $2\n";
    printf "%1s %12s %3d\n", $letras[$i++], $1, $2;
  }
' | tee olss

grep 'part.*hspace' source2e.toc
grep 'part.*hspace' source2e.toc | cut -b 22,30,36- |
  perl -nle 'm/^(.*?)\}/ && print $1' | tee oletras






latex classes.dtx

export DISPLAY=:0.0
xdvi /usr/lib/texmf/source/latex/base/source2e.dvi &
xdvi /usr/lib/texmf/source/latex/base/classes.dvi &

# verbatim: p.212=221.
# (find-lsrcfile "base/ltmiscen.dtx" 564)

# (find-fline "/usr/lib/texmf/texmf/tex/plain/base/plain.tex" 42)
# (find-fline "/usr/lib/texmf/texmf/tex/plain/base/plain.tex" 1231)




#####
#
# .dtx -> .dvi in the general case
#
#####

# «dtx2dvi»  (to ".dtx2dvi")
# (find-w3 "/usr/doc/texmf/help/faq/uktug-faq/texfaq_3.html#QU32" ".dtx files")

# (find-lsrcfile "base/docstrip.dtx" 179)
# (find-lsrcfile "base/docstrip.dtx" 932)
# (find-lsrcfile "base/docstrip.ins")
# (find-lsrcfile "base/docstrip.ins" 166)
# (find-lsrcfile "base/doc.dtx" "abstract")
# (find-lsrcfile "base/ltxdoc.dtx" 82)

cd /usr/lib/texmf/source/latex/base/
latex docstrip.ins
makeindex -s docstrip.ist docstrip.aux

cat <<'EOF' | latex |& tee ol
\def\batchfile{keywords.ins}
\input docstrip.tex
\generateFile{keywords.ist}{f}{\from{keywords.dtx}{index}}
\endinput
EOF

# (find-fline "/usr/lib/texmf/source/latex/progkeys/keywords.dtx" 9)
# (find-fline "/usr/lib/texmf/source/latex/progkeys/keywords.dtx" 478)
# (find-fline "/usr/lib/texmf/source/latex/progkeys/Makefile.tetex")
# (find-fline "/usr/lib/texmf/source/latex/progkeys/keywords.ins" 43)
#
cd /usr/lib/texmf/source/latex/progkeys/
#
cat <<'EOF' | latex |& tee ol
\def\batchfile{keywords.ins}
\input docstrip.tex
\generateFile{keywords.drv}{f}{\from{keywords.dtx}{driver}}
\generateFile{keywords.sty}{f}{\from{keywords.dtx}{style}}
\generateFile{keywords.ist}{f}{\from{keywords.dtx}{index}}
\endinput
EOF
#
latex keywords.drv
latex keywords.drv
latex keywords.drv
makeindex -s keywords.ist keywords.idx
latex keywords.drv

# AFAIremember, the general case doesn't work.





#####
#
# Babel: using portuguese
# 2001feb05
#
#####

# «babel»  (to ".babel")
# (to "portug-hyph")

# (find-sh "locate babel")
# (find-dvipage "/usr/share/doc/tetex-doc/generic/babel/tb1202.dvi.gz")
# (find-dvipage "/usr/share/doc/tetex-doc/generic/babel/tb1401.dvi.gz")
# (find-dvipage "/usr/share/doc/tetex-doc/generic/babel/tb1604.dvi.gz")
# (find-dvipage "/usr/share/doc/tetex-doc/generic/babel/user.dvi.gz")

zxdvi /usr/doc/texmf/generic/babel/user.dvi.gz +20
zxdvi /usr/doc/texmf/generic/babel/tb1202.dvi.gz +5
zxdvi /usr/doc/texmf/generic/babel/tb1401.dvi.gz
zxdvi /usr/doc/texmf/generic/babel/tb1604.dvi.gz

# (find-fline "/etc/texmf/language.dat" "change the active language")
# (find-fline "/usr/share/texmf/tex/generic/babel/")
# (find-fline "/usr/share/doc/texmf/generic/babel/")
# (find-texmfsrcgenfile "babel/")
# (find-texmfsrcgenfile "babel/language.skeleton" "file is read as an option")
# (find-texmfsrcgenfile "babel/babel.dtx" "subsection{Multiple languages}")
# (find-texmfsrcgenfile "babel/portuges.dtx")
# (find-texmfsrcgenfile "babel/portuges.dtx" "Lopt{brazil}")
# (find-texmftexgenfile "babel/portuges.ldf")

# (find-fline "/usr/doc/texmf/generic/babel/")
# (find-fline "/usr/doc/texmf/generic/babel/announce.txt" "otherlanguage")
# (find-angg "LATEX/tese2.sty")

# Example of usage (syntax only, without text to hyphenate):
#*
cd /tmp/
cat > tmp.tex <<'---'
\documentclass{book}
\usepackage[cp850]{inputenc}
\usepackage[brazilian,english]{babel}
\begin{document}
...
% Redundant because brazilian is the first option to babel:
\selectlanguage{brazilian}
...
\begin{otherlanguage}{english}
...
\end{otherlanguage}
...
\end{document}
---
latex tmp.tex
#*




#####
#
# Portuguese hyphenation
# 2000oct04
#
#####

# «portug-hyph»  (to ".portug-hyph")
# Allowing portuguese hyphenation:
# (find-fline "/etc/texmf/language.dat" "portuges")
/usr/bin/texconfig init |& tee ~/o
# (find-fline "~/o")

# Reference?





#####
#
# getting a CTAN subdirectory (pstricks)
#
#####

cd $CTAN/graphics/
wget ftp://ftp.rge.com/pub/tex/graphics/pstricks.tar.gz

cd $CTAN/graphics/
rm -Rv pstricks
tar -xvzf pstricks.tar.gz
gzip -dv $(find pstricks)

mkdir -p $CTAN/fonts/
cd       $CTAN/fonts/
wget ftp://ftp.rge.com/pub/tex/fonts/ascii.tar.gz
mkdir -p $CTAN/fonts/utilities/
cd       $CTAN/fonts/utilities/
wget 	ftp://ftp.rge.com/pub/tex/fonts/utilities/a2ac.tar.gz	\
	ftp://ftp.rge.com/pub/tex/fonts/utilities/ega2mf.tar.gz
mkdir -p $CTAN/help/Catalogue/
cd       $CTAN/help/Catalogue/
wget 	ftp://ftp.rge.com/pub/tex/help/Catalogue/catalogue.html.gz	\
	ftp://ftp.rge.com/pub/tex/help/Catalogue/ctfull.html.gz	\
	ftp://ftp.rge.com/pub/tex/help/Catalogue/ctindex.html

ps2mf
mff-29
MF-PS
metafont-for-beginners

moredefs
morehelp
phonet
picins
proofs
pslatex
pstotext
rail
rlepsf
rmpage
rsfs
saferef
schedule
semantic
showlabels
simpsons
smallcap
sobolev
startex
stmaryrd
subeqn
subeqnarray
subfigure
swift
syngen
syntonly
tensor
theorem
thumb
time
times
tipa
titleref
twg-list
typehtml
uniqleaf
varioref
verbatim
word2x
wsuipa
xr
xspace





#####
#
# Proofing a font (old)
#
#####

# (to "gftodvi")

cd /MP
mf cmr10
gftodvi cmr10.2602gf

export DISPLAY=:0.0
xdvi -p 300 cmr10.dvi

# The gray font is broken by default, so
# take a look at missfont.log (on the current directory) and

MakeTeXPK gray 600 600 1+0/600 ljfour

# It is trying to produce a gray font for an "imagen". What is it?

# (find-fline "/usr/lib/texmf/texmf/fonts/source/public/misc/gray.mf")
# (find-fline "/usr/lib/texmf/texmf/ls-R")
# (find-fline "/usr/lib/texmf/texmf/metafont/misc/")
# (find-fline "/usr/lib/texmf/texmf/metafont/misc/modes.mf" 869)
# (find-fline "/usr/bin/MakeTeXPK" 104)
# (find-fline "/usr/lib/texmf/texmf/metafont/misc/modes.mf" 1591)
# (find-fline "/usr/lib/texmf/texmf/metafont/misc/modes.mf" 2303)

(write-heredoc "~/MP/grayljfour.mf")
if mode<>ljfour: errmessage "This file is for ljfour only"; fi
rep=5; boolean large_pixels;
font_identifier "GRAYLJFOUR";
input grayf
EOF

cd ~/MP/
rm /var/lib/texmf/fonts/pk/ljfour/gnu/raleigh/grayljfour.600pk
MakeTeXPK grayljfour 600 600 1+0/600 ljfour

# Quem decide o diretório do pk? E o tfm novo, é sempre escrito? Como
# a fonte vai mudar muito eu quero apagar sempre o tfm velho. Onde ele
# está?




#####
#
# psfrag
#
#####

# (find-fline "/usr/lib/texmf/source/latex/psfrag/announce.txt" "overlay")
# (find-zsh "dmissing psfrag")
# (find-fline "/usr/share/texmf-tetex/source/latex/psfrag/announce.txt")
# (find-fline "/usr/share/texmf-tetex/source/latex/psfrag/pfgguide.tex")





#####
#
# Kpathsea search
# 2004jan21
#
#####

# «kpathsea»  (to ".kpathsea")
# (find-angg "LATEX/dout/")
# (find-angg "LATEX/dout/Makefile")

# (find-node "(kpathsea)Default expansion")
# (find-node "(kpathsea)Top")
# (find-node "(kpathsea)Slow path searching")
# (find-node "(kpathsea)Debugging")
# (find-node "(kpathsea)Debugging" "KPATHSEA_DEBUG")
# (find-node "(kpathsea)Filename database")

# (find-fline "/usr/share/texmf/web2c/" "texmf.cnf")
# (find-fline "/etc/texmf/texmf.cnf")

# How can I make emacs use kpathsea to get the full path for a filename?
# (find-sh  "kpsewhich --help")
# (find-sh0 "kpsewhich -n tex tex epsf.tex")
# (find-sh "KPATHSEA_DEBUG=-1 kpsewhich -n tex tex epsf.tex")
# (find-sh "KPATHSEA_DEBUG=63 kpsewhich -n tex tex epsf.tex")





#####
#
# kpathsea debugging
#
#####

# (find-node "(kpathsea)Debugging")
# TeX finds the lilypond .texs but LaTeX doesn't.
#
export KPATHSEA_DEBUG=63
tex '\input lilyponddefs'   |& tee ot
latex '\input lilyponddefs' |& tee ol
#
# I guess the .texs are being installed at the wrong place (in my system).
#
# kdebug:  before expansion = $KPSE_DOT:$TEXMFS/tex{/plain,/generic,}//
# kdebug:  before expansion = $KPSE_DOT:$TEXMFS/tex/{latex,latex209,generic}//
#
# (find-fline "/usr/lib/texmf/texmf.cnf" 62)

Eu copiei o diretório /usr/lib/texmf/texmf/..lily.. para um lugar
acessivel pelo latex e rehasheei.

(find-lilyfile "bin/make-website.pl")
(find-lilyfile "bin/out/make-website" 88)
(find-lilyfile "bin/out/make-website" 114)
(find-lilyfile "bin/out/make-website" 157)
(find-lilyfile "input/wtk1-fugue2.ly")
(find-lilyfile "input/wtk1-fugue2.ly")
(find-lilyfile "Documentation/out/wtk1-fugue2.ly.txt")





#########
#
# ega2mf
#
#########

cd /usr/src/
rm -Rv ega2mf
tar -xvzf $CTAN/fonts/utilities/ega2mf.tar.gz
cd ega2mf
gzip -dv *
gcc -o ega2mf ega2mf.c
gcc -o vga2mf vga2mf.c

# (find-fline "/c5/home/BUP/PROgLOJA/vga437t.mf")
# (find-fline "/c5/home/BUP/PROgLOJA/vga437t0.mf")
# (find-fline "/c5/home/BUP/PROgLOJA/vga850.mf")
# (find-fline "/c5/home/BUP/PROgLOJA/vgasqdot.mf")

# Name of the .gf file: <jobname>.<resolution>gf; MFbook p.324, MFprog
# block 1164.
#
# p.277 (find-knuthfile "mf/mfbook.tex" "|screenchars|.")
# (find-fline "/usr/lib/texmf/texmf/metafont/base/plain.mf" "z@#")

## Eu modifiquei o vga2mf à beça, ele não tem mais pickups, usa chars
## 8x8 e isso é o header novo:

% This is vga850.mf generated by vga8tomf from /home/replace/ega1.8.
if unknown cmbase: input cmbase fi
mode_setup;
def generate suffix t= enddef;
input cmtt10; font_setup;
if ligs>1: font_coding_scheme:="TeX text";
else: font_coding_scheme:=if ligs=0: "TeX typewriter text"
  else: "TeX text without f-ligatures" fi; fi

def corner(expr row,col) =
  ((col/8)[0, 9u],
   (row/8)[body_height, -desc_depth])
enddef;
def crt(expr row,col) =
  numeric x[],y[];
  z0=corner(row,col);
  z1=corner(row+1,col+1);
  fill (x0,y0)--(x0,y1)--(x1,y1)--(x1,y0)--cycle;
enddef;

## Todas as outras coisas importantes foram parar dentro de uma
## Makefile:

SRCDIR = /usr/lib/texmf/texmf/fonts/source/vga
PKDIR  = /var/lib/texmf/fonts/pk/ljfour/unknown/unknown
PK600  = $(PKDIR)/vga850.600pk

vga8tomf: vga8tomf.c
	gcc -o vga8tomf vga8tomf.c

vga850.mf: vga8tomf
	vga8tomf /home/replace/ega1.8 vga850.mf

font0:
	-rm -Rv  $(SRCDIR)
	-mkdir -p $(SRCDIR)
	cd       $(SRCDIR)/
	#
	-rm -v $(SRCDIR)/vga850.mf
	-ln -s ~/LATEX/vga850.mf $(SRCDIR)/vga850.mf
	texhash

fonttfm:
	-rm -Rv /usr/lib/texmf/texmf/fonts/tfm/public/vga
	-mkdir  /usr/lib/texmf/texmf/fonts/tfm/public/vga
	-rm -v  /var/lib/texmf/fonts/tfm/unknown/unknown/vga850.tfm
	MakeTeXTFM vga850

clearpks:
	-rm -v $(PKDIR)/vga850*pk

btype:
	mf '\mode:=ljfour; mag:=1; scrollmode; input vga850b'
	gftype -i vga850b.600gf

$(PK600): vga850.mf
	-rm -v $(PK600)
	MakeTeXPK vga850 600 600 1.0

font600: $(PK600)

##
##

# (find-fline "/usr/lib/texmf/texmf/fonts/source/vga/vga850.mf")
# (find-fline "~/LATEX/vga850.mf")
# (find-fline "$CTAN/systems/knuth/mf/mfbook.tex" "^@beginchar@")





######
#
# stmaryrd
# 2000oct01
#
######

#*
# «stmaryrd»  (to ".stmaryrd")
# (find-status "tetex-nonfree")
# (find-vldifile "tetex-nonfree.list")
# (find-vldifile "tetex-nonfree.list" "stmary")
# (find-fline "/usr/doc/tetex-nonfree/")
# (find-fline "/usr/share/texmf/tex/latex/misc/stmaryrd.sty")
# (find-fline "/usr/share/texmf/tex/latex/misc/stmaryrd.sty" "bindnasrepma")

cd /usr/share/doc/texmf/latex/styles/
zcat stmaryrd.dvi.gz > /tmp/stmaryrd.dvi
xdvi /tmp/stmaryrd.dvi &

#*
# 2006sep24:
# (find-zsh "dmissing stmaryrd")
# (find-dvipage "/usr/share/doc/tetex-doc/latex/stmaryrd/stmaryrd.dvi.gz")
# (find-status   "tetex-extra")
# (find-vldifile "tetex-extra.list")
# (find-udfile   "tetex-extra/")
# (find-fline "/usr/share/texmf-tetex/source/latex/stmaryrd/stmaryrd.sty")
# (find-fline "/usr/share/texmf-tetex/tex/latex/stmaryrd/stmaryrd.sty")





#####
#
# testfont
# 2000oct01
#
#####

# «testfont»  (to ".testfont")
# First a quick way to get descriptions for many chars:
cd /usr/share/texmf/fonts/source/
agrep cmchar $(find * -name '*.mf') | tee ~/o
# (find-fline "~/o")
# (find-fline "~/o" "linear logic")

#*
# Now testfont itself.
# (find-knuthfile "mf/mfbook.tex" "The last line of |testfont| is")
# (find-fline "/usr/share/texmf/tex/plain/base/testfont.tex")

cat > $EEG <<'---'
\let\noinit! \input testfont.tex
\def\fontname{bbmbx10}\startfont\table
\def\fontname{stmary10}\startfont\table
\def\fontname{msam10}\startfont\table
\bye
---
cd /tmp/
eeg tex
xdvi testfont.dvi &
#*

cd /tmp/
tex '\let\noinit! \input testfont.tex'\
    '\def\fontname{bbmbx10}\startfont\table'\
    '\def\fontname{stmary10}\startfont\table'\
    '\def\fontname{msam10}\startfont\table'\
    '\bye'
xdvi testfont.dvi &
#*

cd /tmp/
tex '\let\noinit! \input testfont.tex'\
    '\def\Test#1{\def\fontname{#1}\startfont\table}'\
    '\Test{bbmbx10}'\
    '\Test{stmary10}'\
    '\Test{msam10}'\
    '\bye'
xdvi testfont.dvi &

#*
# «testfontcmds»  (to ".testfontcmds")
# (find-angg ".zshrc" "testfontcmds")

function testfontcmds () {
  echo -nE '\let\noinit! \input testfont.tex'
  for i in $*; do
    echo -nE '\def\fontname{'$i'}\startfont\table'
  done
  echo -E '\bye'
}
cd /tmp/
tex "$(testfontcmds bbmbx10 stmary10)"

#*
tex "$(testfontcmds wasy10 ccmi10)"; rexdvi /tmp/testfont.dvi
testfont wasy10 ccmi10

testfont xccam10 xccbm10 xccex10 xccmi10 xccsy10 cccsc10 ccmi10 \
  ccmic9 ccr10 ccsl10 ccslc9 ccti10




#####
#
# testfont.tex (another approach)
# 2008jun21
#
#####

# «testfont.tex»  (to ".testfont.tex")
# (find-angg ".emacs" "find-testfont")
# (find-mfbookpage (+ 13 336))
# (find-mfbookfile "mfbook.tex" "testfont.tex")
# (find-mfbooktext "testfont.tex ")
# (find-plainsrcfile "testfont.tex")

* (eepitch-tex)
* (eepitch-kill)
* (eepitch-tex)
\let\noinit!
\input testfont
\def\Test#1{\def\fontname{#1}\startfont\table}
\def\newpage{\vfill\break}
\Test{bbm10}
\newpage
\Test{bbold10}
\bye

# (find-dvipage "/tmp/texput.dvi")
# (find-efunction 'eev)



function dvifonts-l () { dvitype -output-level=1 $1 | grep fntdef }
function dvifonts () { dvifonts-l $* | cut -d' ' -f 4- }


  (eev eelatex-eevscript nil)
  (format "eelatex: wrote %s and %s" ee-file-tex ee-file))


  (ee-write-with-nl s e "" "" altfile)





#####
#
# gftype
# 2000oct01
#
#####

# «gftype»  (to ".gftype")
# (eeman "gftype")
# With "-i" gftype will show the bitmaps for the font (in ascii)!
#*

cd /tmp/
mf '\mode:=ljfour; mag:=1/2; nonstopmode; input stmary10'
gftype -i stmary10.300gf > o
# (find-fline "/tmp/o")
#*

# (find-fline "/etc/texmf/modes.mf" "one pixel one point")





#####
#
# gftodvi
# 2000oct01
#
#####

# «gftodvi»  (to ".gftodvi")
# (eeman "gftodvi")
# (find-knuthfile "mf/mfbook.tex" "beginchapter Appendix H. Hardcopy Proofs")
# But by doing like this we still don't get labels:
#*
cd /tmp/
mf '\mode:=ljfour; mag:=4; nonstopmode; input stmary10'
gftodvi stmary10.2400gf
xdvi    stmary10.dvi &

cd /tmp/
mf '\mode:=ljfour; mag:=4; nonstopmode; input cmr10'
gftodvi cmr10.2400gf
xdvi    cmr10.dvi &

#*
# (find-knuthfile "mf/mfbook.tex" "proofing:=2")
# Just setting "proofing" doesn't change much:
cd /tmp/
mf '\mode:=ljfour; mag:=4; proofing:=2; nonstopmode; input cmr10'
gftodvi cmr10.2400gf
xdvi    cmr10.dvi &

# By using "mode:=proof" we get everything: labels, equations and grids.
cd /tmp/
mf '\mode:=proof; nonstopmode; input stmary10'
gftodvi stmary10.2602gf
xdvi    stmary10.dvi &
#*


# How do I make mf (i.e., mfw) display every char?
# (find-knuthfile "mf/mfbook.tex" "if displaying>0:")





#####
#
# blackboard bold and rsfs
# 2000oct07 / 2008mar04
#
#####

# «bbold_and_rsfs»  (to ".bbold_and_rsfs")
# (find-dn4ex "edrx08.sty" "bbold")
# (find-symbolspage 46)
# (find-fline "/usr/share/texmf-tetex/tex/latex/amsfonts/amsfonts.sty")
# (find-fline "/usr/share/texmf-tetex/tex/latex/amsmath/amstex.sty")
# (find-fline "/usr/share/texmf-tetex/tex/latex/bbm/bbm.sty")
# (find-fline "/usr/share/texmf-tetex/tex/latex/bbold/bbold.sty")
# (find-angg ".zshrc" "testfontcmds")
# (find-zsh0 "cd /tmp/; tex \"$(testfontcmds bbm10 bbold10)\"")
# (find-dvipage "/tmp/testfont.dvi")

cd /usr/lib/texmf/fonts
find | grep bb

#*
cd /tmp/
tex '\let\noinit! \input testfont.tex'\
    '\def\Test#1{\def\fontname{#1}\startfont\table}'\
    '\Test{bbm10}'\
    '\Test{bbold10}'\
    '\Test{bbmbx10}'\
    '\Test{rsfs10}'\
    '\bye'
xdvi testfont.dvi
#*

# (find-fline "/usr/share/texmf/doc/latex/jknappen/")
# (find-fline "/usr/share/texmf/doc/latex/jknappen/mathbbol.rme")
# (find-fline "/usr/share/texmf/doc/latex/jknappen/mathrsfs.rme")
# (find-fline "/usr/share/texmf/fonts/source/jknappen/sauter/")
# (find-fline "/usr/share/texmf/tex/latex/jknappen/")
# (find-fline "/usr/share/texmf/fonts/source/public/bbold/")
# (find-fline "/usr/share/texmf/tex/latex/misc/bbold.sty")
# (find-fline "/usr/share/texmf/source/latex/bbm/")
# (find-fline "/usr/share/texmf/source/latex/bbm/bbm.dtx")
# (find-fline "/usr/share/texmf/tex/latex/bbm/")

cd /usr/lib/texmf/
find * -type f | sort > .files
agrep -i 'blackboard bold' $(grep dtx .files)

# (find-fline "/usr/share/texmf/source/latex/amsfonts/amsfonts.dtx")
# (find-fline "/usr/share/texmf/source/latex/amsfonts/euscript.dtx")
# (find-fline "/usr/share/texmf/source/latex/psnfss/mathtime.dtx")

# (find-fline "$SCTAN/systems/knuth/tex/texbook.tex" 25862)

#*
cd /tmp/
cat > bb.tex <<'---'
\nonstopmode\tracingonline1\makeatletter
\documentclass{book}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathrsfs}
\begin{document}
$\mathbb{RIC}\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\show\mathbb
\end{document}
---
latex bb.tex
dvifonts bb.dvi
#*
xdvi /tmp/testfont.dvi
#*





######
#
# 720dpi fonts
#
######

# (find-fline "/var/spool/texmf/")
# (find-fline "/var/spool/texmf/ls-R")

# (find-fline "/var/spool/texmf/pk/cx/")
# (find-fline "/var/spool/texmf/pk/cx/public/cm/")
# (find-fline "/var/spool/texmf/pk/ljfour/public/cm/")

rm /var/spool/texmf/pk/cx/public/cm/cmr10.300pk
rm /var/spool/texmf/pk/ljfour/public/cm/cmr10.600pk

rm /var/spool/texmf/pk/ljfour/public/cm/cmr10.600pk
cd ~/LATEX/
strace-to ~/s xdvi -geometry +240+0  99feb11.dvi |& tee ~/o

cut -b 7- ~/s | sort | uniq
cut -b 7- ~/s | sort | uniq | getstrings | sort | uniq |& tee ~/o2
find $(grep '^/' ~/o2) -type f -maxdepth 0 > ~/o3
agrep -l ljfour $(<~/o3)

# (find-fline "/usr/bin/mktexpk" "ljfour")
# (find-fline "/usr/lib/texmf/web2c/mf.base")

/etc/texmf/modes.mf
/usr/lib/texmf/metafont/misc/modes.mf

# (find-node "(kpathsea)Top")
# (find-node "(kpathsea)mktex configuration")

# (find-fline "/var/spool/texmf/pk/cx/")
/usr/lib/texmf/web2c/texmf.cnf


agrep ljfour $(locate mktex)

# (find-fline "/etc/texmf/mktex.cnf")
# (find-fline "/usr/bin/mktexlsr")
# (find-fline "/usr/bin/mktexmf")
# (find-fline "/usr/bin/mktexpk")
# (find-fline "/usr/bin/mktextfm")
# (find-fline "/usr/lib/texmf/web2c/mktex.cnf")
# (find-fline "/usr/lib/texmf/web2c/mktex.opt" "ljfour")
# (find-fline "/usr/lib/texmf/web2c/mktexdir")
# (find-fline "/usr/lib/texmf/web2c/mktexdir.opt")
# (find-fline "/usr/lib/texmf/web2c/mktexnam")
# (find-fline "/usr/lib/texmf/web2c/mktexnam.opt")
# (find-fline "/usr/lib/texmf/web2c/mktexupd")


# (find-node "(bash)Bourne Shell Builtins" "`:'")
# (find-node "(bash)Shell Parameter Expansion")




kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 cmr10
mktexpk: Running mf \mode:=ljfour; mag:=1+0/600; nonstopmode; input cmr10


kpathsea: Running mktexpk --mfmode / --bdpi 720 --mag 1+0/720 --dpi 720 cmr10
mktexpk: Mismatched mode ljfour and resolution 720; ignoring mode.
mktexpk: Can't guess mode for 720 dpi devices.
mktexpk: Use a config file, or update me.
kpathsea: Appending font creation commands to missfont.log.
dvips: Font cmr10 at 720 not found; scaling 600 instead.
dvips: Such scaling will generate extremely poor output.




#####
#
# ctan mirrors
#
#####

# (find-fline "/usr/doc/texmf/help/ctan/CTAN.sites.gz")

mynetselect $(
  gzip -cd /usr/doc/texmf/help/ctan/CTAN.sites.gz |
    grep '^  [a-z]' |
    awk '{print tolower($1)}'
)

# (find-fline "~/o2")


# Para FCTAN=ftp://ctan.tug.org/tex-archive :
psne $FCTAN/ls-lR.gz
#
cd $SCTAN
gzip -dv ls-lR.gz
~/ICON/lslR2find -1 < ls-lR | cut -b0-8,21- > ls-lR.i

# (find-fline "$SCTAN/ls-lR.i")

psne $FCTAN/macros/tip.tgz
cd $SCTAN/macros/
tar -xvzf tip.tgz




#####
#
# TeX in practice
# 99nov01
#
#####

# «tip»
# (code-c-d "tip" "$SCTAN/macros/tip/")
# (find-tipfile "" "boxing")
#
# (find-tipfile "boxing7.tip")
# (find-tipfile "boxing6.tip")
# (find-tipfile "box-zero.tip")
# (find-tipfile "boxing5.tip")
# (find-tipfile "box-bul.tip")
# (find-tipfile "box-bb.tip")
# (find-tipfile "box-thck.tip")
# (find-tipfile "vcentx.tip")

# (find-tipfile "inputd.tip")

#*
cd $SCTAN/macros/tip/
cp -v boxing7.tip boxing6.tip box-zero.tip boxing5.tip box-bul.tip \
  box-bb.tip box-thck.tip vcentx.tip ~/LATEX/

cd $SCTAN/macros/tip/
zip /tmp/tip.zip boxing7.tip boxing6.tip box-zero.tip boxing5.tip \
  box-bul.tip box-bb.tip box-thck.tip vcentx.tip
laf /tmp/tip.zip

#*
cd ~/LATEX/
cat > tmp.tex <<'---'
\def\wlog#1{}
\def\InputD#1{\input #1}
\input boxing7.tip

a\HboxR{bcd}e
\bye
---
tex tmp.tex
xdvi -s 2 tmp.dvi
#*





#####
#
# ethiop
#
#####

# (find-available "ethiop")
# (find-vldifile "ethiop.list")
# (find-fline "/usr/doc/ethiop/")

cd /usr/doc/ethiop/
gzip -dv *
latex ethiodoc.tex
latex ethiodoc.tex
latex ethiodoc.tex
xdvi ethiodoc.dvi



#####
#
# arabtex
# 2001oct23
#
#####

# «arabtex»  (to ".arabtex")
# (find-available "perspic-texts")
# (find-available "arabtex")

# (find-status "arabtex")
# (find-vldifile "arabtex.list")
# (find-fline "/usr/doc/arabtex/")

# (code-c-d "arabtexdoc" "/usr/share/doc/texmf/arabtex/")
# (code-c-d "arabtexdoc" "/tmp/arabtex-doc/")
# (find-arabtexdocfile "")

#*
rm -Rv /tmp/arabtex-doc/
mkdir  /tmp/arabtex-doc/
cp -iv /usr/share/doc/texmf/arabtex/* /tmp/arabtex-doc/
cd     /tmp/arabtex-doc/
gzip -dv *.gz
latex arabdoc.tex	|& tee ol

#*
# (find-dvipage "/tmp/arabtex-doc/arabdoc.dvi" (+ 2 36))
# (find-arabtexdocfile "")
# (find-arabtexdocfile "arabdocd.tex")
# (find-arabtexdocfile "arabdoce.tex")

cd /tmp/arabtex-doc/
xdvi +38 arabdoc.dvi &
#*





#####
#
# The pic manual
#
#####

# «pic_manual»  (to ".pic_manual")

gv $S/http/cm.bell-labs.com/cm/cs/cstr/116.ps
# But gv is not happy...
# (find-es "ps" "gv_psheaders")

# (find-fline "$S/http/cm.bell-labs.com/cm/cs/cstr/116.ps")
# (find-node "(gawk)If Statement")

(
echo "116.ps:\n"
awk '{if ($0 ~ /^%/) {print $0; c=0} else {if (c==0) {print ""; c=1}}}' \
  < $S/http/cm.bell-labs.com/cm/cs/cstr/116.ps
# echo "\n\n\ntmp.ps:\n"
# awk '{if ($0 ~ /^%/) {print $0; c=0} else {if (c==0) {print ""; c=1}}}' \
#   < ~/LATEX/tmp.ps
) > ~/o

# (find-fline "~/o")

# (find-fline "$S/http/cm.bell-labs.com/cm/cs/cstr/116.ps" "%%Page: 14 16")



pstotext $S/http/cm.bell-labs.com/cm/cs/cstr/116.ps \
  | tr ¡ - | tee ~/o

# (find-es "ps" "pstotext")
# (find-es "ps" "pstotext")

# Incomplete output.
# (find-es "ps" "pstotext")





#####
#
# Gothic fonts
# 99oct24
#
#####

# (find-fline "/usr/lib/texmf/tex/latex/amsfonts/eufrak.sty")





#####
#
# Tese do Max
#
#####

# «tese_do_max»

rm -Rv /tmp/thesis*
cd /tmp/
tar -xvzf ~/tese-max.tgz

cd /tmp/thesis/
latex thesis.tex	|& tee olt
# latex thesis.tex
# latex thesis.tex

(cd /tmp/thesis/; xdvi /tmp/thesis/thesis.dvi &)

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




#####
#
# TeX ruler (to estimate dims with xdvi)
#
#####

# (find-zsh "dmissing tex-ruler")
# (find-zsh "dmissing /ruler")
# (find-zsh "dmissing /ruler | grep tex")
# http://www.ntg.nl/doc/eijkhout/ruler.pdf
# http://ftp.sayclub.com/pub/CTAN/macros/generic/misc/ruler.tex
xdvi $S/http/www.loria.fr/services/tex/divers/tex-ruler.dvi &





######
#
# tex -> png
# 99nov06
#
######

# «tex2png»

# (find-fline "~/LATEX/Makefile")
# (find-es "music" "ps_to_png")





#####
#
# Hunting ps fonts (for certain calligraphic chars)
# 99nov16
#
#####

# «hunting_ps_fonts»
# «rsfs»

# (find-es "tex" "testfont")
# (find-fline "~/.zshrc" "dvifonts")
# (find-lsrcfile "psnfss/")
# (find-lsrcfile "psnfss/mathtime.dtx")
# (find-lsrcfile "psnfss/mathtest.tex")

cd /usr/lib/texmf/source/latex/psnfss/
latex mathtest
xdvi mathtest.dvi &

cd /usr/lib/texmf/source/latex/psnfss/
dvifonts mathtest.dvi

cd /tmp/
tex '\let\noinit! \input testfont.tex'\
    '\def\Test#1{\def\fontname{#1}\startfont\table}'\
    '\Test{ectt1000}'\
    '\Test{ptmb7t}'\
    '\Test{ptmb8t}'\
    '\Test{ptmr8t}'\
    '\Test{ptmri8t}'\
    '\Test{zptmcm7m}'\
    '\Test{zptmcm7t}'\
    '\Test{zptmcm7v}'\
    '\Test{zptmcm7y}'\
    '\bye'
dvips -o testfont.ps testfont.dvi
regv testfont.ps

# xdvi testfont.dvi &

dtxagrep ptm
locate zptmcm

# (find-fline "/usr/lib/texmf/fonts/vf/adobe/mathptmx/zptmcm7y.vf")
# (eeman "vftovp")

cp /usr/lib/texmf/fonts/vf/adobe/mathptmx/zptmcm7y.vf /tmp/
cp /usr/lib/texmf/fonts/tfm/adobe/mathptmx/zptmcm7y.tfm /tmp/
cd /tmp/
vftovp zptmcm7y > o

# (find-fline "/tmp/o")
# There's a mention to the "rsfs" encoding, and rsfs sounds familiar...
# So,

dtxagrep rsfs
# (find-fline "/usr/lib/texmf/source/latex/jknappen/mathrsfs.rme")
# (find-fline "/usr/lib/texmf/source/latex/jknappen/mathrsfs.sty")
# (find-fline "/usr/lib/texmf/source/latex/jknappen/ursfs.fd")

# The trick is to put a \usepackage{mathrsfs} in the preamble and use
# things like \mathscr{ABCDE} in the body of the text.





#####
#
# Patrick Lincoln's linear logic "par" macro
# 99sep??
#
#####

# «upside_down_ampersand»

# (find-fline "$S/ftp/ftp.csl.sri.com/pub/linear/mailing-list-traffic/18.summary" "\\draw package")





#####
#
# \edrxnotes
# 00jan19
#
#####

# «edrxnotes»

# 00jan19: moved the script below to my .zshrc. Now I can use
# "savetmptex" insted of "/tmp/save". See:
# (find-angg ".zshrc" "savetmptex")
# (find-angg ".emacs" "eelatex")

# (find-node "(zsh)Conditional Expressions")
# (find-fline "~/LATEX/tese2.sty" "\\def\\edrxnotes#1")
# (find-angg "eev.el" "eelatex")

cat > /tmp/save <<'---'
i=$(perl -nle 'm/^\\edrxnotes{([!-~]+)}/ && print $1' < tmp.tex)
if [[ -n $i ]]; then
  echo $i.tex
  sed -e "s/^\\\\input tmp.dnt/\\\\input $i.auto.dnt/" < tmp.tex > $i.tex
fi
---

# First, run the block above to create the script /tmp/save; then,
# instead of doing just "ee" to run LaTeX on a block saved with f3,
# do:
#
#   ee; . /tmp/save
#
# if the LaTeXable block had a line like "\edrxnotes{xxx}" then
# tmp.tex will be copied to xxx.tex; if it had a "\input tmp.dnt" then
# it will be changed to "\input xxx.auto.dnt".



# (find-es "emacs" "saving_emacs_macros")
# (load-library "edmacro")
# (insert-kbd-macro (make-symbol ""))

(setq last-kbd-macro
  (read-kbd-macro "<<search-forward>> edrxnotes RET <f3>"))

# Only use the macro below if you have two windows and the other one
# is a shell buffer...

(setq last-kbd-macro
  (read-kbd-macro "<<search-forward>> edrxnotes RET <f3>
      C-x o ee; SPC . SPC /tmp/save RET C-x o"))


# «edrxnotes-makefile»
# (find-angg "LATEX/Makefile" "edrxnotes")
#*
cd ~/LATEX/
export A=""
echo -n .INTERMEDIATE: > ~/o2
echo -n edrxnotes: > ~/o3
# for i in [0-9]*.tex tp-*.tex tesemestr.tex slidesmestr.tex; do
# for i in [0-9]*.tex; do
for i in *.tex; do
  j=$(basename $i .tex)
  echo -n " $j.dvi" >> ~/o3
  if grep "input $j.auto.dnt" $i > /dev/null; then
    echo $j.dvi: $j.tex $j.auto.dnt
    echo -n " $j.auto.dnt" >> ~/o2
  else
    echo $j.dvi: $j.tex
  fi
done |& tee ~/o
(echo 'ifeq ($(KEEPAUX),)'
 cat ~/o2; echo
 echo 'endif'
 echo; cat ~/o; echo; cat ~/o3) | tee ~/o4

# (find-fline "~/o4")

echo '# (find-es "tex" "edrxnotes-makefile")' > ~/LATEX/Makefile.auto
cat ~/o4 >> ~/LATEX/Makefile.auto
# (find-fline "~/LATEX/Makefile.auto")
#*




#####
#
# Leo Moura's PIC examples
# 00jan24
#
#####

# «leo_moura_pic»

# (find-fline "~/99oct26.pucmail" "eevP")

cd /tmp/
rm -fv 7 instrs examples.tar.gz
expect -c '
  spawn mail -f ~/99oct26.pucmail
  send "s7 7\rx\r"
  interact
  spawn metamail -r -w -q 7
  send "instrs\r\r"
  interact
'
rm -fv mm.a00*

rm -Rv /tmp/pic
mkdir /tmp/pic
cd /tmp/pic/
tar -xvzf /tmp/examples.tar.gz

tr -d \\r < eev.el > eev0.el
mv eev0.el eev.el

# (find-fline "/tmp/pic/")
# (find-fline "/tmp/pic/eev.el")

rm -v Makefile~
rm -v abs_tree_fatorial.tex
rm -v comp_tree_range_1.tex
rm -v eev.el
rm -v eev.el~
rm -v gravelSFC.tex
rm -v test.tex~

tar -cvzf /tmp/examples0.tar.gz *
laf	  /tmp/examples*gz

cd /tmp/pic/
make	|& tee om

# (find-fline "/tmp/instrs")
# (find-fline "/tmp/pic/")
# (find-fline "/tmp/pic/Makefile")
# (find-fline "/tmp/pic/test.tex")
# (find-fline "/tmp/pic/gravelSFC.pic")
# (find-fline "/tmp/pic/abs_tree_fatorial.pic")
# (find-fline "/tmp/pic/comp_tree_range_1.pic")
# (find-fline "/tmp/pic/sfc.pic")




#####
#
# Leo Moura's extensions to eev.el
# 00jan24
#
#####

# «leo_moura_eev»  (to ".leo_moura_eev")

# (find-fline "~/99oct26.pucmail" "eevP")
# (find-etag "file-name-sans-extension")

(defun se-to-string-without-comments (s e char)
  (let ((currpos) (content))
	(save-excursion
	  (setq currpos s)
	  (setq content "")
	  (while (< currpos e)
		(goto-char currpos)
		(beginning-of-line)
		(while (eq (char-after (point)) (string-to-char char))
		  (forward-char))
		(setq currpos (point))
		(end-of-line)
		(setq content (concat content (buffer-substring
					       currpos (point)) "\n"))
		(next-line 1)
		(setq currpos (point)))
	  content)))

(defun tst-se-to-string-without-comments (s e)
  (interactive "r")
  (insert (se-to-string-without-comments s e ";")))

(defun write-ee-without-comments
  (s e comment-char pre post &optional other-ee-file fmode)
  (write-ee-string (concat pre (se-to-string-without-comments
				s e comment-char)
			   post)

;;

(defun eevP (s e &optional other-ee-file) (interactive "r")
  (write-ee-without-comments s e "%" "set -v\n" "\nset +v" other-ee-file)
  (shell-command ". ~/bin/emacs.ee &")
  )             ; zsh/bash

(defun eevB (s e &optional other-ee-file) (interactive "r")
  (write-ee-without-comments s e "/" "set -v\n" "\nset +v" other-ee-file)
  (shell-command ". ~/bin/emacs.ee &")
  )             ; zsh/bash

(defun eevC (s e &optional other-ee-file) (interactive "r")
  (write-ee-without-comments s e ";" "set -v\n" "\nset +v" other-ee-file)
  (shell-command ". ~/bin/emacs.ee &")
  )             ; zsh/bash

;;;;;
;;;;; «lm-eepic»
;;;;; things to run PIC on a block of text
;;;;;
;
(defun eepic (s e) (interactive "r")
  (write-ee s e "cat > ~/LATEX/tmp.pic <<'--%%--'
		 .PS\n"                 
	        "\n.PE\n--%%--\n
                 cd ~/LATEX
                 pic -t tmp.pic > tmp_pic.tex
                 cat > ~/LATEX/tmp.tex <<'--%%--'
                 \\input{tese_defs}
                 \\begin{document}
                 \\begin{figure}
                   \\scriptsize
                   \\input{tmp_pic} 
                   \\centerline{\\box\\graph}
                 \\end{figure}
                 \\end{document}\n--%%--\n
                 rm tmp.dvi
                 latex tmp.tex\n
                 xdvi tmp.dvi")
  (shell-command ". ~/bin/emacs.ee &"))

;;;;;
;;;;; «lm-eespic»
;;;;; things to run PIC on buffer
;;;;;
;
(defun eespic () (interactive)
  (write-ee (point-min) (point-max) "cat > tmp.pic <<'--%%--'\n"
	    "\n--%%--\n
             pic -t tmp.pic > ~/LATEX/tmp_pic.tex
             rm tmp.pic
             cd ~/LATEX
             cat > ~/LATEX/tmp.tex <<'--%%--'
             \\input{tese_defs}
             \\begin{document}
             \\begin{figure}
               \\scriptsize
               \\input{tmp_pic} 
               \\centerline{\\box\\graph}
             \\end{figure}
             \\end{document}\n--%%--\n
             rm tmp.dvi
             latex tmp.tex\n
             xdvi tmp.dvi")
  (shell-command ". ~/bin/emacs.ee &"))

;;;;;
;;;;; «lm-eespic»
;;;;; things to run PIC on buffer
;;;;;
;
;
(defun pic2tex () 
  (interactive)
  (shell-command (concat "pic -t " (buffer-name) " > " (file-name-sans-extension (buffer-name)) ".tex")))






#####
#
# TeXing the TeXbook
# 2000feb29 / 2005jan01
#
#####

# «texbook»  (to ".texbook")
# http://www.ctan.org/tex-archive/systems/knuth/tex/texbook.tex
# http://mirrors.dotsrc.org/ctan/systems/knuth/dist/tex/texbook.tex
#*
rm -Rv ~/usrc/texbook/
mkdir  ~/usrc/texbook/
cd     ~/usrc/texbook/
cp -v $S/http/www.ctan.org/tex-archive/systems/knuth/tex/texbook.tex .
patch texbook.tex <<'%%%'
7,10c7,10
< \loop\iftrue
<   \errmessage{This manual is copyrighted and should not be TeXed}\repeat
< \pausing1 \input manmac
< \ifproofmode\message{Proof mode is on!}\pausing1\fi
---
> %\loop\iftrue
> %  \errmessage{This manual is copyrighted and should not be TeXed}\repeat
> \input manmac %\pausing1 \input manmac
> %\ifproofmode\message{Proof mode is on!}\pausing1\fi
%%%

tex texbook
#*
cd     ~/usrc/texbook/
dvipdf texbook.dvi

#*
# (find-texbookpage 400)
# (find-texbooktext)



#####
#
# mfbook
# 2008jun21
#
#####

# «mfbook»  (to ".mfbook")
# http://www.ctan.org/get/systems/knuth/dist/mf/mfbook.tex
#*
rm -Rv ~/usrc/mfbook/
mkdir  ~/usrc/mfbook/
cd     ~/usrc/mfbook/
cp -v $S/http/www.ctan.org/get/systems/knuth/dist/mf/mfbook.tex .

# (find-fline "~/usrc/mfbook/mfbook.tex")
# 7,10c7,10

patch mfbook.tex <<'%%%'
8,11c8,11
< \loop\iftrue
<   \errmessage{This manual is copyrighted and should not be TeXed}\repeat
< \pausing1 \input manmac
< \ifproofmode\message{Proof mode is on!}\pausing1\fi
---
> %\loop\iftrue
> %  \errmessage{This manual is copyrighted and should not be TeXed}\repeat
> \input manmac %\pausing1 \input manmac
> %\ifproofmode\message{Proof mode is on!}\pausing1\fi
%%%

tex mfbook
dvipdf mfbook.dvi

#*




#####
#
# portuguese hyphenation in potato's tetex
#
#####

# (find-fline "~/LATEX/tese2.sty")

% (find-es "tex" "edrxnotes")
% (find-lsrcfile "../generic/babel/portuges.dtx" "dateportuges")

cd /var/lib/dpkg/info/
for i in tetex*.list; do basename $i .list; done

cd /var/lib/dpkg/info/
agrep -h babel tetex*list | sort


# (find-fline "/usr/doc/tetex-base/")
# (find-fline "/usr/doc/tetex-bin/")
# (find-fline "/usr/doc/tetex-doc/")
# (find-fline "/usr/doc/tetex-extra/")
# (find-fline "/usr/doc/tetex-lib/")
# (find-fline "/usr/doc/tetex-src/")

# (find-vldifile "tetex-base.list")
# (find-vldifile "tetex-bin.list")
# (find-vldifile "tetex-doc.list")
# (find-vldifile "tetex-extra.list")
# (find-vldifile "tetex-lib.list")
# (find-vldifile "tetex-src.list")

# (find-fline "/usr/share/doc/texmf/generic/babel/")

cd /usr/share/doc/texmf/generic/babel/
rm -Rv /tmp/babel/
mkdir /tmp/babel/
cp -iv *.dvi* /tmp/babel/
cd /tmp/babel/
gzip -dv *gz

cd /tmp/babel/
xdvi user.dvi



# (find-vldifile "tetex-src.list")
# (find-fline "/usr/doc/tetex-src/")
# (find-fline "/usr/share/texmf/source/generic/babel/portuges.dtx")

# (find-fline "/usr/doc/" "tetex")
# (find-fline "/usr/doc/tetex-base/")
# (find-fline "/usr/doc/tetex-base/README.Debian")

cd /usr/share/texmf/source/generic/babel/
# (find-fline "/usr/share/texmf/source/generic/babel/bbcompat.dtx")
# (find-fline "/usr/share/texmf/source/generic/babel/bbcompat.dtx" "old interface")





#####
#
# Metafont with X display (potato)
# 2000sep20
#
#####

# «mf_X»  (to ".mf_X")
# «mf_X.1»  (to ".mf_X.1")
# «mf_X.2»  (to ".mf_X.2")
# (find-knuthfile "mf/mfbook.tex" "Chapter 23. Online\\\\Displays")
# (find-knuthfile "mf/mfbook.tex" "Appendix E. Examples")
# (find-mfbookpage (+ 13 191))
# (find-mfbookpage (+ 13 301))
# (find-man "1 mf" "ONLINE GRAPHICS OUTPUT")
# (find-fline "/usr/share/doc/texmf/tetex/teTeX-FAQ.gz" "\n29) Metafont does not support the X display")
# (find-fline "/usr/doc/tetex-base/README.Debian" "use mf with X")
# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list" "mfw")
# (find-fline "/usr/doc/tetex-bin/")
#*
cd /usr/bin/
ldd mf
ldd mft
ldd mfw

#*
cd /tmp/
cat > $EEG <<'---'
beginchar(incr code,10pt#,10pt#,0);
pickup pencircle scaled .3pt; draw unitsquare scaled w;
pickup pencircle scaled 1pt;
for k=1 upto 10:
  drawdot(uniformdeviate w, uniformdeviate w);
endfor;
showit;
endchar;
bye;
---
eeg mfw '\screen_width:=100; screen_depth:=200; screenstrokes;'
# (find-fline "/etc/texmf/modes.mf" "screen_rows :=")

#*





#####
#
# metapost
#
#####

# «metapost-old»  (to ".metapost-old")
# (find-fline "~/MP/arrow.mp")
cd ~/MP/
mp arrow.mp
gv -watch arrow.1

# (find-fline "/cdbup1/home981121/root/MP/arrow.mp")
#*
rm -Rv /tmp/mp/
mkdir  /tmp/mp/
cd     /tmp/mp/
cat > 1.mp <<'%%%'
beginfig(1);
u=2cm;
w=2mm;
z1=(4u,1u);	z1d=up;
z2=z1+(0u,3u);	z2d=up;
z3=z2+(2u,2u);	z3d=right;
z4=z3+(1u,0u);	z4d=right;
for n=1,2,3,4:
  z[n]l=z[n] + (z[n]d rotated 90) scaled w;
  z[n]r=z[n] - (z[n]d rotated 90) scaled w;
endfor;
%fill z1--z2--z3--z4--cycle;
fill z1l---z2l..z3l---z4l--z4r---z3r..z2r---z1r--cycle;
endfig;
end
%%%

mpost 1.mp
gv 1.1
#*

# (find-fline "/usr/share/doc/texmf/metapost/base/")
gv /usr/share/doc/texmf/metapost/base/mpgraph.ps.gz &
gv /usr/share/doc/texmf/metapost/base/mpintro.ps.gz &
gv /usr/share/doc/texmf/metapost/base/mpman.ps.gz &
# About arrows: mpman, p.37

# (find-node "(dvips)EPSF Macros")
# (find-fline "/usr/lib/texmf/texmf/tex/latex/graphics/epsfig.sty")
# (find-fline "/usr/lib/texmf/source/latex/graphics/epsfig.dtx")
# (find-fline "/usr/lib/texmf/source/latex/graphics/epsfig.dtx" "epsf.tex")

# Boxes:
kpsewhich mp boxes.mp
# (find-fline "/usr/lib/texmf/texmf/metapost/base/boxes.mp")

kpsewhich tex epsf.sty
kpsepath latex

# (find-fline "/usr/lib/texmf/texmf/metapost/base/plain.mp" 421)

# Roubar o código de setas de alguma fonte do TeX (ams, talvez)
# Escrever o script que usa o testfont.

# (find-fline "/usr/share/texmf/tex/plain/base/testfont.tex")
# (find-fline "/usr/share/texmf/tex/plain/misc/mproof.tex")




#####
#
# metapost
# 2008jun21
#
#####

# «metapost»  (to ".metapost")
# (find-zsh "dmissing metapost")
# "mpgraph.pdf" is broken in teTeX, and I haven't switched to TeXlive yet...
# (find-pspage "/usr/share/doc/tetex-doc/metapost/base/mpgraph.pdf.gz")
# (find-pspage "/usr/share/doc/tetex-doc/metapost/base/mpintro.ps.gz")
# (find-pspage "/usr/share/doc/tetex-doc/metapost/base/mpman.ps.gz")
# (find-man "1 dmp")
# (find-man "1 dvitomp")
# (find-man "1 makempx")
# (find-man "1 mpost")
# (find-man "1 mpto")
# (find-man "1 newer")
# (find-fline "/usr/share/texmf-tetex/metapost/misc/x.mp")
# (find-fline "/usr/share/texmf-tetex/metapost/misc/null.mp")
# (find-efunction 'eepitch-latex)

(defun eepitch-mpost () (interactive) (ee-eepitch-comint "/tmp/" "mpost" "mpost"))
(defun eepitch-mf    () (interactive) (ee-eepitch-comint "/tmp/" "mf"    "mf"))

* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
beginfig(1);
u=2cm;
w=2mm;
z1=(4u,1u);	z1d=up;
z2=z1+(0u,3u);	z2d=up;
z3=z2+(2u,2u);	z3d=right;
z4=z3+(1u,0u);	z4d=right;
for n=1,2,3,4:
  z[n]l=z[n] + (z[n]d rotated 90) scaled w;
  z[n]r=z[n] - (z[n]d rotated 90) scaled w;
endfor;
%fill z1--z2--z3--z4--cycle;
fill z1l---z2l..z3l---z4l--z4r---z3r..z2r---z1r--cycle;
endfig;
end

# (find-pspage "/tmp/null.1")




#####
#
# Generating ".ps"s with other resolutions (potato)
# 2000sep19
#
#####

# «ps-720dpi»  (to ".ps-720dpi")
# (find-fline "/etc/texmf/")
# (find-fline "/etc/texmf/mktex.cnf")
# (find-fline "/usr/bin/mktexpk")
# (find-fline "/usr/bin/mktexpk" "MODE=ljfour")
# (find-fline "/etc/texmf/modes.mf")
# (find-fline "/etc/texmf/modes.mf" "epscszz")

# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list")
# (find-fline "/usr/doc/tetex-bin/")

# (find-fline "/usr/sbin/texconfig" "default mode (xdvi/dvips/mf)")
# (find-fline "/usr/sbin/texconfig" "FAQ=")
# (find-fline "/usr/doc/texmf/tetex/teTeX-FAQ.gz" "\n9)")
# (find-node "(dvips)config.ps installation")
# (find-node "(dvips)Option details" "`-mode MODE'")
# (find-node "(dvips)Configuration file searching" "`-mode'")

# (find-fline "~/LATEX/Makefile" "%.ps720 : %.dvi")

#*
rm -v /var/spool/texmf/pk/epscszz/public/cm/cmr10.720pk
cd ~/LATEX/
rm tmp.ps
MODE=epscszz make tmp.ps720
#*


# (find-fline "/etc/texmf/modes.mf" "ljlo")
# Now we add versions of ljlo with other "blacker" factors, and...
#*
/usr/bin/texconfig init |& tee ~/o
#*
rm -v /tmp/tmp.*
cd ~/LATEX/
make tmp.dvi
dvips -D 150 -mode edrxlozerofive -o /tmp/tmp.05.ps tmp.dvi
dvips -D 150 -mode edrxloone -o /tmp/tmp.1.ps tmp.dvi
dvips -D 150 -mode edrxlotwo -o /tmp/tmp.2.ps tmp.dvi
#*




#####
#
# latex2html
# 2000sep27
#
#####

# «latex2html»  (to ".latex2html")
# (find-status "latex2html")
# (find-vldifile "latex2html.list")
# (find-fline "/usr/doc/latex2html/")

# (find-fline "/usr/share/latex2html/")
# (find-fline "/usr/share/texmf/tex/latex/latex2html/")
# (find-fline "/usr/bin/latex2html")
# (find-fline "/usr/bin/pstoimg")
# (find-fline "/usr/bin/texexpand")
# (find-fline "/etc/latex2html.config")
# (eeman "latex2html")
# (eeman "pstoimg")

# (find-w3 "/usr/doc/latex2html/html/index.html")
# (find-fline "~/LATEX/Makefile")

# Can latex2html convert my texts?

#*
rm -Rv /tmp/LATEX/
cd
cp -diPpvR LATEX /tmp/
cd /tmp/LATEX/
# (find-fline "/tmp/LATEX/Makefile" "\n.INTERMEDIATE")
sed 's/.INTERMEDIATE/#.INTERMEDIATE/g' < Makefile > Makefile2
mv Makefile2 Makefile

cd /tmp/LATEX/
make 00jan09.auto.dnt
latex2html 00jan09 |& tee o

#*
cd /tmp/LATEX/00jan09/
edrxnetscape ./index.html &

#*

# No.

# (find-fline "/tmp/LATEX/00jan09/")




#####
#
# pstoimg
# 2001mar06
#
#####

# «pstoimg»  (to ".pstoimg")
#*
# (eev-bounded)
# (find-angg "LATEX/Makefile" "making_pngs")
# (find-es "music" "ps_to_png")
# (find-fline "/usr/bin/pstoimg")
# (find-man "1 pstoimg")
cd ~/LATEX/
rm /tmp/tmp*
make /tmp/tmp.ps300
pstoimg -multi -type png -crop a -antialias -aaliastext \
  -density 150 \
  -out /tmp/tmp.png /tmp/tmp.ps300
make /tmp/tmp.ps
pstoimg -multi -type png -crop a -antialias -aaliastext \
  -density 150 \
  -out /tmp/tmp600..png /tmp/tmp.ps

# Why the "..":
#   pstoimg: Written /tmp/tmp600.1.png
#   pstoimg: Written /tmp/tmp600.2.png

# make /tmp/tmp.300.05.p01.png
# make /tmp/tmp.300.05.png
# make /tmp/tmp.150.png

#*
cd ~/dednat/
make example.dvi
rm -fv example.ps example.png
make -f ~/LATEX/Makefile DPI=150 example.ps
# make -f ~/LATEX/Makefile DPI=150 /tmp/example.150.png
pstoimg -type png -crop a -antialias -aaliastext \
  -density 150 \
  -out /tmp/a.png example.ps
# Bad news: "display" doesn't like the result (though zgv and netscape do)

#*




#####
#
# tetex-bin source (potato)
# 2000oct01
#
#####

# «tetex-bin»  (to ".tetex-bin")

# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list")
# (find-fline "/usr/doc/tetex-bin/")

# The tetex-bin source package generates tetex-bin, tetex-dev and
# tetex-lib, but the last two are not very interesting because they
# contain only kpathsea stuff.

#*
pdsc $SDEBIAN/dists/potato/main/source/tex/tetex-bin_1.0.6-7.dsc
cd /usr/src/tetex-bin-1.0.6/
find * | sort > .files
debian/rules binary	|& tee odrb

#*
cd /usr/src/tetex-bin-1.0.6/
agrep '\./tangle' odrb

#*
# «weaving»  (to ".weaving")
cd /usr/src/tetex-bin-1.0.6/texk/web2c/
rm -Rv /tmp/weave/
mkdir  /tmp/weave/
cp -v {tex,mf,gftodvi}.{web,ch} /tmp/weave/
cd     /tmp/weave/

weave gftodvi.web
tex   gftodvi.tex
weave gftodvi.web gftodvi.ch
mv    gftodvi.tex gftodvi-ch.tex
tex           gftodvi-ch.tex

weave tex.web
tex   tex.tex
weave tex.web tex.ch
mv    tex.tex tex-ch.tex
tex           tex-ch.tex

weave mf.web
tex   mf.tex
weave mf.web mf.ch
mv    mf.tex mf-ch.tex
tex          mf-ch.tex

xdvi  gftodvi.dvi &
xdvi  gftodvi-ch.dvi &

xdvi  tex.dvi &
xdvi  tex-ch.dvi &

xdvi  mf.dvi &
xdvi  mf-ch.dvi &

#*

# (find-texbinfile "odrb" "./tangle ")

# (code-c-d "texbin" "/usr/src/tetex-bin-1.0.6/")
# (find-texbinfile "")
# (find-texbinfile "odrb")
# (find-texbinfile ".files")
# (find-texbinfile "texk/web2c/")
# (find-texbinfile "texk/web2c/window/")
# (find-texbinfile "texk/web2c/mf.web")
# (find-texbinfile "texk/web2c/mf.web" "Online graphic output.")
# (find-texbinfile "texk/web2c/window/")
# (find-node "(web2c)Metafont")
# (find-node "(web2c)Online Metafont graphics" "`Metafont'")

# (find-fline "/tmp/weave/")
# (find-fline "/tmp/weave/mf.tex")
# (find-fline "/tmp/weave/mf.tex" "\\:\\X")
# (find-fline "/tmp/weave/mf-ch.tex")
# (find-fline "/tmp/weave/mf-ch.tex" "\\:\\X")
# (find-fline "/tmp/weave/mf-ch.tex" "16 ``window'' areas")




#####
#
# xdvi'ing compressed files
# 2000oct01
#
#####

# «xdvi-gz»  (to ".xdvi-gz")
# (to "docs")
# (find-fline "/usr/doc/tetex-base/README.Debian" "view the compressed .dvi")
# (find-fline "/usr/doc/tetex-bin/changelog.Debian.gz" "zipped files")
# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list")
# (find-texbinfile "texk/xdvik/")
# (find-texbinfile "texk/xdvik/xdvi-sh")
# (find-fline "/usr/bin/X11/xdvi" "*.gz")

#*
# Prepare to hand-patch
cd /usr/bin/X11/
if [[ ! -e xdvi.orig ]]; then cp -av xdvi xdvi.orig; fi
# (find-fline "/usr/bin/X11/xdvi" "*.gz")
#*
# Bring the original back
cd /usr/bin/X11/
mv -v xdvi.orig xdvi
#*

# ...then I gave up. Instead of fixing the xdvi wrapper or writing one
# of my own I decided to use a simple shell function instead. Here it
# is: (find-angg ".zshrc" "zxdvi")

# I'm not calling it in scripts or mime descriptions, just in
# e-scripts, like in this one: (to "docs")


# A test:
#*
rm -Rv /tmp/a
mkdir /tmp/a
cd ~/LATEX
gzip -c6 feb98.dvi > /tmp/a/feb98.dvi.gz
zxdvi /tmp/a/feb98.dvi.gz
#*




#####
#
# xdvi and sigusr1
# 2000oct29
#
#####

# «xdvi-pid»  (to ".xdvi-pid")
# (find-man "1 xdvi" "SIGUSR1")
# (find-zshnode "Parameters Set By The Shell")

cd ~/LATEX/
xdvi tmp.dvi &
echo $! > /tmp/xdvi.pid

kill -USR1 $(</tmp/xdvi.pid)




#####
#
# rail
# 2000oct22
#
#####

# «rail»  (to ".rail")
# (find-fline "$SCTAN/support/")

#*
rm -Rv /usr/src/rail/
cd /usr/src/
tar -xvzf $SCTAN/support/rail.tar.gz
cd /usr/src/rail/
make |& tee om
#*
cd /usr/src/rail/
make clean
make rail.dvi	|& tee omrd
#*

gv /usr/src/rail/rail.ps &
man2t /usr/src/rail/rail.man |& l -S
#*

# (find-fline "/usr/src/rail/")
# (find-fline "/usr/src/rail/rail.tex")
# (find-fline "/usr/src/rail/rail.rai")
# (find-fline "/usr/src/rail/rail.rao")




#####
#
# twocolumn
# 2000oct31
#
#####

# «twocolumn»  (to ".twocolumn")
# (find-angg "LATEX/tese2.sty" "twocolumn")

cd /usr/share/texmf/source/latex/base/
agrep -l twocolumn *

zxdvi /usr/doc/texmf/latex/tools/multicol.dvi.gz &

# (find-fline "/usr/share/texmf/source/latex/tools/multicol.dtx")
# (find-fline "/usr/share/texmf/tex/latex/tools/multicol.sty")

# (find-fline "/usr/doc/texmf/index.html" "fix2col")
# (find-w3 "/usr/doc/texmf/index.html" "fix2col")

# (find-lsrcfile "base/changes.txt")
# (find-lsrcfile "base/classes.dtx")
# (find-lsrcfile "base/clsguide.tex")
# (find-lsrcfile "base/doc.dtx")
# (find-lsrcfile "base/idx.tex")
# (find-lsrcfile "base/letter.dtx")
# (find-lsrcfile "base/ltclass.dtx")
# (find-lsrcfile "base/ltfiles.dtx")
# (find-lsrcfile "base/ltfloat.dtx")
# (find-lsrcfile "base/ltnews.cls")
# (find-lsrcfile "base/ltoutput.dtx")
# (find-lsrcfile "base/makeindx.dtx")
# (find-lsrcfile "base/manual.err")
# (find-lsrcfile "base/proc.dtx")
# (find-lsrcfile "base/slides.dtx")
# (find-lsrcfile "base/usrguide.tex")

# (find-node "(latex)Layout")




#####
#
# \show, \tracingall, etc
# 2000oct31
#
#####

# «show_and_tracing»  (to ".show_and_tracing")
# (find-texbookpage (+ 11 476))
# (find-knuthfile "tex/")
# (find-knuthfile "tex/texbook.tex" "beginchapter Appendix I. Index" "show")
# (find-knuthfile "tex/texbook.tex" "|\\tracingall|")
# (find-fline "/usr/share/texmf/tex/plain/base/plain.tex")
# (find-fline "/usr/share/texmf/tex/plain/base/plain.tex" "% \\tracingonline=")
# (find-fline "/usr/share/texmf/tex/plain/base/plain.tex" "\\def\\tracingall")

# (find-texbookpage (+ 11 32))
# (find-knuthfile "tex/texbook.tex" "nonstopmode")
#*
cd /tmp/
tex '\relax\tracingonline=1\nonstopmode
  \show\smash
  \setbox1\hbox{bp}
  \showbox1
  \bye
'
#*

# 2008may09:
# (find-texbookfile "texbook.tex")
# (find-texbookfile "texbook.tex" "\\tracingall")
# (find-texbookfile "texbook.tex" "Appendix I. Index")
# (find-texbookfile "texbook.tex" "Appendix I. Index" "show")
# (find-texbookfile "texbook.tex" "Appendix I. Index" "tracing")
% (find-texbooktext "")
% (find-texbooktext "\\errorstopmode | \\scrollmode")
% (find-texbooktext "\\tracingonline (positive")
% (find-texbooktext "\\showthe\\dimen2")
% (find-texbooktext "`\\showthe'")
% (find-texbooktext "Box contents" "\\tracingonline=1")
% (find-texbooktext "! Undefined control sequence.")
% (find-texbooktext "`?'")
% (find-texbooktext "`S', `R', or `Q'")
% (find-texbooktext "\\scrollmode, \\nonstopmode, and \\batchmode")
% (find-texbooktext "Type `S'. TEX will proceed without pausing")
% (find-texbooktext "Type `R'. This is like `S' but even stronger")
% (find-texbooktext "Type `Q'. This is like `R' but even more so")

* (eepitch-tex)
* (eepitch-kill)
* (eepitch-tex)
\tracingonline=1
\newlinechar=`\^^J
\catcode` =12\def\spac{ }\catcode` =10
\setbox1\hbox{bp}
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
\showbox1
I\show\smash
I\showthe\wd1
\interact
\showthe\wd1
I\bye
%\interact



#####
#
# Showing the dimensions of a box
# 99nov06
#
#####

# «show_box_dims»  (to ".show_box_dims")
# (find-angg "LATEX/edrx.sty" "showboxdims")
# (find-texbookfile "texbook.tex" "The \\<token list> of a |\\write|")
# (find-texbookfile "texbook.tex" "\\newlinechar=`\\^^J")
# (find-texbookfile "texbook.tex" "10&Space")
# (find-texbookfile "texbook.tex" "12&Other character")
# (find-texbookfile "texbook.tex" "13&Active character")
# (find-texbookfile "texbook.tex" "^|\\message||{...}|")
# (find-texbookpage (+ 11 37) "Category" "Meaning")
# (find-texbookpage (+ 11 481))
# (find-texbookpage (+ 11 227))

%*
% (eelatex-bounded)
\setbox1\hbox{bp}
\newlinechar=`\^^J
\catcode` =12\def\spac{ }\catcode` =10
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
\dp1=12pt
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
%*
% (eelatex-bounded)
\catcode` =12\gdef\spac{ }\catcode` =10
\gdef\showboxdims#1{\immediate\write16{
  wd=\the\wd#1\spac ht=\the\ht#1\spac dp=\the\dp#1
}}
\setbox1\hbox{bp}
\showboxdims{1}
\dp1=12pt
\showboxdims{1}
%*


# Converting dimensions:
# (find-knuthfile "tex/texbook.tex" "newdimen")
# (find-fline "/usr/lib/texmf/tex/plain/base/plain.tex" "newdimen")
# (find-knuthfile "tex/texbook.tex" "in=72.27")
# (/ 1 72.27)

%*
\newlinechar=`\^^J
\newdimen\tmpdimen
%\def\rmpt#1pt{#1}
\def\rmpt#1{#1}

\tmpdimen=72.27pt
\message{^^J \the\tmpdimen}
\tmpdimen=0.013837\tmpdimen
\message{^^J \rmpt\the\tmpdimen in}
%*


# Other notes:
#*
tex '\tracingonline=1\scrollmode
  \message{hello}
  \setbox1\hbox{bp}
  \showthe\wd1
  \showthe\ht1
  \showthe\dp1
  \bye'
#*
tex '\tracingonline=1\scrollmode
\newlinechar=`\^^J
\def\sp{ }
\setbox1\hbox{bp}
\catcode` =12\def\spac{ }\catcode` =10
\message{    \the\wd1   \the\ht1\ \the\dp1}
\message{^^J \the\wd1^^ \the\ht1{} \the\dp1}
\message{^^J \the\wd1\sp \the\ht1^^20 \the\dp1}
\message{^^J \the\wd1\string\ \the\ht1\char` \the\dp1}
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
\message{^^J \the\wd1\spac \the\ht1\spac \the\dp1}
\bye'
#*

# (find-knuthfile "tex/texbook.tex")
# (find-knuthfile "tex/texbook.tex" "256 box registers")
# (find-knuthfile "tex/texbook.tex" "^|\\expandafter|\\<token>")
# (find-knuthfile "tex/texbook.tex" "futurelet")
# (find-knuthfile "tex/texbook.tex" "batchmode")
# (find-knuthfile "tex/texbook.tex" "`^|\\showthe|'")
# (find-knuthfile "tex/texbook.tex" "\\csname")
# (find-knuthfile "tex/texbook.tex" "2\\wd3")

# (find-fline "/usr/lib/texmf/tex/plain/base/manmac.tex" "index")

# (find-fline "~/LATEX/")
# (find-fline "~/LATEX/boxing7.tip")
# (find-fline "~/LATEX/Makefile")




#####
#
# \smash
# 2001oct23
#
#####

# «smash»  (to ".smash")
% (find-texbookpage (+ 11 178) "\\smash")
% (find-amsldocpage (+ 6 11) "\\smash options")
% (find-lsrcfile "base/ltmath.dtx" "\\def\\smash")
% (find-lsrcfile "amslatex/math/amsmath.dtx" "\\renewcommand{\\smash}")
% (find-lsrcfile "base/ltdefns.dtx" "\\def\\@protected@testopt")
% (find-plainsrcfile "plain.tex" "\\def\\smash")
% Why doesn't the standard LaTeX \smash work?
%*
\def\mysmash#1{{\setbox0\hbox{#1}%
  \wd0=0pt\ht0=0pt\dp0=0pt%
  \box0}}

aa\smash{BBB}cccc

aa\mysmash{BBB}cccc

%*
% (eedn4a-bounded)
\def\mysmash#1{{%
  \setbox0\hbox{#1}%
  \wd0=0pt\ht0=0pt\dp0=0pt%
  \box0
  }}
\def\red#1{{\color{red}#1}}

Foo: \mysmash{right}wrong

Foo: \mysmash{\red{right}}wrong

\leavevmode \mysmash{right}wrong

%*





#####
#
# tetex-bin source (potato)
# 2000oct01
#
#####

# «tetex-bin»  (to ".tetex-bin")

# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list")
# (find-fline "/usr/doc/tetex-bin/")

# The tetex-bin source package generates tetex-bin, tetex-dev and
# tetex-lib, but the last two are not very interesting because they
# contain only kpathsea stuff.

#*
pdsc $SDEBIAN/dists/potato/main/source/tex/tetex-bin_1.0.6-7.dsc
cd /usr/src/tetex-bin-1.0.6/
find * | sort > .files
debian/rules binary	|& tee odrb

#*
cd /usr/src/tetex-bin-1.0.6/
agrep '\./tangle' odrb

#*
# «weaving»  (to ".weaving")
cd /usr/src/tetex-bin-1.0.6/texk/web2c/
rm -Rv /tmp/weave/
mkdir  /tmp/weave/
cp -v {tex,mf,gftodvi}.{web,ch} /tmp/weave/
cd     /tmp/weave/

weave gftodvi.web
tex   gftodvi.tex
weave gftodvi.web gftodvi.ch
mv    gftodvi.tex gftodvi-ch.tex
tex           gftodvi-ch.tex

weave tex.web
tex   tex.tex
weave tex.web tex.ch
mv    tex.tex tex-ch.tex
tex           tex-ch.tex

weave mf.web
tex   mf.tex
weave mf.web mf.ch
mv    mf.tex mf-ch.tex
tex          mf-ch.tex

xdvi  gftodvi.dvi &
xdvi  gftodvi-ch.dvi &

xdvi  tex.dvi &
xdvi  tex-ch.dvi &

xdvi  mf.dvi &
xdvi  mf-ch.dvi &

#*

# (find-texbinfile "odrb" "./tangle ")

# (code-c-d "texbin" "/usr/src/tetex-bin-1.0.6/")
# (find-texbinfile "")
# (find-texbinfile "odrb")
# (find-texbinfile ".files")
# (find-texbinfile "texk/web2c/")
# (find-texbinfile "texk/web2c/window/")
# (find-texbinfile "texk/web2c/mf.web")
# (find-texbinfile "texk/web2c/mf.web" "Online graphic output.")
# (find-texbinfile "texk/web2c/window/")
# (find-node "(web2c)Metafont")
# (find-node "(web2c)Online Metafont graphics" "`Metafont'")

# (find-fline "/tmp/weave/")
# (find-fline "/tmp/weave/mf.tex")
# (find-fline "/tmp/weave/mf.tex" "\\:\\X")
# (find-fline "/tmp/weave/mf-ch.tex")
# (find-fline "/tmp/weave/mf-ch.tex" "\\:\\X")
# (find-fline "/tmp/weave/mf-ch.tex" "16 ``window'' areas")




#####
#
# xdvi'ing compressed files
# 2000oct01
#
#####

# «xdvi-gz»  (to ".xdvi-gz")
# (to "docs")
# (find-fline "/usr/doc/tetex-base/README.Debian" "view the compressed .dvi")
# (find-fline "/usr/doc/tetex-bin/changelog.Debian.gz" "zipped files")
# (find-status "tetex-bin")
# (find-vldifile "tetex-bin.list")
# (find-texbinfile "texk/xdvik/")
# (find-texbinfile "texk/xdvik/xdvi-sh")
# (find-fline "/usr/bin/X11/xdvi" "*.gz")

#*
# Prepare to hand-patch
cd /usr/bin/X11/
if [[ ! -e xdvi.orig ]]; then cp -av xdvi xdvi.orig; fi
# (find-fline "/usr/bin/X11/xdvi" "*.gz")
#*
# Bring the original back
cd /usr/bin/X11/
mv -v xdvi.orig xdvi
#*

# ...then I gave up. Instead of fixing the xdvi wrapper or writing one
# of my own I decided to use a simple shell function instead. Here it
# is: (find-angg ".zshrc" "zxdvi")

# I'm not calling it in scripts or mime descriptions, just in
# e-scripts, like in this one: (to "docs")


# A test:
#*
rm -Rv /tmp/a
mkdir /tmp/a
cd ~/LATEX
gzip -c6 feb98.dvi > /tmp/a/feb98.dvi.gz
zxdvi /tmp/a/feb98.dvi.gz
#*




#####
#
# src2tex
# 2000oct25
#
#####

# «src2tex»  (to ".src2tex")
# (find-status "src2tex")
# (find-vldifile "src2tex.list")
# (find-fline "/usr/doc/src2tex/")

#*
rm -Rv /tmp/st-e/
mkdir  /tmp/st-e/
cd     /tmp/st-e/
cp -v /usr/share/doc/src2tex/examples/contrib/* .
cp -v /usr/share/doc/src2tex/examples/*         .
gzip -dv *
#*
cd     /tmp/st-e/
for i in *.dvi; do xdvi -s 8 $i; done
for i in *.ps; do  gv -antialias $i; done





#####
#
# auctex
# 2000oct31
#
#####

# «auctex»  (to ".auctex")
# (find-status "auctex")
# (find-vldifile "auctex.list")
# (find-fline "/usr/doc/auctex/")
# (find-fline "/usr/doc/auctex/src/")
# (find-fline "/usr/doc/auctex/HTML/")
# (find-w3 "/usr/doc/auctex/HTML/")

# (code-c-d "auctex" "/usr/share/emacs/site-lisp/auctex/" "auctex")
# (find-auctexfile "")

# (find-node "(auctex)Top")
# (find-node "(auctex)Commands" "% Local Variables:")
# (find-node "(auctex)Commands" "write the current region into the region file")

# Just as a curiosity: auctex uses local variables a lot.
zcatinfo /usr/share/info/auctex > /tmp/auctex.info
# (find-fline "/tmp/auctex.info")





#####
#
# making indices
# 2001jan25
#
#####

# «indices»  (to ".indices")
# (find-lsrcfile "amslatex/math/amsldoc.tex")
#*
rm -Rv /tmp/latex/
mkdir  /tmp/latex/
cd     /tmp/latex/
cp -v /usr/share/texmf/source/latex/amslatex/math/amsldoc.tex .
latex amsldoc.tex
latex amsldoc.tex
xdvi /tmp/latex/amsldoc.dvi

# (find-fline "/tmp/latex/")
# (find-fline "/tmp/latex/amsldoc.tex" "tableofcontents")
# (find-fline "/tmp/latex/amsldoc.toc")
#*
lsrcagrep tableofcontents
lsrcagrep -l tableofcontents |& tee ~/o
l +/tableofcontents $(<~/o)
#*

# (find-node "(latex)Table of Contents")
# (find-node "(latex)Sectioning")





#####
#
# Makoto Tatsuta's proof.sty
# 2001oct23
#
#####

# «tatsutaproof»  (to ".tatsutaproof")
# (find-angg "LATEX/proof.orig.sty")
# (find-angg "LATEX/proof.edrx.sty")
# (find-fline "$SCTAN/macros/latex/contrib/other/proof/proof.sty")
# (find-fline "$SCTAN/macros/latex/contrib/other/proof/proofeg.tex")

tkdiff ~/LATEX/proof.edrx.sty $SCTAN/macros/latex/contrib/other/proof/proof.sty

# (find-angg "dednat/dednat.lua" "tatsuta_donode")
# (find-angg "dednat/dednat2.lua" "tatsuta_do_node")

# 2007aug20:
# http://tug.ctan.org/macros/latex/contrib/lkproof/proof.sty
# http://tug.ctan.org/macros/latex/contrib/lkproof/proofeg.tex
# (find-sh0 "cp -v $S/http/tug.ctan.org/macros/latex/contrib/lkproof/proof* ~/LATEX/")
# (find-dvipage "~/LATEX/proofeg.dvi" 1)
#*
cd ~/LATEX/
latex proofeg.tex
rexdvi proofeg.dvi

#*




#####
#
# Samuel Buss' package for typesetting proof trees
# 2001feb25
#
#####

# «bussproofs»  (to ".bussproofs")
# (find-shttpw3 "www.math.ucla.edu/~asl/bussproofs.sty")
#*
cd /tmp/
cp $S/http/www.math.ucla.edu/~asl/bussproofs.sty .
cat > proof.tex <<'---'
\documentclass{book}
\usepackage{bussproofs}
\begin{document}

% (find-fline "/tmp/bussproofs.sty" "For example, to generate")
% (find-fline "/tmp/bussproofs.sty" "\\def\\BinaryInfC")
% (find-fline "/tmp/bussproofs.sty" "Usages:")
$$
\AxiomC{D}
\AxiomC{A}
\AxiomC{B}
\BinaryInfC{C}
%\BinaryInf{E}
\BinaryInfC{E}
\DisplayProof
$$

\scriptsize
\def\ScoreOverhang{0pt}

$$
\AxiomC{A}
\AxiomC{\(B\)}
\RightLabel{X}
\BinaryInfC{C}
\DisplayProof
$$

\end{document}
---

latex proof.tex && rexdvi proof.dvi
#*



#####
#
# Paul Taylor's proof tree package
# 2001apr03
#
#####

# «ptproof-old»  (to ".ptproof-old")
# (find-angg "dednat/dednat3.lua" "paul.taylor")
# (find-sftpfile "ftp.dcs.qmw.ac.uk/pub/tex/contrib/pt/proofs/")

# (code-c-d "ptproof" "$S/ftp/ftp.dcs.qmw.ac.uk/pub/tex/contrib/pt/proofs/")
# (find-ptprooffile "prooftree-doc.tex" "primitive")
# (find-ptprooffile "prooftree.tex")
#*
cd /tmp/
rm -R pt/
mkdir pt/
cd /tmp/pt/
cp -iv $S/ftp/ftp.dcs.qmw.ac.uk/pub/tex/contrib/pt/proofs/* .
#*
cd /tmp/pt/
cat > pttest.tex <<'%%%'
\documentclass{book}
\input prooftree
\begin{document}
\begin{prooftree}
  \[ A \quad
     B \using \land I \justifies
  A \land B \]
  A \land B \to C
  \[ \[ \justifies
     ?? \] \justifies
  ? \] \justifies
C
\end{prooftree}
\end{document}
%%%
latex pttest.tex  &&  rexdvi pttest.dvi
#*


# «ptproof»  (to ".ptproof")
# http://www.monad.me.uk/proofs/
# http://www.monad.me.uk/proofs/prooftree.sty
# http://www.monad.me.uk/proofs/prooftree-doc.tex
#*
rm -Rv ~/usrc/ptproof/
mkdir  ~/usrc/ptproof/
cd     ~/usrc/ptproof/
cp -v $S/http/www.monad.me.uk/proofs/prooftree.sty .
cp -v $S/http/www.monad.me.uk/proofs/prooftree-doc.tex .
cp -v prooftree.sty prooftree.tex
latex prooftree-doc.tex  \
  && rexdvi prooftree-doc.dvi \
  && dvipdf prooftree-doc.dvi

#*
# (code-c-d "ptproof" "~/usrc/ptproof/")
# (find-ptprooffile "")
# (find-ptprooffile "prooftree-doc.tex")
# (find-fline "~/LATEX/" "prooftree")
# (find-sh0 "rm -v ~/LATEX/prooftree.sty")
# (find-sh0 "cp -v $S/http/www.monad.me.uk/proofs/prooftree.sty ~/LATEX/")

# (code-dvi       "ptproof" "~/usrc/ptproof/prooftree-doc.dvi")
# (code-pdftotext "ptproof" "~/usrc/ptproof/prooftree-doc.pdf")
# (find-ptproofpage 1)
# (find-ptprooftext)
# (find-ptprooftext "\\kern-26em")









#####
#
# TeXCad
# 2001may26
#
#####

# «texcad»  (to ".texcad")
#*
rm -Rv /usr/src/xtexcad-2.4.1/
cd /usr/src/
tar -xvzf $S/ftp/ftp.tex.ac.uk/tex-archive/graphics/xtexcad/xtexca