emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: emacs@vergauwen.me
Cc: emacs-orgmode@gnu.org
Subject: Re: ox-latex table tabbing support.
Date: Mon, 04 Apr 2022 18:33:16 +0800	[thread overview]
Message-ID: <87wng5nno3.fsf@localhost> (raw)
In-Reply-To: <MzFxcjy--7-2@vergauwen.me>

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


  reply	other threads:[~2022-04-04 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 14:38 emacs--- via General discussions about Org-mode.
2022-04-04 10:33 ` Ihor Radchenko [this message]
     [not found] ` <87wng5nno3.fsf@localhost-Mzo7eKN----2>
2022-04-04 14:03   ` emacs--- via General discussions about Org-mode.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wng5nno3.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=emacs@vergauwen.me \
    --subject='Re: ox-latex table tabbing support.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).