[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Underlined table headings in LaTeX
From: |
Trent Buck |
Subject: |
[emacs-wiki-discuss] Underlined table headings in LaTeX |
Date: |
Sun, 30 Oct 2005 20:03:45 +1100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
This minor change underlines table headers and overlines table footers in LaTeX
styles, which is about the easiest way to make them visually distinct from the
table body.
(defun muse-latex-markup-table ()
(let* ((str (prog1
(match-string 1)
(delete-region (match-beginning 0) (match-end 0))))
(fields (split-string str "\\s-*|+\\s-*"))
(type (and (string-match "\\s-*\\(|+\\)\\s-*" str)
(length (match-string 1 str)))))
(insert "\\begin{tabular}{" (make-string (length fields) ?l) "}\n")
(when (= type 3) (insert "\\hline\n")) ; added line
(insert (mapconcat 'identity fields " & "))
(insert " \\\\\n") ; added line
(when (= type 2) (insert "\\hline\n")) ; added line
(insert "\\end{tabular}"))) ; changed line
--
Trent Buck, Student Errant
- [emacs-wiki-discuss] Underlined table headings in LaTeX,
Trent Buck <=