-
Notifications
You must be signed in to change notification settings - Fork 25
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
Rendering multicharacter symbols in LaTeX #468
Comments
I thought that if you used |
We discussed this further in the "all hands meeting" on March 14. GlassBR has several examples of equations that look odd, for instance LR = NFR GTF LSF. This would look better with a multiplication symbol. Maybe we can detect cases like this an automatically add the symbol when rendering? This isn't a high priority, but something to keep in mind for the future. |
This would be quite hard to achieve, at least not without a clear way of understanding what is the root cause of the oddness. Having multiple multiplication symbols is not hard. It is the decision criteria to use one versus another which is. |
Yes, we talked about this a bit at the start of the meeting. We thought that with some thought we could come up with some rules for when explicit multiplication symbols would look nice. After all, human being have some implicit rules when they change the formatting of the display of an equation. This isn't a high priority, but it might be a little project for a future student to tackle. A simple rule might be that multi-character symbols multiplied together need an explicit multiplication symbol. |
Related to #1639 |
Is this still needed? |
Yes, this is still needed. I had a quick look at the LaTeX code and some of the equations are spaced very oddly. I'll attach the example of is_safeProb. It looks like The solution might just be to use |
Yes, I think |
Ah, I think we've given this a small attempt in #2865; However, some things are still problematic: (both are examples from GlassBR) |
Definitely still a problem! What is the generated LaTeX for that? |
For Drasil/code/stable/glassbr/SRS/HTML/GlassBR_SRS.html Lines 938 to 944 in ad1e157
and Drasil/code/stable/glassbr/SRS/PDF/GlassBR_SRS.tex Lines 439 to 442 in ad1e157
For Drasil/code/stable/glassbr/SRS/HTML/GlassBR_SRS.html Lines 1894 to 1897 in ad1e157
and Drasil/code/stable/glassbr/SRS/PDF/GlassBR_SRS.tex Lines 1064 to 1067 in ad1e157
It's also weird that the generated HTML here is different between them. They look like they should use the same constructors and have the same code-styled output, and yet they're not. |
I think that MathJax wants Is there still a problem with Anyways, implicit multiplication is definitely a problem. At the very least, we should hand-insert some space (I tend to use |
Currently the multiplication operator in the TeX printer is defined as:
The above code inserts a blank space in the TeX code between items being multiplied. When compiled and rendered, the PDF does not have any space between the items being multiplied. The multiplication operator in the HTML printer is defined as:
The issue here arises when multi-character symbols are being multiplied. Since the One possible quick fix solution is rendering the This issue is more complicated than it appears, an exact solution just for multi-character symbols does not come to my mind. @balacij what do you think? |
The original is "too tight". I think the solution of using |
I agree with @JacquesCarette. This is a nice practical fix @BilalM04. The equation for LR in GlassBR has bothered me for years. It looks much better with your fix! |
For symbols that consist of multiple characters, like min, max, MINFRACT, etc, when they are rendered in LaTeX equations they would look better in an \mbox. Rather than LaTeX interpreting min as m times i times n, a \mbox{min} would achieve a more natural spacing.
The text was updated successfully, but these errors were encountered: