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

Infinite recursion when defining a new columntype that uses the new columntype internaly #167

Open
sp1ritCS opened this issue Oct 1, 2023 · 0 comments

Comments

@sp1ritCS
Copy link
Contributor

sp1ritCS commented Oct 1, 2023

Because \newcolumntype just stores the second argument as string in a map and parses it when needed again and again, you can use the newly defined coumntype inside of itself, creating infinite recursion.
Example:

\begin{array}{s}
\newcolumntype{s}{>\begin{array}{s}}

a hacky workarround would be to just parse the second argument in the newcolumntype macro using Formula(tp, args[2]);, but a better method might be storing the now parsed formula in the map instead of the args[2] and reusing this wherever necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant