## GNU TeXmacs - Bugs: bug #40709, LaTeX export of customized macros...

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

## bug #40709: LaTeX export of customized macros redefines commands

 Submitted by: Miguel de Benito Submitted on: Tue 26 Nov 2013 12:42:53 PM UTC Category: Conversion Priority: 5 - Normal Item Group: Error Status: Fixed Privacy: Public Assigned to: Francois Poulain Originator Name: Open/Closed: Closed Release: SVN 7906 Release: None Fixed Release: None Fixed Release: Keywords:

Thu 12 Dec 2013 03:03:40 PM UTC, comment #3:

I fixed it, but the list of the TeXmacs macros (wich shouldn't be overwritten) is quite incomplete, I guess. For now I use the list of TeXmacs tags which have an explicit LaTeX conversion (i.e. defined in dispatcher).

But there is many tags wich behave well using standard implicit / syntaxic conversion.

Francois Poulain <fpoulain>
Thu 12 Dec 2013 12:00:57 PM UTC, comment #2:

So, after discussing with Joris, we will apply policy 1).

Francois Poulain <fpoulain>
Tue 03 Dec 2013 04:03:06 PM UTC, comment #1:

One problem is that there is no easy way to distinguish when the user defined macro is styling (which should be left away) and when the user macro is semantics (to be inserted in the LaTeX document).

Before Joris added this feature, all defined macros where understood as "user defined semantic". But now this is not true anymore. So, to handle this we should keep trace of which macro has been edited "by hand", and which macro has been edited from TeXmacs styles.

I see three possible way to do this:
1) Each assignment of a TeXmacs existing tag is considered has a styling macro, and his ignored. But is may be tedious I think.
2) Inserting styling macro in an ad-hoc tag (into or out-side of hide-preamble), e.g. in a <\hide-styling> ... </hide-styling> tag.
3) Storing a list of edited macros in the aux of the document.

Joris, how do you feel it ?

Francois Poulain <fpoulain>
Tue 26 Nov 2013 12:42:53 PM UTC, original submission:

Customization of macros using the new features (click on the wrench in the focus toolbar to edit the macro), inserts redefinitions of macros in the document preamble. These redefinitions are not handled by the LaTeX export, resulting in duplicate \newcommand{} and errors during latex compilation.

Try the attached file for an example.

Miguel de Benito <mdbenito>

Attached Files
file #29717:  test-custom-macro.tex added by mdbenito (405B - application/octet-stream)

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -unavailable- added by mdbenito (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):