mailing-list for TeXmacs Users

Text archives Help


Re: Macro for inserting blocks of code won't work properly


Chronological Thread 
  • From: Massimiliano Gubinelli <address@hidden>
  • To: Nicolas Chouvalidzé <address@hidden>
  • Cc: texmacs-users <address@hidden>
  • Subject: Re: Macro for inserting blocks of code won't work properly
  • Date: Thu, 26 Nov 2020 22:27:44 +0100

I made a small presentation out of this example: 



:)
enjoy.
m


On 26. Nov 2020, at 21:29, Massimiliano Gubinelli <address@hidden> wrote:

It seems to be a problem with the numbered macro. Indeed if I remove it leaving the python-code macro alone it works for me.
Maybe TeXmacs cannot deal with editing arguments for extern macros.
I coded  something that works using \datoms. You can find it in the attached file.

Best,
Max

<line-numbers-and-table.tm>

On 26. Nov 2020, at 19:34, Nicolas Chouvalidzé <address@hidden> wrote:

Dear Texmacs users,

I want to create a macro for inserting blocks of code in python, with the following characteristics :
  • a block with a grey background, to separate the code from the rest of the text in the document
  • numbered lines
  • two columns : one for the code and one for comments about the code (putting the comments in a second column allows to make all comments aligned)
Following the instructions given in the Jolly Writer, I created the block I wanted in my document, and then copied it into a new macro. I specified two entries : one for the code in the first column (left) and a second for the comments which will go in the second column (right).

When I use the macro, however, I can only add text in the column intended for commentaries. The column intended for the code itself (the left one) displays the name of the variable, and does not allow further input.
I find it quite weird that one part of the macro works and the other does not, although they should be exactly the same...

I attached the file to this email so that you can look at how the macro works. I would really appreciate any help.

Thank you very much for your time,
Nicolas.
<Environnement python.tm>





Archive powered by MHonArc 2.6.19.

Top of page