bugGNU TeXmacs - Bugs: bug #47442, Macro argument ignored from...

 
 

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

bug #47442: Macro argument ignored from included file

Submitter:  Punto Di Rosso <puntodirosso>
Submitted:  Thu 17 Mar 2016 10:49:29 AM UTC
   
 
Category:  Editor Priority:  5 - Normal
Item Group:  Error Status:  Works For Me
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  None Fixed Release: 
Keywords: 

Fri 23 Jun 2017 01:33:42 PM UTC, comment #3: 

Philippe is right.  Please look at "Help -> Manual -> Writing your own style files" for some documentation on this issue.

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 22 Mar 2017 09:48:13 PM UTC, comment #2: 

maybe I wasn't precise enough.
Style files are invoked through a <style|> tag (which is not even visible in the preamble) and not through <include|>.  If you follow this, it should work as expected.

However, macros in included files partially work as you could see: You can think of them as redefining already existing macros, and they'll allow entering arguments if the prexisting definition has at least as many arguments (and it will place question marks for arguments that had no "slot" in the original definition).

Maybe this precision should be added to the documentation on "include"?

Philippe Joyez <pjoyez>
Group Member
Thu 17 Mar 2016 11:35:07 AM UTC, comment #1: 


Style files are exactly what you need. Your defs.tm should be a style file (.ts) that arg.tm would use as a style.

Inclusions are meant to incorporate a document in another one (think of a chapter in a book).

Philippe Joyez <pjoyez>
Group Member
Thu 17 Mar 2016 10:49:29 AM UTC, original submission:  

Version: 1.99.4

Steps:

1. Create a "source style" file with one macro with one (or several) argument.
2. Create another file in the same directory with a hidden preamble in which the first file is included with the "include" command.
3. Try to use the macro in that file.

Result: instead of asking for the value of the argument, the editor show the result of the macro with a question marks where the argument should be.

Alternative:
Use the attached (minimal) test files:
- defs.tm is the first file, it contains a macro called "simple" with one argument z and which is supposed to display "\z+1".
- args.tm is the second file, typing "\simple" + enter results in showing "?+1".

Punto Di Rosso <puntodirosso>

 

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

Attached Files
file #36666:  args.tm added by puntodirosso (587B - text/x-texmacs)
file #36667:  defs.tm added by puntodirosso (138B - text/x-texmacs)

 

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 pjoyez (Posted a comment)
  • -email is unavailable- added by puntodirosso (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-23 vdhoeven Item GroupNone Error
        StatusNone Works For Me
        Assigned toNone vdhoeven
        Open/ClosedOpen Closed
    2016-03-17 puntodirosso Attached File- Added args.tm, #36666
        Attached File- Added defs.tm, #36667

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code