Subject: mailing-list for TeXmacs Users
List archive
From : Alvaro Tejero Cantero <address@hidden>- To: Joris van der Hoeven <address@hidden>
- Cc: address@hidden
- Subject: Re: [TeXmacs] Macro dependent on previous character
- Date: Fri, 17 Jun 2005 18:20:10 +0200
On Fri, 2005-06-17 at 17:25 +0200, Joris van der Hoeven wrote:
> Hi Alvaro,
>
> On Fri, Jun 17, 2005 at 04:40:56PM +0200, Alvaro Tejero Cantero wrote:
> > I would like to write a macro conditionally dependent on which one is
> > the previously typed character.
>
> What do you mean by that? I assume that you are talking about a Scheme
> macro?
> You mean the previously typed character on your keyboard,
> or the character just before the cursor position?
I ask indulgence for my lack of precision: I meant the character just
before the first character of the macro when it's typed.
> > If somebody could point me in the right direction, I would be grateful.
> > As next task, I would like to make a macro dependent on the _next_
> > character, but I don't know if this is possible with TeXmacs.
>
> What do you mean by this? A macro which looks into the future?
> Or a macro which depends on the character behind the cursor?
Actually, that macro which looks into the future might be really
interesting! :)
Now seriously: a macro sensitive to the next character. Alternatively,
it could be a macro sensitive to the next macro, the next enclosing
structure (that would be finer).
> Please tell us more precisely what you want and maybe the application
> that you have in mind.
Dirac notation for the inner product (the pointy brackets of quantum
mechanics).
Say I have a ket somewhere: |a>
and a bra in another part of the formula: <b|
If I paste them in succession, either the left delimiter of the ket has
to be turned into a middle delimiter and the right of the bra dissapear,
or reciprocally, in order to get:
<b|a>
(left angle, middle bar, right angle)
>
> Best wishes, Joris
>
Thank you very much for the prompt answer!
'A.
- Macro dependent on previous character, Alvaro Tejero Cantero, 06/17/2005
- Re: [TeXmacs] Macro dependent on previous character, Joris van der Hoeven, 06/17/2005
- Re: [TeXmacs] Macro dependent on previous character, Alvaro Tejero Cantero, 06/17/2005
- Re: [TeXmacs] Macro dependent on previous character, Joris van der Hoeven, 06/18/2005
- Re: [TeXmacs] Macro dependent on previous character, Álvaro Tejero Cantero, 06/18/2005
- Re: [TeXmacs] Macro dependent on previous character, Joris van der Hoeven, 06/23/2005
- Re: [TeXmacs] Macro dependent on previous character, Álvaro Tejero Cantero, 06/18/2005
- Re: [TeXmacs] Macro dependent on previous character, Joris van der Hoeven, 06/18/2005
- Re: [TeXmacs] Macro dependent on previous character, Alvaro Tejero Cantero, 06/17/2005
- Re: [TeXmacs] Macro dependent on previous character, Joris van der Hoeven, 06/17/2005
Archive powered by MHonArc 2.6.19.