Function: allout-latexify-one-item
allout-latexify-one-item is a byte-compiled function defined in
allout.el.gz.
Signature
(allout-latexify-one-item DEPTH PREFIX BULLET TEXT)
Documentation
Insert LaTeX commands for formatting one outline item.
Args are the topics numeric DEPTH, the header PREFIX lead string, the BULLET string, and a list of TEXT strings for the body.
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-latexify-one-item (depth prefix bullet text)
(defun allout-latexify-one-item (depth _prefix bullet text)
"Insert LaTeX commands for formatting one outline item.
Args are the topics numeric DEPTH, the header PREFIX lead string, the
BULLET string, and a list of TEXT strings for the body."
(let* ((head-line (if text (car text)))
(body-lines (cdr text))
(curr-line)
body-content bop)
; Do the head line:
(insert (concat "\\OneHeadLine{\\verb\1 "
(allout-latex-verb-quote bullet)
"\1}{"
depth
"}{\\verb\1 "
(if head-line
(allout-latex-verb-quote head-line)
"")
"\1}\n"))
(if (not body-lines)
nil
;;(insert "\\beginlines\n")
(insert "\\begin{verbatim}\n")
(while body-lines
(setq curr-line (car body-lines))
(if (and (not body-content)
(not (string-match "^\\s-*$" curr-line)))
(setq body-content t))
; Mangle any occurrences of
; "\end{verbatim}" in text,
; it's special:
(if (and body-content
(setq bop (string-match "\\\\end{verbatim}" curr-line)))
(setq curr-line (concat (substring curr-line 0 bop)
">"
(substring curr-line bop))))
;;(insert "|" (car body-lines) "|")
(insert curr-line)
(allout-latex-verbatim-quote-curr-line)
(insert "\n")
(setq body-lines (cdr body-lines)))
(if body-content
(setq body-content nil)
(forward-char -1)
(insert "\\ ")
(forward-char 1))
;;(insert "\\endlines\n")
(insert "\\end{verbatim}\n")
)))