olsak / OpTeX

OpTeX - LuaTeX format with extended Plain TeX macros
http://petr.olsak.net/optex/
35 stars 13 forks source link

Wrong \foreach while loading some libraries in tikz #108

Closed cao- closed 1 year ago

cao- commented 1 year ago

When trying to load some libraries in Tikz, using the \usetikzlibrary command, the macro \foreach has the OpTeX definition rather than that of Tikz. Here is an example that fails:

\load[tikz]
\usetikzlibrary{graphs}
\bye

It doesn't fail if i redefine \foreach:

\load[tikz]\let\foreach=\_pgf_foreach
\usetikzlibrary{graphs}
\bye

I see that in tikz.opm we have \addto \tikz@startup@env {\let\foreach=\pgffor@foreach}: maybe there is some other Tikz macro that we should modify in the same way.

olsak commented 1 year ago

Thank you for bug report. I tried to solve it by my last commit.

cao- commented 1 year ago

Thank you for solving it :)