bugGNU TeXmacs - Bugs: bug #63320, Macro redefinitions are not...


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

bug #63320: Macro redefinitions are not exported into LaTeX

Submitter:  Aeh9quu9 <ohnie0ai>
Submitted:  Sat 05 Nov 2022 01:34:44 PM UTC
Category:  Conversion Priority:  5 - Normal
Item Group:  Error Status:  Wont Fix
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release:  2.1.2
Fixed Release:  None Fixed Release: 

Thu 02 Nov 2023 11:54:16 PM UTC, comment #2: 

Gennady is correct to assess that this is somewhat 'undefined': it is difficult for TeXmacs to keep track of all macros that might have been defined somewhere in some LaTeX subpackage.

Nevertheless, as Gennady correctly points out, one may easily fix the problem using the 'specific' construct.  Instead of entirely shortcutting the preamble generated by TeXmacs (you may also use the preferences for this, by the way), it suffices to put a few 'specific' instructions in your TeXmacs preamble.  In your example, it suffices to put the following in your preamble.


Note that this will be put in your LaTeX preamble when exporting to LaTeX.

Joris van der Hoeven <vdhoeven>
Group administrator
Thu 05 Jan 2023 11:15:28 PM UTC, comment #1: 

I can reproduce this.

However I think that this is just undefined behavior. A workaround is to remove the TeXmacs macros all together and write the latex equivalent by hand. I actually have this in my default starting file:

<specific|latex|% !!!!end[TeXmacs][preamble]>


<specific|latex|% !!!!begin[LaTeX][document]>



and in the exported LaTeX file I just remove all the lines before the line

<specific|latex|% !!!!end[TeXmacs][preamble]>

and I have a separate my-texmacs.sty file where I manually include all relevant macros. I just copy-paste from the exported file (once) the macros I think are correct and write the others by hand.

Gennady Uraltsev <guraltsev>
Sat 05 Nov 2022 01:34:44 PM UTC, original submission:  

A sample code is attached. The redefined \dfn is not exported into LaTeX.

Aeh9quu9 <ohnie0ai>


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

Attached Files
file #53930:  test3.tm added by ohnie0ai (401B - 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 guraltsev (Posted a comment)
  • -email is unavailable- added by ohnie0ai (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
    2023-11-02 vdhoeven StatusNone Wont Fix
        Assigned toNone vdhoeven
        Open/ClosedOpen Closed
    2022-11-05 ohnie0ai Attached File- Added test3.tm, #53930

    Back to the top

    Powered by Savane 3.13-1277.
    Corresponding source code