chickadee » hahn-utils » tex-write-docexprs

tex-write-docexprs docexprsprocedure
tex-write-docexprs docexprs metafileprocedure
tex-write-docexprs docexprs metafile repoprocedure

Write the source-derived docexprs as LaTeX.

docexprs
The parsed docexprs
(define tex-write-docexprs
  (case-lambda
    ((docexprs) (tex-write-docexprs docexprs #f))
    ((docexprs metafile) (tex-write-docexprs docexprs #f #f))
    ((docexprs metafile repo)
     (let* ((document (make-document (make-hash-table) (make-stack)))
            (parsed-docexprs (tex-parse-docexprs document docexprs)))
       (let ((data (document-data document)))
         (write-template
           tex-preamble
           `((author unquote (hash-table-ref/default data 'author "Anonymous"))
             (email unquote
                    (hash-table-ref/default
                      data
                      'email
                      "anonymous@example.org"))
             (title unquote
                    (hash-table-ref/default data 'title "Documentation")))))
       (stack-for-each parsed-docexprs (lambda (docexpr) (docexpr)))
       (display tex-footer)))))