Loading ...
Sorry, an error occurred while loading the content.

RE: [Clip] Bug: \p misinterpreted

Expand Messages
  • John Shotsky
    An example line of actual data before and after would be useful. I think the backslash before the closing bracket is interpreted as a closing bracket instead
    Message 1 of 4 , Jan 11, 2013
    • 0 Attachment
      An example line of actual data before and after would be useful. I think the backslash before the closing bracket is
      interpreted as a closing bracket instead of the end of the class, too.

      Regards,
      John
      RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
      Sent: Friday, January 11, 2013 04:44
      To: NoteTab Clips
      Subject: [Clip] Bug: \p misinterpreted


      LaTeX has many expressions beginning with a backslash, for example \par.
      The follwoing example misinterprets this somehow in a Replace
      expression:

      ^!InsertSelect \begin{letter}^P
      ^!Replace "\\begin\{(letter)\}$ <file:///\\begin\%7b(letter)\%7d$> " >>
      "\\begin{$1}\{%\n\\\\\n\n\\\\\[.2\\baselineskip\]\n\{\\Large \}
      <file:///\\begin%7b$1%7d\%7b%25\n\n\n\%5b.2\baselineskip\%5d\n\%7b\Large%20\%7d%0b\n\par\%7d>
      \n\\par\}" HRASTI
      ^!Continue
      ^!Jump SELECT_END
      ^!InsertSelect ^Padd new stuff here

      N.B: The Replace expression needs to be very long. Whenever I shorten
      it, the selection ends at some other place inside the replaced text,
      sometimes even at its end, but I can't reproduce any of that.

      Axel

      --
      Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
      Johann-H�ck-Str. 14 Fax: +49/ 2174/ 7439 68
      D-51519 Odenthal-Heide eMail: Axel-Berger@... <mailto:Axel-Berger%40Nexgo.De>
      Deutschland (Germany) http://berger-odenthal.de



      [Non-text portions of this message have been removed]
    • Axel Berger
      ... My trimmed down clip is meant to be run on an empty document. Rethinking, it is probably not the p that s the trouble here. It rather seems that actual
      Message 2 of 4 , Jan 11, 2013
      • 0 Attachment
        John Shotsky wrote:
        > An example line of actual data before and after would be useful.

        My trimmed down clip is meant to be run on an empty document.
        Rethinking, it is probably not the \p that's the trouble here. It rather
        seems that actual backslashes inserted through \\ are not counted and
        that's why the selection after the Replace is too short as seen with the
        ^!Continue.

        If the clip was only meant to be run with nothing selected I could use
        ^& to position the cursor, but that would create other unintended
        effects.
      • Axel Berger
        ... I just noticed that in this case the Replace need not be Regex, so there is a simple solution. Still it seems there is a bug here. My guess is, that in
        Message 3 of 4 , Jan 11, 2013
        • 0 Attachment
          Axel Berger wrote:
          > backslashes inserted through \\

          I just noticed that in this case the Replace need not be Regex, so there
          is a simple solution. Still it seems there is a bug here. My guess is,
          that in determining the length of the replace string backslashes are not
          counted, which is correct except for the one case of "\\".

          Axel
        Your message has been successfully submitted and would be delivered to recipients shortly.