Subject: mailing-list for TeXmacs Users
List archive
From : <address@hidden>- To: Massimiliano Gubinelli <address@hidden>
- Cc: texmacs-users <address@hidden>
- Subject: Re: Macro for inserting blocks of code won't work properly
- Date: Thu, 26 Nov 2020 23:31:43 +0100
Dear Massimiliano,
Thank you for your solution ! I works great on my computer.
I have yet to understand fully how your macros work precisely, but I think it will become clearer with experience. I have just discovered the existence of macros, and I have to admit that they really revolutionised my usage of TeXmacs.
I also ignored the existence of the official Twitter account : it seems there are many interesting tips over there, and I will definitely check it out more frequently.
Thank you for your help,
Nicolas.
Le jeu. 26 nov. 2020 à 22:27, Massimiliano Gubinelli <address@hidden> a écrit :
I made a small presentation out of this example::)enjoy.mOn 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.<line-numbers-and-table.tm>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,MaxOn 26. Nov 2020, at 19:34, <address@hidden> wrote:Dear Texmacs users,<Environnement python.tm>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.
- Macro for inserting blocks of code won't work properly, , 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, Massimiliano Gubinelli, 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, Massimiliano Gubinelli, 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, , 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, Massimiliano Gubinelli, 11/27/2020
- Re: Macro for inserting blocks of code won't work properly, , 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, Massimiliano Gubinelli, 11/26/2020
- Re: Macro for inserting blocks of code won't work properly, Massimiliano Gubinelli, 11/26/2020
Archive powered by MHonArc 2.6.19.