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: Martial Tarizzo <address@hidden>
  • To: Sam Liddicott <address@hidden>
  • Cc: Miguel de Benito Delgado <address@hidden>, "address@hidden" <address@hidden>
  • Subject: Re: [TeXmacs] Cancellation of terms
  • Date: Fri, 20 Mar 2015 16:30:50 +0100

Following the idea of Nicola Mingotti, I wrote 4 macros, which work
reasonably well (to put the symbol at the end of the arrow, I use a
'move'... not so good. It is still the same problem : size of the box ?)

see attached files.

Martial


Le vendredi 20 mars 2015 à 12:26 +0000, Sam Liddicott a écrit :
> 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.
>
>

Attachment: slash.pdf
Description: Adobe PDF document

<TeXmacs|1.99.2>

<style|<tuple|generic|french>>

<\body>
  <assign|slash|<macro|x|<if|<equal|<arg|x>|>||<draw-over|<arg|x>|<with|gr-mode|<tuple|edit|line>|<graphics|<line|<point|0gw|-0.4gh>|<point|1gw|0.5gh>>>>>>>>

  <assign|aslash|<macro|x|<if|<equal|<arg|x>|>||<draw-over|<arg|x>|<with|gr-mode|<tuple|edit|line>|<graphics||<with|arrow-end|\<gtr\>|<line|<point|0gw|-0.4gh>|<point|1gw|0.45gh>>>>>>>>>

  <assign|bslash|<macro|x|<if|<equal|<arg|x>|>||<draw-over|<arg|x>|<with|gr-mode|<tuple|edit|line>|<graphics|<line|<point|0gw|0.5gh>|<point|1gw|-0.4gh>>>>>>>>

  <assign|xslash|<macro|x|<if|<equal|<arg|x>|>||<draw-over|<arg|x>|<arg|><with|gr-mode|<tuple|edit|line>|<graphics|<line|<point|0gw|0.5gh>|<point|1gw|-0.4gh>>|<line|<point|0gw|-0.4gh>|<point|1gw|0.5gh>>>>>>>>

  \;

  Un essai de texte <slash|barré> et d'équation en ligne
  <math|<slash|<frac|1|2>+5>>.

  <\equation*>
    x<rsup|2>=<dfrac|<slash|x>+x<rsup|2>-<above|<wide|<xslash|<frac|2*x-x-x|2+5*x>>|\<wide-overbrace\>>|=0>|<bslash|a+b+c>>+<aslash|<big|int><rsub|-\<infty\>><rsup|\<infty\>>t*e<rsup|-t<rsup|2>>\<mathd\>t><move|<space|0.2em>0|0em|1em><htab|5mm><xslash|<frac|-<frac|\<hbar\>|2*m>\<times\><frac|\<partial\><rsup|2>\<psi\>|\<partial\>x<rsup|2>>+<around*|(|V-E|)>*\<psi\>=0|-<frac|\<hbar\>|2*m>\<times\><frac|\<partial\><rsup|2>\<psi\>|\<partial\>x<rsup|2>>+<around*|(|V-E|)>*\<psi\>=0>><htab|5mm><slash|<frac|1|2>+5>
  </equation*>

  \;

  \;

  \;
</body>

<\initial>
  <\collection>
    <associate|font|roman>
    <associate|font-base-size|10>
    <associate|font-family|rm>
    <associate|page-type|user>
    <associate|preamble|false>
  </collection>
</initial>

<\references>
  <\collection>
    <associate|lipsum|<tuple|?|?>>
  </collection>
</references>



Archive powered by MHonArc 2.6.19.

Top of Page