You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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\foo
is a command that can take arguments?\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.
The text was updated successfully, but these errors were encountered: