#331 Command names of a non-letter highlighted incorrectly

open
nobody
None
5
2012-11-04
2012-07-30
Alexander
No
0 up votes | 0 down votes | 0%
5 comments

I have a macro \?, so that its name consists of one non-letter. Then in a text like "\?Lorem ipsum" the word Lorem is shown in the color of a command, while it is, according to clear rules of TeX, an ordinary text word and not part of a command name.

Discussion

  • Tino Weinkauf
    Tino Weinkauf
    2012-11-03

    Alexander, you do not really think that we can re-implement the tex-compiler and provide support for all self-defined macros?

    Our parser is simpler, which give the following results: (a) it will not recognize everything. (b) it will gracefully ignore errors. The latter is rather important.

     
  • Tino Weinkauf
    Tino Weinkauf
    2012-11-03

    Thanks for taking the time to submit us your report.

    Your suggestion is interesting, but does not seem to fit into the current development roadmap. The current plannings and the general strategy for TXC deviate from your suggestion. Therefore, the issue will not be added to one of our trackers. However, we thank you very much for supporting TXC and hope to be more at your service some other time.

     
  • Tino Weinkauf
    Tino Weinkauf
    2012-11-04

    A response from Alexander:

    I think you completely misinterpreted my report. Probably
    you think that I suggest to recognize and remember macro
    definitions. No.

    Here is what I reported:

    In a text like \"\\?Lorem ipsum\", the parser MUST understand
    \"\\?\" as a command (no matter whether it was previously
    defined or not). Currently, it understands \"\\?Lorem\" as a
    command, while it is an absolutely impossible command in TeX.

    I think what I suggest is one line of code: if you see a
    non-letter after \\, then it is a command and everything
    after it is not. If you see a letter, then <the rule that
    you have now>. This behavior is OUT OF CONTEXT, that is, you
    do NOT need to know whether I defined or not such
    a macro, and do NOT need to add any complexity to the
    parser. This has nothing to do with support for self-defined
    macros.

     
  • Tino Weinkauf
    Tino Weinkauf
    2012-11-04

    The described error has been added to the official bug list.

    Thank you for your report.

     


Anonymous


Cancel   Add attachments