-
Notifications
You must be signed in to change notification settings - Fork 156
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
Let latexify decide on cdot
#794
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #794 +/- ##
==========================================
- Coverage 76.41% 3.05% -73.36%
==========================================
Files 26 26
Lines 3235 3142 -93
==========================================
- Hits 2472 96 -2376
- Misses 763 3046 +2283
... and 24 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Using |
The problem is that our current latexification is not smart enough to distinguish julia> @variables d x dx;
julia> latexify(dx + d*x)
L"\begin{equation}
dx + d x
\end{equation}
" which is a quite severe correctness issue in the printing. Unless we manage to sort out and prevent this, we should really go for the correct, albeit slightly uglier, option as default.
SymPy does the correct thing here and prints the dot julia> @vars d x dx
(d, x, dx)
julia> dx + d*x
d⋅x + dx |
I'd suggest inserting a space via |
Alternatively I guess one could use |
I find both of these suggestions okay, as long as one can distinguish a variable name with multiple characters from multiplication |
cdot --> false
leads to very confusing output, like the one below, is there a variable calledThe example comes from https://mtk.sciml.ai/dev/basics/Composition/
In this case, the correct answer is$a \cdot delay$ , but if there was actually a variable called $adelay$ present in the system, the printed output would be incorrect.