bugGNU TeXmacs - Bugs: bug #60441, LaTeX export of a macro definition...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #60441: LaTeX export of a macro definition based on a table does not work

Submitter:  Giovanni Piredda <pireddag>
Submitted:  Thu 22 Apr 2021 07:27:49 PM UTC
   
 
Category:  None Priority:  5 - Normal
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release:  1.99.19
Fixed Release:  None Fixed Release: 
Keywords: 

Mon 03 May 2021 04:06:04 PM UTC, comment #2: 

As far as I can see all macros where the table content is an argument are not exported.

E.g.

<assign|wide-tabular-borders|<macro|body|<tformat|<twith|table-width|1par>|<twith|table-hmode|exact>|<twith|table-block|yes>|<cwith|1|-1|1|-1|cell-hyphen|t>|<cwith|1|-1|1|-1|cell-hpart|0.001>|<cwith|1|-1|1|1|cell-lsep|0fn>|<cwith|1|-1|-1|-1|cell-rsep|0fn>|<cwith|1|1|1|-1|cell-bborder|1ln>|<arg|body>>>>

Giovanni Piredda <pireddag>
Mon 03 May 2021 11:57:03 AM UTC, comment #1: 

This is not really a bug, because we do not guarantee anything when exporting use macros that are based on undocumented internal macros like 'math-table-base'.

In revision 13484, I at least made a change that at least prevents the conversion process to abruptly abort due to Scheme error.  But the exported macro cannot really be used.

Joris van der Hoeven <vdhoeven>
Group administrator
Thu 22 Apr 2021 07:27:49 PM UTC, original submission:  

The LaTeX converter crashes when converting a macro definition where a table is represented by an argument.
Please see attached document.
Possibly the crashing function is stm-table-cells in old-tmtable.scm, which is expecting a table but receives the macro argument.

Here is the backtrace for the file in attachment:

Backtrace:
In unknown file:
   ?: 47* [tmtex (concat (left ".") (tformat (cwith "1" "-1" ...) (!arg {"1"})) ...)]
In /home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/convert/latex/tmtex.scm:
2753: 48* (cond ((string? x) (tmtex-string x)) ((list>0? x) (tmtex-apply # #)) ...)
2754: 49  [tmtex-apply concat ((left ".") (tformat # #) (right "}"))]
    ...
 873: 50  [tex-concat ...
 873: 51* [tmtex-list ((left ".") (tformat # #) (right "}"))]
2750: 52  [map-in-order #<procedure tmtex (x)> (# # #)]
In unknown file:
   ?: 53* [tmtex (tformat (cwith "1" "-1" ...) (!arg {"1"}))]
In /home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/convert/latex/tmtex.scm:
2753: 54* (cond ((string? x) (tmtex-string x)) ((list>0? x) (tmtex-apply # #)) ...)
2754: 55  [tmtex-apply tformat ((cwith "1" "-1" ...) (!arg {"1"}))]
    ...
1415: 56  (let* ((env #) (env* #) (before #) ...) (tex-concat (list before # ...)))
1421: 57* [tmtable-parser (tformat (cwith "1" "-1" "1" ...) (tformat # #))]
In /home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/convert/tools/old-tmtable.scm:
 266: 58  (let* ((this #)) (define (global name) (cond # #)) ...)
 266: 59* [stm->tmtable (tformat (cwith "1" "-1" "1" ...) (tformat # #))]
 210: 60  [tmtable ((cwith 1 -1 ...) (cwith 1 -1 ...)) ...
 211: 61* [stm-table-cells (tformat (cwith "1" "-1" "1" ...) (tformat # #))]
 158: 62  [map #<procedure stm-table-row->list (x)> ...
 159: 63* (do ((x x (last x))) ((func? x (quote table)) (cdr x)))
 159: 64* [cAr {"1"}]
In /home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/kernel/library/list.scm:
  96: 65  [car ...
  96: 66* [last-pair {"1"}]

/home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/kernel/library/list.scm:96:8: In procedure last-pair in expression (last-pair l):
/home/giovanni/Downloads/TeXmacs/TeXmacs-1.99.19-x86_64-pc-linux-gnu/TeXmacs/progs/kernel/library/list.scm:96:8: Wrong type argument in position 1 (expecting pair): "1"

Giovanni Piredda <pireddag>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #51305:  test-late-export-table-macro.tm added by pireddag (1KiB - text/x-texmacs.doc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by pireddag (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-03 vdhoeven StatusNone Fixed
        Assigned toNone vdhoeven
        Open/ClosedOpen Closed
    2021-04-22 pireddag Attached File- Added test-late-export-table-macro.tm, #51305

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code