[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ox-latex table tabbing support.
From: |
Ihor Radchenko |
Subject: |
Re: ox-latex table tabbing support. |
Date: |
Mon, 04 Apr 2022 18:33:16 +0800 |
emacs--- via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:
> I have implemented tabbing
> (http://www.ctex.org/documents/latex/latex2e-html/ltx-58.html) support for
> ox-latex. By setting #+ATTR_LATEX: :mode tabbingthe exporter will use the
> tabbing environment.
>
> The benefits of using tabbing over tabular:
> - Can span multiple pages (also possible with long tables).
> - Cell width is fixed and does not depend on the content.
> - Cells can overflow.
Looks useful. Marking your message as a patch to be tracked at
updated.orgmode.org
Some comments are below.
> TINYCHANGE
Note that your patch >15 LOC and cannot be applied without copyright
assignment. See https://orgmode.org/worg/org-contribute.html#copyright
> -;; `org-latex--org-table' or `org-latex--math-table' functions,
> +;; `org-latex--org-table' or `org-latex--math-table' or
> `org-latex--org-tabbing' functions,
We generally try to keep all the text in source files narrower than 70
characters (default value of fill-column). You can use fill-region to
make Emacs autofill the comment lines.
> +(defun org-latex--align-string-tabbing (table info &optional math?)
It looks like math? argument is unused. Is it intentional?
> + "Return an appropriate LaTeX alignment string, for the
> +latex tabbing environment.
> +TABLE is the considered table. INFO is a plist used as
> +a communication channel. When optional argument MATH? is
> +non-nil, TABLE is meant to be a matrix, where all cells are
> +centered."
> + (or (org-export-read-attribute :attr_latex table :align)
> + (let ((align "")
> + (count 0)
> + (separator ""))
> + (progn
You do not need an extra progn inside let.
> +(defun org-table--org-tabbing (table contenst info)
^contents
> + "Return appropriate LaTeX code for an Org table, using the
> +latex tabbing syntax.
> +TABLE is the table type element to transcode. CONTENTS is its
> +contents, as a string. INFO is a plist used as a communication
> +channel.
> +This function assumes TABLE has `org' as its `:type' property and
> +`tabbing' as its `:mode' attribute."
> + (let ((output (format "\\begin{%s}\n%s\n%s\\end{%s}"
> + "tabbing"
> + (org-latex--align-string-tabbing table info )
> + contenst
^contents
Best,
Ihor
- Re: ox-latex table tabbing support.,
Ihor Radchenko <=