mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Re: "around" that allows line breaks


Chronological Thread 
  • From: Miguel de Benito Delgado <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] Re: "around" that allows line breaks
  • Date: Mon, 29 Oct 2012 13:44:09 +0100

Hi Michael,

pretty cool stuff! Bracket matching is sooo necessary...

On Sun, Oct 28, 2012 at 2:08 AM, Michael Lachmann <address@hidden> wrote:
> I noticed that if I edit the file
> src/Data/Drd/drd_std.cpp
> so that instead of
> --
> init (NEW_LINE, "new-line", fixed (0) -> name ("new line"));
> init (NEXT_LINE, "next-line", fixed (0) -> name ("next line"));
> --
> 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"));
> --
> Then the <next-line> and <new-line> tags are not accessible, i.e. I
> can't stand in them, so that the surrounding environment is always lit
> up. Good! But when I stand beyond the <next-line> tag, I'm still on
> the line above, not on the 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).
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). 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.

> 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.

We recall that logical paragraphs are important structures for the
typesetting process. Many primitives and environment variables (vertical
spacing, paragraph style, indentation, page breaking, etc.) operate on whole
paragraphs or at the boundaries of the enclosing paragraph.

How and if using new-line could affect some routine somewhere I don't
know, but it seems like it'd be best to find another way.

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. The <nobracket>'s appearing when brackets don't match might
also be replaced by some better visual cue.

Cheers,
________________
Miguel de Benito.



Archive powered by MHonArc 2.6.19.

Top of page