Henri,Problem is: the first argument (i.e., "doc") is the
I see in progs/convert/latex/latex-tools.scm a definition
(tm-define (latex-use-package-command doc)
(:synopsis "Return the usepackage command for @doc")
(set! latex-uses-table (make-ahash-table))
(latex-use-which-package doc)
(let* ((l1 (map car (ahash-table->list latex-uses-table)))
(l2 (sort l1 latex-use-package-compare))
(l3 (map force-string l2))
(l4 (list-intersperse l3 ","))
(s (apply string-append l4)))
(if (== s "") "" (string-append "\\usepackage{" s "}\n"))))
If I understand it correctly, this returns the \usepackage command (as a string) that TeXmacs inserts in the LaTeX document when it creates it. So that solves half of the problem.
Since I know almost no Scheme, how would I call this function "latex-use-package-command" from code inside my modified tmtex.scm?
If I knew that, I could figure out how to parse the \usepackage string and see if it contains "amsmath".
Archive powered by MHonArc 2.6.19.