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: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 14:38 ox-latex table tabbing support 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.
2022-06-21  4:43     ` Daniel Fleischer
2022-06-24 13:37       ` Robert Pluim
2022-06-24 14:20         ` Daniel Fleischer
2022-06-24 15:01           ` Robert Pluim
2022-06-24 15:50             ` Daniel Fleischer
2022-06-24 19:32             ` emacs--- via General discussions about Org-mode.
2022-06-25  3:32               ` Ihor Radchenko
2022-06-26 10:08                 ` Robert Pluim
2022-06-26 13:47                   ` [PATCH] describe how to override Author Robert Pluim
2022-06-26 14:04                     ` Daniel Fleischer
2022-06-27  9:53                     ` Ihor Radchenko
2022-06-28 12:07                       ` Robert Pluim
2022-06-29 10:10                         ` Ihor Radchenko
2022-06-30  8:18                           ` Robert Pluim
2022-06-30 13:19                             ` Ihor Radchenko
2022-06-30 15:17                               ` Robert Pluim
2022-07-02  4:21                                 ` Ihor Radchenko
2022-06-26  1:54       ` ox-latex table tabbing support Ihor Radchenko
2022-06-26  3:49         ` Kyle Meyer
2022-06-26 14:46           ` [PATCH] " Daniel Fleischer
2022-06-26 18:18             ` Kyle Meyer
2022-06-26 18:48               ` Daniel Fleischer

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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).