Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too much LaTeX interpretation #56

Open
sylvainhalle opened this issue Jan 8, 2019 · 0 comments
Open

Too much LaTeX interpretation #56

sylvainhalle opened this issue Jan 8, 2019 · 0 comments
Labels
wontfix This will not be worked on

Comments

@sylvainhalle
Copy link
Owner

TeXtidote is not a LaTeX interpreter. It is designed to apply basic transformations and cleanup on LaTeX files, but feature suggestions that would require to interpret (i.e. compute the result) of a LaTeX command or piece of markup are likely to be closed and labelled as wontfix. The exception is if the command in question is simple; what is considered "simple" is left to the developer's judgement, but typically means that it can be processed using a regular expression or something equivalent.

Why?

The main reason for this policy is that once you start interpreting markup, there is no end to it. Wait long enough and you'll have to re-implement half of the LaTeX compiler into TeXtidote. This would increase the complexity of the program, and increase the probability of bugs sneaking in. (And decrease the chances the developer will want to keep maintaining it!)

As an example, consider a feature to replace occurrences of a user-defined command \foo with the contents defined in a \newcommand{\foo}{bar} declaration. What starts like a straightforward find/replace is actually more complex than it looks:

  • bar can contain occurrences of other commands, so you have to perform this task recursively
  • \foo can be overridden by a subsequent \renewcommand, maybe in mid-file, so you have to keep track of that too
  • What if \foo is a command that can take arguments?
  • Once you support \newcommand, why not support plain old \def?

As one can see, somewhere a line has to be traced regarding what to support and what to deliberately keep out of TeXtidote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant