Function: cal-tex-end-document

cal-tex-end-document is a byte-compiled function defined in cal-tex.el.gz.

Signature

(cal-tex-end-document)

Documentation

Finish the LaTeX document.

Insert the trailer to LaTeX document, pop to LaTeX buffer, add informative header, and run HOOK.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-tex.el.gz
;;;
;;;  LaTeX Code
;;;

(defun cal-tex-end-document ()
  "Finish the LaTeX document.
Insert the trailer to LaTeX document, pop to LaTeX buffer, add
informative header, and run HOOK."
  (cal-tex-e-document)
  (or (and cal-tex-preamble-extra
           (string-match "inputenc" cal-tex-preamble-extra))
      (when (re-search-backward "[^[:ascii:]]" nil 'move)
        (goto-char (point-min))
        (when (search-forward "documentclass" nil t)
          (forward-line 1)
          ;; E.g., for some Bahá’í holidays.
          ;; FIXME latin1 might not always be right.
          (insert "\\usepackage[latin1]{inputenc}\n"))))
  (latex-mode)
  (pop-to-buffer (current-buffer))
  (goto-char (point-min))
  ;; FIXME auctex equivalents?
  (cal-tex-comment
   "\tThis buffer was produced by cal-tex.el.
\tTo print a calendar, type
\t\tM-x tex-buffer RET
\t\tM-x tex-print  RET"))