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: Miguel de Benito Delgado <address@hidden>
  • Cc: "address@hidden" <address@hidden>
  • Subject: Re: [TeXmacs] Cancellation of terms
  • Date: Fri, 20 Mar 2015 12:26:17 +0000

I attach my best attempt.

The problem is as you indicate, Miguel, that box length units are not available, so in this case I have hard wired to 1ex, 1fn just to show.

Perhaps we need a width & height function that text or part of the tree can be passed to?

Or maybe the repeat function should also set the box units, so that we can have a gr-geometry tuple set to 1w 1h in a repeat box, guaranteed to repeat only once but fill the whole block?
then we can have <repeat|x|<with|gr-frame|<tuple|scale|1gw|<tuple|0gw|1gh>>|gr-geometry|<tuple|geometry|1w|1h|center>|<line|<point|0|-1>|<point|1|0>>>>

I prefer that option. On the other hand, that is how datoms ought to be working, why can't datoms provide those values?

Sam




On Thu, Mar 19, 2015 at 11:17 PM, Miguel de Benito Delgado <address@hidden> wrote:
I've actually wanted this for some time and never found the motivation to try it.

On Wed, Mar 18, 2015 at 5:34 PM, Martial Tarizzo <address@hidden> wrote:
It would be great to compute these coordinates (i.e the position, width
and height of the box), but I didn't find a way to get them .

AFAIK box length units like "1l", "1w" are only available within some specific macros like resize, move, etc. Search the doc for more info.

I see three possible venues for implementing this:

1. Try something with virtual fonts. Some single characters are indeed negated this way, but I wouldn't know how to extend this to arbitrary content. Come to think of it, it doesn't make much sense.

2. Try to coerce the box dimensions of the content to be cancelled out of the macros I mentioned above, somehow storing its value for later use. Out of the top of my head I don't see how this would work, though.

3. Implement a new wide_box in C++ (see e.g. wide_bar_box, wide_vect_box, etc.) I've attached a proof-of-concept patch for those willing to hack around a bit. Apply it and then, with some selection made in your document, run the scheme command (make-wide "<cancelled>"), e.g. by clicking Tools->Execute->Evaluate scheme _expression_

If someone finds the time to properly adjust the margins, and this turns out to be the best solution we can think of committing it. Of course, the other cancellations would be cool as well, or maybe a more general mechanism which would allow for easy user customization (different/multiple arrows, etc.). Replacement of the super/lower indices would be nice too...

But it's late...

Best,
--
Miguel de  Benito.

<TeXmacs|1.99.2>

<style|<tuple|generic|british>>

<\body>
  <assign|render-crossbox|<macro|x|<with|gr-frame|<tuple|scale|1gw|<tuple|0gw|1gh>>|gr-geometry|<tuple|geometry|1ex|1fn|center>|[<arg|x>]<line|<point|-5|-1>|<point|-1|-0>>>>>

  <assign|crossbox|<macro|x|<datoms|<macro|x|<render-crossbox|<arg|x>>>|<arg|x>>>>

  <assign|render-cancel|<macro|x|<crossbox|<arg|x>>>>

  \;

  2<render-cancel|2222>2

  3<render-crossbox|3333>3

  \;
</body>

<\initial>
  <\collection>
    <associate|preamble|false>
  </collection>
</initial>



Archive powered by MHonArc 2.6.19.

Top of Page