Function: org-latex-verse-block

org-latex-verse-block is a byte-compiled function defined in ox-latex.el.gz.

Signature

(org-latex-verse-block VERSE-BLOCK CONTENTS INFO)

Documentation

Transcode a VERSE-BLOCK element from Org to LaTeX.

CONTENTS is verse block contents. INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-latex.el.gz
(defun org-latex-verse-block (verse-block contents info)
  "Transcode a VERSE-BLOCK element from Org to LaTeX.
CONTENTS is verse block contents.  INFO is a plist holding
contextual information."
  (let* ((lin (org-export-read-attribute :attr_latex verse-block :lines))
         (latcode (org-export-read-attribute :attr_latex verse-block :latexcode))
         (cent (org-export-read-attribute :attr_latex verse-block :center))
         (attr (concat
                (if cent "[\\versewidth]" "")
                (if lin (format "\n\\poemlines{%s}" lin) "")
                (if latcode (format "\n%s" latcode) "")))
         (lit (org-export-read-attribute :attr_latex verse-block :literal))
         (versewidth (org-export-read-attribute :attr_latex verse-block :versewidth))
         (vwidth (if versewidth (format "\\settowidth{\\versewidth}{%s}\n" versewidth) ""))
         (linreset (if lin "\n\\poemlines{0}" "")))
    (org-latex--wrap-label
     verse-block
     (format "%s\\begin{verse}%s\n%s\\end{verse}%s"
             vwidth attr
             ;; If the `:literal' attribute is used, all blank lines
             ;; are preserved and exported as
             ;; `\\vspace*{\\baselineskip}', including the blank lines
             ;; before or after CONTENTS.
             (if (not lit)
                 (concat (org-trim contents t) "\n")
	       contents)
             linreset)
     info)))