Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Cancellation of terms

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Cancellation of terms


Chronological Thread 
  • From: Sam Liddicott <address@hidden>
  • To: Martial Tarizzo <address@hidden>
  • Cc: Miguel de Benito Delgado <address@hidden>, "address@hidden" <address@hidden>
  • Subject: Re: [TeXmacs] Cancellation of terms
  • Date: Mon, 23 Mar 2015 07:42:03 +0000

That's great!

It is curious that draw-under allows the text to be editable when draw-over does not, but brilliant that we get rid of phantom.

box-info is particularly great!

Sam

On Sun, Mar 22, 2015 at 10:50 PM, Martial Tarizzo <address@hidden> wrote:
Finally, I got it ...

after digging for "draw-over" in the source, I found the definition in
TeXmacs-1.99.2-src/TeXmacs/packages/standard/std-graphics.ts.
There is also a "draw-under", and it's possible to switch with Ctrl-*.

(Frequently in TeXmacs, the doc is slightly out-of-sync with the code :
as SmallTalk, the code is the ultimate doc ...)

More intersting, the code uses <box-info|contents|lbrtwh> to get the
bouding box of contents (left, bottom, right, top, width, height) in a
tuple ! Now, we know everything needed.

So, I rewrote the macros, including arrow-slash, which seems to work
reasonably well. See attachments, comments in the .tm

One problem stays : vertical alignment on the base line. I tried various
formulae to compute the shift, bud didn't succeed in finding an
universal one, which works on a single character or a big equation.
As this should be rare, you cas adjust 'by hand' when needed...

Cheers

Martial


Le samedi 21 mars 2015 à 10:46 +0000, Sam Liddicott a écrit :
>
>
> On Fri, Mar 20, 2015 at 6:19 PM, Miguel de Benito Delgado
> <address@hidden> wrote:
>         Awesome!
>
>
>         I really like not having to hardcode more stuff.
>
>
> However... I really think that "replace" ought to provide the box
> units, and have the option to replace at least once even if the object
> is too big. It would be better than phantom+Draw-over in this case.
>
>
>
>
>         What about using text-at to place the superindex as well? It
>         should be a matter of adding a second argument to the macros
>         and resizing the drawing area (using phantom and rsup?)
>
>
> text-at is unfortunate because we don't know exactly where to place
> the text - the vertical positioning is not quite right.
>
>
>
>
>         On the other hand, won't draw-over have performance issues?
>
>
> replace?
>
......





Archive powered by MHonArc 2.6.19.

Top of Page