Subject: mailing-list for TeXmacs Users
List archive
From : Nicola Mingotti <address@hidden>- To: Massimiliano Gubinelli <address@hidden>
- Cc: address@hidden
- Subject: Re: [TeXmacs] About formatting plugin output
- Date: Sun, 9 Dec 2018 13:47:41 -0800
Hi Massimiliano,
On 12/9/18 5:02 AM, Massimiliano Gubinelli wrote:
Hi,
I’m not sure I understand.
Until you use ‘verbatim:' I think there is no escape possible. But I’m not
certain.
One possibility could be to use the 'latex:’ and then inside the latex code
you can use \verbatim to get in sequences you do not want to encode in latex
format.
But above all one would like to understand what are your input sequences.
From my point of view is not a TeXmacs problem but a problem on how to
encode your input in such a way that allow “escaping” to control the
formatting.
The strings i need to encode are Ruby error messages. I can't say a priori which format they will have,
because in some "gems" programmers may define their own exception messages.
For this reason i would prefer to stay far from LaTeX, it has too many special characters.
... but, I would need to do some experiments to be sure, at the moment this is just my impression.
I give you an example: what if my plugin produces scheme code? Does the
sequence
(insert (with "color" "red" "foobar”))
Umm, let's stay in you example:
This code works:
print 'command:(insert "Scheme says there is an Error")'
My little problem is, how can i tell to TeXmacs that i want that text in "red",
using Scheme ? I can't figure what the way to express "with|color|red|"foobar"
in Scheme.
For example, try to run Shift+Meta+X (insert "foo"), then try to do the same
thing, but inserting red text. I can't see how.
is a sequence meant to be interpreted by TeXmacs or a sequence to be inserted
as verbatim?
I think you have to perform this encoding in the plugin.
But again, i’m not expert in plugin code so maybe I’m wrong. :)
max
There is not problem with the encoding, i can play whatever magic
on the string before sending it to TeXmacs.
bye
n.
On 9. Dec 2018, at 04:50, Nicola Mingotti <address@hidden> wrote:
Hi,
I am writing a plugin, I was able to start, yeah !
I am facing this little problem I can't figure out how to solve well.
The problem is I want the plugin to write some colored text
in TeXmacs (error messages). How do I do it ?
If I send data as : print "verbatim:\\red{foobar}"
"red" gets ignored because it is in a verbatim.
My text is not LaTeX, so i wouldn't just copy from the "markup" plugin.
I considered sending a Scheme command, but i can't find how
to go beyond (insert "foobar") , that is, I don't know
how to encode something like this: (insert (with "color" "red" "foobar")).
More in general, can I send e.g. "\with|color|"Red"|"foobar" with
Shift+Meta+X + SCHEME-CODE ?
I don't understand well up to which point Scheme and the "bracket" syntax are
equivalent.
Actually I have just been able to have red text using the "html" tag.
But the font is changed. So, the problem is not still fully solved.
I was able to have red text also printing to STDERR, but it is not
documented, I don't want to follow that path.
If you can clarify a bit the thing I would be grateful.
bye
Nicola
- [TeXmacs] About formatting plugin output, Nicola Mingotti, 12/09/2018
- Re: [TeXmacs] About formatting plugin output, Massimiliano Gubinelli, 12/09/2018
- Re: [TeXmacs] About formatting plugin output, François Poulain, 12/09/2018
- Re: [TeXmacs] About formatting plugin output, Nicola Mingotti, 12/11/2018
- Re: [TeXmacs] About formatting plugin output, Nicola Mingotti, 12/09/2018
- Re: [TeXmacs] About formatting plugin output, Massimiliano Gubinelli, 12/10/2018
- Re: [TeXmacs] About formatting plugin output, Nicola Mingotti, 12/10/2018
- Re: [TeXmacs] About formatting plugin output, Massimiliano Gubinelli, 12/10/2018
- Re: [TeXmacs] About formatting plugin output, François Poulain, 12/09/2018
- Re: [TeXmacs] About formatting plugin output, Massimiliano Gubinelli, 12/09/2018
Archive powered by MHonArc 2.6.19.