|
From: | Jorge A. Alfaro-Murillo |
Subject: | Re: [O] Orgtbl, Radiotables: ":booktabs t" |
Date: | Tue, 19 Aug 2014 12:28:18 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
#+BEGIN_SRC emacs-lisp (defun orgtbl-to-latex-booktabs (table params) "Convert the Orgtbl mode TABLE to LaTeX using booktabs package." (let* ((alignment (mapconcat (lambda (x) (if x "r" "l")) org-table-last-alignment "")) (params2 (list :tstart (concat "\\begin{tabular}{" alignment "}\n\\toprule") :tend "\\bottomrule\n\\end{tabular}" :lstart "" :lend " \\\\" :sep " & " :efmt "%s\\,(%s)" :hline "\\midline"))) (orgtbl-to-generic table (org-combine-plists params2 params)))) (setq orgtbl-radio-table-templates (delete-if (lambda (x) (equal (car x) 'latex-mode)) orgtbl-radio-table-templates)) (add-to-list 'orgtbl-radio-table-templates '(latex-mode "% BEGIN RECEIVE ORGTBL %n\n% END RECEIVE ORGTBL %n\n\\begin{comment}\n#+ORGTBL: SEND %n orgtbl-to-latex-booktabs :splice nil :skip 0\n| | |\n\\end{comment}\n")) #+END_SRC
-- Jorge.
[Prev in Thread] | Current Thread | [Next in Thread] |