From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [ANN] e-latex back-end: changes to attributes syntax Date: Wed, 21 Nov 2012 17:35:48 +0100 Message-ID: <87haoiewwr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbDLQ-0000Gh-FK for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 11:40:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbDLJ-000575-9O for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 11:40:10 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:39752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbDLJ-00053i-0k for emacs-orgmode@gnu.org; Wed, 21 Nov 2012 11:40:05 -0500 Received: by mail-wg0-f49.google.com with SMTP id gg4so3257700wgb.30 for ; Wed, 21 Nov 2012 08:40:02 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List Hello, I've changed the attribute syntax for tables, images and lists in e-latex back-end (new exporter). New this back-end conforms to the syntax used by Babel and every other back-end. I've also added support for matrix editing. Here's an excerpt from the documentation in org-e-latex.el: Table export can be controlled with a number of attributes (through ATTR_LATEX keyword). - The main one is the `:mode' attribute, which can be set to `table', `math', `inline-math' and `verbatim'. In particular, when in `math' or `inline-math' mode, every cell is exported as-is and the table will be wrapped in a math environment. Also, horizontal rules are ignored. These modes are particularly useful to write matrices. Default mode is stored in `org-e-latex-default-table-mode'. - The second most important attribute is `:environment'. It is the environment used for the table and defaults to `org-e-latex-default-table-environment' value. It can be set to anything, including "tabularx", "longtable", "array", "bmatrix"... - `:float' attribute defines a float environment for the table. Possible values are `sidewaystable', `multicolumn' and `table'. - `:width' and `:align' attributes set, respectively, the width of the table and its alignment string. - `:booktabs', `:center' and `:rmlines' values are booleans. They toggle, respectively "booktabs" usage (assuming the package is properly loaded), table centering and removal of every horizontal rule but the first one (in a "table.el" table only). - `:math-prefix', `:math-suffix' and `:math-arguments' are string which will be inserted, respectively, before the table within the math environment, after the table within the math environment, and between the macro name and the contents of the table. The latter attribute is necessary to matrix macros that require more than one argument (i.e. "qbordermatrix"). Plain lists accept two optional attributes: `:environment' and `:options'. The first one allows to use a non-standard environment (i.e. "inparaenum"). The second one allows to specify optional arguments for that environment (square brackets are not mandatory). Images accept `:float', `:placement' and `:options' as attributes. `:float' accepts a symbol among `wrap', `multicolumn', and `figure', which defines the float environment for the table (if unspecified, an image with a caption will be set in a "figure" environment). `:placement' is a string that will be used as argument for the environment chosen. `:options' is a string that will be used as the optional argument for "includegraphics" macro. Here are some example to illustrate the changes, in particular in the table area: #+begin_src org #+LATEX_HEADER: \usepackage{amsmath}\usepackage{booktabs}\usepackage{mathtools}\usepackage{rotating} * Tables #+NAME: my-matrix #+attr_latex: :mode math :environment array #+attr_latex: :math-prefix "\\left(" :math-suffix "\\right)" | | | | a | b | |-----+-----| | c | d | This is a reference to matrix [[my-matrix]]. #+attr_latex: :mode math :environment matrix #+attr_latex: :math-prefix "M = \\left(" :math-suffix "\\right)" | a | b | |---+---| | c | d | #+attr_latex: :mode verbatim | a | b | |---+---| | c | d | #+attr_latex: :booktabs nil :align |r|l| :float sidewaystable | 123 | 123 | |-----+-----| | 1 | 1 | Some inlined matrix #+attr_latex: :mode inline-math :environment bsmallmatrix | a | b | |---+---| | c | d | . As you can see. Eventually some bordered matrix: #+attr_latex: :mode math :environment bordermatrix | | C_1 | C_2 | |-----+-----+-----| | L_1 | a | b | | L_2 | c | d | * Images (from manual) #+caption: The black-body emission of the disk around HR 4049 #+name: fig:SED-HR4049 #+attr_latex: :options "5cm,angle=90" [[./img/sed-hr4049.pdf]] #+attr_latex: :float wrap :placement "{r}{0.4\\textwidth}" :options "width=0.38\\textwidth" [[./img/hst.png]] #+end_src Regards, -- Nicolas Goaziou