Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-22 Thread Arash Esbati
Hi Mosè,

Mosè Giordano  writes:

> 2016-12-20 12:19 GMT+01:00 Arash Esbati :
>> The in and out file are attached.  Running make in tests directory
>> shows that my test fails due to this excerpt:
>
> I think that now it'll work ;-)  Adding
>
> (setq TeX-parse-self t)
>
> before (LaTeX-mode) should suffice.

works like a charme.  Thanks for looking at this.  I will update the
test case.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-20 Thread Mosè Giordano
Hi Arash,

2016-12-20 12:19 GMT+01:00 Arash Esbati :
> The in and out file are attached.  Running make in tests directory
> shows that my test fails due to this excerpt:

I think that now it'll work ;-)  Adding

(setq TeX-parse-self t)

before (LaTeX-mode) should suffice.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-20 Thread Arash Esbati
Hi Mosè,

Mosè Giordano  writes:

> first of all, thanks for your work!  If you believe this change is
> worth a mention in changes.texi, drop there a few lines.

Thanks, I could put some lines into changes.texi.

> 2016-12-16 15:57 GMT+01:00 Arash Esbati :
>>  Do you have a hint how I can run style hooks
>> (e.g. tabularx.el) while running the test?  I could expand the test for
>> the packages being commented out right now.
>
> Sorry, I overlooked this message before, just noticed after looking to
> the patches you installed yesterday.
>
> I'm a bit surprised by your question because I'd say that the answer
> is pretty easy, but maybe I'm missing something: if you parse the
> visited buffer, all style files of included packages are automatically
> run, otherwise you can manually call `TeX-run-style-hook'.  Does this
> help?

You will have seen that I put the test
`LaTeX-count-ampersands-inserted-in-tabular' into latex-test.el.  My
problem is that I couldn't find a way to load, e.g. tabularx.el, in the
test body.  I tried `TeX-run-style-hook' after (LaTeX-mode) or `(setq
TeX-parse-self t)' before (LaTeX-mode) in

  (should (string=
   (with-temp-buffer
 (insert-file-contents tabular-count-ampersands/in)
 
 (LaTeX-mode)
 
 ...

The in and out file are attached.  Running make in tests directory
shows that my test fails due to this excerpt:

,[ Test result ]
| \\begin{tabularx}{1.0\\linewidth}{llX}
|   1 & 2 & LaTeX-insert-item
| \\item
| \\end{tabularx}
`

,[ Expected test result ]
| \\begin{tabularx}{1.0\\linewidth}{llX}
|   1 & 2 & LaTeX-insert-item 
| &&
| \\end{tabularx}
`

Best, Arash



tabular-count-ampersands-in.tex
Description: TeX document


tabular-count-ampersands-out.tex
Description: TeX document
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-20 Thread Mosè Giordano
Hi Arash and Ikumi,

first of all, thanks for your work!  If you believe this change is
worth a mention in changes.texi, drop there a few lines.

2016-12-16 15:57 GMT+01:00 Arash Esbati :
>  Do you have a hint how I can run style hooks
> (e.g. tabularx.el) while running the test?  I could expand the test for
> the packages being commented out right now.

Sorry, I overlooked this message before, just noticed after looking to
the patches you installed yesterday.

I'm a bit surprised by your question because I'd say that the answer
is pretty easy, but maybe I'm missing something: if you parse the
visited buffer, all style files of included packages are automatically
run, otherwise you can manually call `TeX-run-style-hook'.  Does this
help?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-19 Thread Ikumi Keita
Hi Arash and all,

> Following up myself, I did some more testing with your code and it
> worked like a charm and since there was no objections, I pushed the code
> incl. a test case and an update to the docs to git.  I added a style for
> dcolumn.sty and also fixed a bug in array.el.

> Again, thank you for taking your time.

You're welcome.  I just followed a way you opened.  If you hadn't tried
to support *-operator, I had thought that it was too difficult to
implement.  I'm glad that my work serves you and all.

Regards,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-19 Thread Arash Esbati
Hi Ikumi and all,

Arash Esbati  writes:

> Ikumi Keita  writes:
>>
>> Apparently recursive call of LaTeX-array-count-columns is needed do the
>> task.  How about this one?
>> [...]
>
> Thanks!  I'm fine with your suggestions.  I have already pushed some
> patches to git for other styles.  Once we have this function sorted out,
> I would add some additional tests (see my other message to Mosè) and
> update latex.el.  Then `M-RET' should work for all tabular env's.

Following up myself, I did some more testing with your code and it
worked like a charm and since there was no objections, I pushed the code
incl. a test case and an update to the docs to git.  I added a style for
dcolumn.sty and also fixed a bug in array.el.

Again, thank you for taking your time.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-17 Thread Arash Esbati
Hi Ikumi,

Ikumi Keita  writes:

>> 2 thing occurred to me when hitting `M-RET' in tabular environments:
>> Current code in `LaTeX-array-count-columns' cannot handle multi column
>> specs like `*{num}{spec}' and optional args to column specs S and s from
>> siunitx.el.  I have a patch to handle both issues.  Can people please
>> test this code against their tabular's and see if it does the right
>> thing?
>
> I found two cases that the code does not work as expected.
> (1) When the second argument of *-operator contains more than 1
> columns.
>
> \begin{tabular}[t]{*{3}{|cr}l}
>   1 & 2 & 3 & 4 & 5 & 6 & 7 \\
> &&&
> \end{tabular}
>
> (2) When *-operator is nested.
> \begin{tabular}[t]{*{3}{c*{2}{r}}l}
>   1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 0 \\
> &&&
> \end{tabular}

Thanks for looking at this.  Indeed, I totally ignored these cases!  I
admit that I've never seen case (2), but it works and your code supports
it.

> Apparently recursive call of LaTeX-array-count-columns is needed do the
> task.  How about this one?
>
> (defun LaTeX-array-count-columns (start end)
>   "Count number of ampersands to be inserted.
> The columns are specified by the letters found in the string
> `LaTeX-array-column-letters' and the number of those letters within the
> text between START and END is basically considered to be the number of
> columns.  The arguments surrounded between braces such as p{30pt} do not
> interfere the count of columns.
>
> Return one less number than the columns, or nil on failing to count the
> right number."
>   (save-excursion
> (let (p (cols 0))
>   (goto-char start)
>   (while (< (setq p (point)) end)
>
>   ;; The below block accounts for one unit of move for
>   ;; one column.
> (setq cols (+ cols
> ;; treat *-operator specially.
>   (if (eq (following-char) ?*)
> ;; *-operator is there.
>   (progn
>   ;; pick up repetition number and count
>   ;; how many columns are repeated.
> (re-search-forward
>  "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ 
> \t\r\n%]*}" end)
>   (let ((n (string-to-number
>   (match-string-no-properties 1)))
> ;; get start and end of repeated spec.
> (s (progn (down-list 1) (point)))
> (e (progn (up-list 1) (1- (point)
> (* n (1+ (LaTeX-array-count-columns s e)
>   ;; not *-operator.
> (skip-chars-forward
>  LaTeX-array-column-letters end
>   (skip-chars-forward (concat
>"^" LaTeX-array-column-letters "*"
>TeX-grop LaTeX-optop) end)
> (when (or (eq (following-char) ?\{)
>   (eq (following-char) ?\[))
>   (forward-list 1))
>
>   ;; Not sure whether this is really necessary or not, but
>   ;; prepare for possible infinite loop anyway.
>   (when (eq p (point))
> (setq cols nil)
> (goto-char end)))
>   ;; The number of ampersands is one less than column.
>   (if cols (1- cols)
>
> The above version also changes the construct
>   (if (looking-at-p "\\*[ \t\r\n%]*{[ \t\r\n%0-9]+}")
>   (progn
> (re-search-forward
>  "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ \t\r\n%]*}" end t)
> to
>   (if (eq (following-char) ?*)
>   (progn
> (re-search-forward
>  "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ \t\r\n%]*}" end)
> based on the following two reasons.
> [a] Simple check of `the next char is * or not?' seems sufficient for
> the purpose.  (In addition, looking-at-p is not available in older
> emacsen.)
> [b] The noerror argument of re-search-forward is dropped.  If that
> re-search-forward fails, the string-to-number on the next line does not
> make sense.  Even if the error is raised here, it is captured by
> ignore-erros in LaTeX-insert-ampersands so the users are not bothered by
> the error.

Thanks!  I'm fine with your suggestions.  I have already pushed some
patches to git for other styles.  Once we have this function sorted out,
I would add some additional tests (see my other message to Mosè) and
update latex.el.  Then `M-RET' should work for all tabular env's.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-16 Thread Ikumi Keita
Hi Arash and all,

> 2 thing occurred to me when hitting `M-RET' in tabular environments:
> Current code in `LaTeX-array-count-columns' cannot handle multi column
> specs like `*{num}{spec}' and optional args to column specs S and s from
> siunitx.el.  I have a patch to handle both issues.  Can people please
> test this code against their tabular's and see if it does the right
> thing?

I found two cases that the code does not work as expected.
(1) When the second argument of *-operator contains more than 1
columns.

\begin{tabular}[t]{*{3}{|cr}l}
  1 & 2 & 3 & 4 & 5 & 6 & 7 \\
&&&
\end{tabular}

(2) When *-operator is nested.
\begin{tabular}[t]{*{3}{c*{2}{r}}l}
  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 0 \\
&&&
\end{tabular}

Apparently recursive call of LaTeX-array-count-columns is needed do the
task.  How about this one?

(defun LaTeX-array-count-columns (start end)
  "Count number of ampersands to be inserted.
The columns are specified by the letters found in the string
`LaTeX-array-column-letters' and the number of those letters within the
text between START and END is basically considered to be the number of
columns.  The arguments surrounded between braces such as p{30pt} do not
interfere the count of columns.

Return one less number than the columns, or nil on failing to count the
right number."
  (save-excursion
(let (p (cols 0))
  (goto-char start)
  (while (< (setq p (point)) end)

;; The below block accounts for one unit of move for
;; one column.
(setq cols (+ cols
  ;; treat *-operator specially.
  (if (eq (following-char) ?*)
  ;; *-operator is there.
  (progn
;; pick up repetition number and count
;; how many columns are repeated.
(re-search-forward
 "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ 
\t\r\n%]*}" end)
(let ((n (string-to-number
(match-string-no-properties 1)))
  ;; get start and end of repeated spec.
  (s (progn (down-list 1) (point)))
  (e (progn (up-list 1) (1- (point)
  (* n (1+ (LaTeX-array-count-columns s e)
;; not *-operator.
(skip-chars-forward
 LaTeX-array-column-letters end
(skip-chars-forward (concat
 "^" LaTeX-array-column-letters "*"
 TeX-grop LaTeX-optop) end)
(when (or (eq (following-char) ?\{)
  (eq (following-char) ?\[))
  (forward-list 1))

;; Not sure whether this is really necessary or not, but
;; prepare for possible infinite loop anyway.
(when (eq p (point))
  (setq cols nil)
  (goto-char end)))
  ;; The number of ampersands is one less than column.
  (if cols (1- cols)

The above version also changes the construct
  (if (looking-at-p "\\*[ \t\r\n%]*{[ \t\r\n%0-9]+}")
  (progn
(re-search-forward
 "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ \t\r\n%]*}" end t)
to
  (if (eq (following-char) ?*)
  (progn
(re-search-forward
 "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ \t\r\n%]*}" end)
based on the following two reasons.
[a] Simple check of `the next char is * or not?' seems sufficient for
the purpose.  (In addition, looking-at-p is not available in older
emacsen.)
[b] The noerror argument of re-search-forward is dropped.  If that
re-search-forward fails, the string-to-number on the next line does not
make sense.  Even if the error is raised here, it is captured by
ignore-erros in LaTeX-insert-ampersands so the users are not bothered by
the error.

Regards,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-15 Thread Mosè Giordano
Hi Arash,

2016-12-14 15:52 GMT+01:00 Arash Esbati :
> Hi Mosè,
>
> Mosè Giordano  writes:
> Thanks for testing!  I can take the file I posted with some other
> environments and add it as `tabular-ampersand-count.tex' under
> auctex.git/tests/latex.  Is this what you have in mind?

Yes.  But if you prefer, you may want to create a new file for testing
these tabular-related features,

> I can't see how
> to insert the test into `latex-test.el'.  Any hints?

For example in the file you sent at the beginning of the thread

(LaTeX-array-count-columns 1920 1928)

returns currently 0, but 4 after evaluating your new definition of the
function.  In the test file you can add a test like this one.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-15 Thread Ikumi Keita
Hi Arash,

> Thanks for your response.  This syntax is actually standard LaTeX, e.g.:

> \documentclass{article}

> \begin{document}
> \_
> \begin{tabular}[t]{@{}*{2}{l}r}
>   1 & 2 & some longish text \\
>   1 & 2 & some text \\ \hline
> \end{tabular}
> \_
> \end{document}

Oh, sorry.  You are right.  I should have tested more carefully.

> The lack of support for this was the main motivation for me to extend
> `LaTeX-array-count-columns'.

That seems to me an enough reason to do so.

> I think we are not closing that door.  If someone wants to write a style
> for tabu.sty, he/she can (and probably should) go the route you're
> suggesting.

> In general, I also think that `latex.el' should support vanilla LaTeX,
> but since the overhead for `\begin{tabular}{X[foo = bar]}' support is
> quite low, I think we can leave it in `LaTeX-array-count-columns'.

I see.  That's fine with me.

> I should also mention that one could write

> \documentclass{article}

> \begin{document}
> \_
> \begin{tabular}[t]{@{}*2lr}
>   1 & 2 & some longish text \\
>   1 & 2 & some text \\ \hline
> \end{tabular}
> \_
> \end{document}

> Note the missing braces around 2 and l.  While LaTeX compiles this
> happily, my code chokes due to missing braces.  But I consider this a
> feature :-)

> WDYT?

Hmm, this style is confusing.  I think good LaTeX users should avoid
omitting braces like this example, so I agree that this should be
regarded as feature.

Bye,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-14 Thread Arash Esbati
Hi Ikumi,

Ikumi Keita  writes:

>> 2 thing occurred to me when hitting `M-RET' in tabular environments:
>> Current code in `LaTeX-array-count-columns' cannot handle multi column
>> specs like `*{num}{spec}' and optional args to column specs S and s from
>> siunitx.el.  I have a patch to handle both issues.
>
> Instead of modifying LaTeX-array-count-columns, how about putting such
> customized function in array.el and preparing to call it in a fashion
> like
>
>   (LaTeX-insert-ampersands
>LaTeX-array-skipping-regexp 'NEW-FUNCTION-NAME)
>
> in TeX-add-style-hook?  Syntaxes like
> \begin{tabular}[t]{*{4}{l}l}
> and

Thanks for your response.  This syntax is actually standard LaTeX, e.g.:

\documentclass{article}

\begin{document}
\_
\begin{tabular}[t]{@{}*{2}{l}r}
  1 & 2 & some longish text \\
  1 & 2 & some text \\ \hline
\end{tabular}
\_
\end{document}

The lack of support for this was the main motivation for me to extend
`LaTeX-array-count-columns'.

> \begin{tabular}{X[foo = bar]}
> are not supported in the standard LaTeX.  If such enhancements continue
> to pile up in future to cover syntaxes provided by other packages,
> LaTeX-array-count-columns might become much complicated and be hard to
> read and maintain.

I agree.  But I found that supporting this syntax inside
`LaTeX-array-count-columns' was rather easy.

> Of course such approach has drawbacks.  As well as being redundant to
> have similar codes at multiple locations, when someone improves
> LaTeX-array-count-columns, that person has to look in all style/*.el
> files and apply the same change to all the customized functions.
>
> So I won't object if you choose your original approach.  How do you
> think about that?

I think we are not closing that door.  If someone wants to write a style
for tabu.sty, he/she can (and probably should) go the route you're
suggesting.

In general, I also think that `latex.el' should support vanilla LaTeX,
but since the overhead for `\begin{tabular}{X[foo = bar]}' support is
quite low, I think we can leave it in `LaTeX-array-count-columns'.

I should also mention that one could write

\documentclass{article}

\begin{document}
\_
\begin{tabular}[t]{@{}*2lr}
  1 & 2 & some longish text \\
  1 & 2 & some text \\ \hline
\end{tabular}
\_
\end{document}

Note the missing braces around 2 and l.  While LaTeX compiles this
happily, my code chokes due to missing braces.  But I consider this a
feature :-)

WDYT?

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-14 Thread Ikumi Keita
Hi Arash,

> 2 thing occurred to me when hitting `M-RET' in tabular environments:
> Current code in `LaTeX-array-count-columns' cannot handle multi column
> specs like `*{num}{spec}' and optional args to column specs S and s from
> siunitx.el.  I have a patch to handle both issues.

Instead of modifying LaTeX-array-count-columns, how about putting such
customized function in array.el and preparing to call it in a fashion
like

  (LaTeX-insert-ampersands
   LaTeX-array-skipping-regexp 'NEW-FUNCTION-NAME)

in TeX-add-style-hook?  Syntaxes like
\begin{tabular}[t]{*{4}{l}l}
and
\begin{tabular}{X[foo = bar]}
are not supported in the standard LaTeX.  If such enhancements continue
to pile up in future to cover syntaxes provided by other packages,
LaTeX-array-count-columns might become much complicated and be hard to
read and maintain.

Of course such approach has drawbacks.  As well as being redundant to
have similar codes at multiple locations, when someone improves
LaTeX-array-count-columns, that person has to look in all style/*.el
files and apply the same change to all the customized functions.

So I won't object if you choose your original approach.  How do you
think about that?

Bye,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-14 Thread Arash Esbati
Hi Mosè,

Mosè Giordano  writes:

> 2016-12-14 12:34 GMT+01:00 Arash Esbati :
>>
>> 2 thing occurred to me when hitting `M-RET' in tabular environments:
>> Current code in `LaTeX-array-count-columns' cannot handle multi column
>> specs like `*{num}{spec}' and optional args to column specs S and s from
>> siunitx.el.  I have a patch to handle both issues.  Can people please
>> test this code against their tabular's and see if it does the right
>> thing?  My test file is:
>>
>> [...]

> I briefly tested the file, and seems to work nicely, thanks for your work!
>
> As usual, I strongly suggest you to add the appropriate tests for the
> new feature.

Thanks for testing!  I can take the file I posted with some other
environments and add it as `tabular-ampersand-count.tex' under
auctex.git/tests/latex.  Is this what you have in mind?  I can't see how
to insert the test into `latex-test.el'.  Any hints?

I have to patch longtable.el and siunitx.el before.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Extending `LaTeX-array-count-columns'

2016-12-14 Thread Mosè Giordano
Hi Arash,

2016-12-14 12:34 GMT+01:00 Arash Esbati :
> Hi all,
>
> 2 thing occurred to me when hitting `M-RET' in tabular environments:
> Current code in `LaTeX-array-count-columns' cannot handle multi column
> specs like `*{num}{spec}' and optional args to column specs S and s from
> siunitx.el.  I have a patch to handle both issues.  Can people please
> test this code against their tabular's and see if it does the right
> thing?  My test file is:
>
> --8<---cut here---start->8---
> \documentclass{article}
>
> \usepackage{siunitx}
> \usepackage{array}
> \usepackage{tabularx}
> \newcolumntype{Y}{>{\tiny\scshape}r}
>
> \begin{document}
>
> Eval first:
> \begin{verbatim}
> (defun LaTeX-array-count-columns (start end)
>   "Count number of ampersands to be inserted.
> The columns are specified by the letters found in the string
> `LaTeX-array-column-letters' and the number of those letters within the
> text between START and END is basically considered to be the number of
> columns.  The arguments surrounded between braces such as p{30pt} do not
> interfere the count of columns.
>
> Return one less number than the columns, or nil on failing to count the
> right number."
>   (save-excursion
> (let (p (cols 0))
>   (goto-char start)
>   (while (< (setq p (point)) end)
>
> ;; The below block accounts for one unit of move for
> ;; one column.
> (setq cols (+ cols
>   (if (looking-at-p "\\*[ \t\r\n%]*{[ \t\r\n%0-9]+}")
>   (progn
> (re-search-forward
>  "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ 
> \t\r\n%]*}" end t)
> (string-to-number (match-string-no-properties 1)))
> (skip-chars-forward
>  LaTeX-array-column-letters end
> (skip-chars-forward (concat
>  "^" LaTeX-array-column-letters "*"
>  TeX-grop LaTeX-optop) end)
> (when (or (eq (following-char) ?\{)
>   (eq (following-char) ?\[))
>   (forward-list 1))
>
> ;; Not sure whether this is really necessary or not, but
> ;; prepare for possible infinite loop anyway.
> (when (eq p (point))
>   (setq cols nil)
>   (goto-char end)))
>   ;; The number of ampersands is one less than column.
>   (if cols (1- cols)
> \end{verbatim}
>
> Standard procedure:
> \begin{tabular}[t]{*{4}{l}l}
>   1 & 2 & 3 & 4 & 5 \\
> 
> \end{tabular}
>
> Add some commands before cells:
> \begin{tabular}[b]{*{4}{>{\scriptsize}l}>{\huge}l}
>   1 & 2 & 3 & 4 & 5 \\
> 
> \end{tabular}
>
> \begin{tabular}{*{4}{>{\scriptsize}l} |l|}
>   1 & 2 & 3 & 4 & 5 \\
> 
> \end{tabular}
>
> Custom column spec `Y':
> \begin{tabular}[t]{* { 2 } {>{\scriptsize}l} | Y | * { 2 } {r}}
>   1 & 2 & 3 & 4 & 5 \\
> 
> \end{tabular}
>
> Eval first for `siunitx.el':
> \begin{verbatim}
> (set (make-local-variable 'LaTeX-array-column-letters)
>  (concat LaTeX-array-column-letters "sS"))
> \end{verbatim}
>
> Ignore optional `[...]' after S and s:
> \begin{tabular}{
>   s
>   S[table-number-alignment = center]
>   s[table-number-alignment = left]
>   S[table-number-alignment = right]
>   }
>   {Some Values} & {Some Values} & {Some Values} & {Some Values} \\
> &&&
> \end{tabular}
>
> \begin{tabular}{%
>   S[table-format = 1.1e1]
>   S[fixed-exponent = 3 ,
> table-format = 2.1 ,
> table-omit-exponent ] }
>   1 & 2 \\
> &
> \end{tabular}
> \end{document}
> --8<---cut here---end--->8---
>
> Any comments welcome.

I briefly tested the file, and seems to work nicely, thanks for your work!

As usual, I strongly suggest you to add the appropriate tests for the
new feature.

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel