- From: Michael Lachmann <address@hidden>
- To: address@hidden
- Subject: Re: [TeXmacs] Re: "around" that allows line breaks
- Date: Mon, 29 Oct 2012 14:41:33 +0100
Thanks for the answers!
>
On Sun, Oct 28, 2012 at 2:08 AM, Michael Lachmann <address@hidden> wrote:
>
> I have:
>
> --
>
> init (NEW_LINE, "new-line", fixed (1) ->accessible(0) -> name ("new
>
> line"));
>
> init (NEXT_LINE, "next-line", fixed (1) ->accessible(0) -> name
>
> ("next line"));
>
> I've no idea what I did above, and what the various flags in this file
>
> do... it just sounded right.
>
>
What you did is edit the DRD (Data Relation Description) properties
>
for that tag (see the help "Data relation descriptions" in
>
tm-drd.en.tm). I think however that your fixed(1) should be fixed(0).
When I tried fixed(0)->accessible(0)
TeXmacs crashed before opening the first window...
>
Also, you should be able to achieve the same effect without modifying
>
the code (which isn't right because you are affecting all such tags)
>
using the tag <\drd-props|new-line|accesible|none> (I haven't
>
checked).
That is much better!
>
Ideally, if you were to use new-line you'd define a new tag
>
new-line2 or whatever which had this property and any additional ones
>
you need.
>
That works really well !!
I defined a new tag next-line2:
<\assign|next-line2|<next-line>>
This works better than expected: on inserting <next-line2> I only see
a line break, without the ugly representation of the break, and
The cursor shows up on the next line!! Really cool.
But When I also added
<\drd-props|next-line2|accesible|none>
The cursor would still enter the next-line2 tag. But that's not so
bad, because you can see where it is.
>
> It could also be that I'm going the wrong way. Maybe there is an
>
> easier way to put line breaks into <around>s.
>
>
Not easier, but preferred. From the doc:
>
>
<new-line>
>
This is a deprecated tag in order to split a logical paragraph into
>
several
>
logical paragraphs without creating explicit subtrees for all paragraphs.
>
Ok, I started using <next-line> ;)
But I would much prefer if <\around> would allow line breaks.... I
haven't figured out how to do that.
>
>
A last comment: if you match brackets using <around>, you'll have to
>
rewrite the procedures to convert from and to code snippets to
>
correctly copy and paste inside code fragments, code files and
>
sessions.
I'm not sure I fully understand what you mean... Do you mean that when
I copy and paste as verbatim, for example,
<next-line> is not converted to \n ? That should be easy...
Or do you mean that once I use <\around> then copying code snipplets
is a bit of a pain, because I can only select the whole <\around>, not
parts of it? I'll have to start using it to see how much I hate it.
>
The <nobracket>'s appearing when brackets don't match might
>
also be replaced by some better visual cue.
Yes. I wonder what I should use. It seems in math nothing is displayed....
Another option I thought about was that if you delete a bracket, then
the <\around| ( | "body" | ) > would be replaced by just "body".
But for now, I think I can easily get a workable version. Cool!
Michael
Archive powered by MHonArc 2.6.19.