Giter Club home page Giter Club logo

Comments (7)

PHPirates avatar PHPirates commented on June 13, 2024 1

Thanks for reporting this! I happened to have fixed this already for \newcommand in #3482 available in 0.9.5-alpha.7 https://plugins.jetbrains.com/plugin/9473-texify-idea/edit/versions/alpha

However, that does not work for \def\startList{\begin{itemize}} and it is not easy to fix. Do you have any particular reason why you use \def instead of something like \newcommand{\startList}{\begin{itemize} \item First item}?

from texify-idea.

norru avatar norru commented on June 13, 2024

from texify-idea.

PHPirates avatar PHPirates commented on June 13, 2024

I can understand, but unfortunately TeXiFy will never be able to parse all valid LaTeX, because then the parser would take just as much time as actual compilation, which would make the plugin unusable. Therefore, we have decided to try and parse as much well-written LaTeX as possible, thus encouraging users to avoid obsolete or discouraged use of LaTeX.
Therefore, any real-life examples where \def should be used e.g. because \newcommand would not work are very much appreciated.
In general, any real-life examples where the TeXiFy parser does not work are appreciated because in some cases it is still possible to support certain syntax.
I don't know anything about the Emacs parser, so not sure if they have a better approach.

from texify-idea.

norru avatar norru commented on June 13, 2024

the parser would take just as much time as actual compilation, which would make the plugin unusable

This is interesting to know. I wonder why LaTeX parsing would be so harder to do in real(ish) time than, say, Java, for which "compiler-perfect", in-editor/IDE, real-time parser have existed (and I have used) for decades. Anyway, I appreciate that the focus of your effort may be directed on functionality, and accuracy in the general case takes lower priority.

Also I admit I haven't used LaTeX in a while, but I had never heard before about \def not being considered "well-written LaTeX". Is there an official guide, deprecation list of sorts I could have a look at?

from texify-idea.

PHPirates avatar PHPirates commented on June 13, 2024

Yes, that is indeed a very interesting topic. I'm not sure what Knuth had in mind, but probably not an IDE with lexer and EBNF parser. I think this explains it well: https://tex.stackexchange.com/questions/4201/is-there-a-bnf-grammar-of-the-tex-language

Not as far as I know, so that's why we try to help users with TeXiFy inspections: https://hannah-sten.github.io/TeXiFy-IDEA/discouraged-or-obsolete-code.html mostly based on answers like these: https://tex.stackexchange.com/a/658/98850

from texify-idea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.