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

LaTeX rendering makes "-2" illegal #3024

Closed
eshmoylova opened this issue Nov 12, 2021 · 4 comments · Fixed by #3025 or #3033
Closed

LaTeX rendering makes "-2" illegal #3024

eshmoylova opened this issue Nov 12, 2021 · 4 comments · Fixed by #3025 or #3033
Labels
bug Something isn't working Generated HTML The generated HTML-code LaTeX Issue with the LaTeX code

Comments

@eshmoylova
Copy link
Member

eshmoylova commented Nov 12, 2021

In Section 3.2 there is a non-normative section under the table that makes it look like "-2" is illegal in Modelica:
image

Looking at the source, it looks like there might be some escape characters needed. It is written as -- which LaTeX renders as an en-dash.

--2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
++2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
2--2 // = 4 in Mathematica/MATLAB; is illegal in Modelica

Also in the caption of the table the the array construction operator appears as \{ \}

\caption{Operators in order of precedence from highest to lowest, as derived from the Modelica grammar in \cref{modelica-concrete-syntax}. All operators are binary except the postfix operators and those shown as unary together with \emph{expr}, the conditional operator, the array construction operator \lstinline!\{ \}! and concatenation operator \lstinline![ ]!, and the array range constructor which is either binary or ternary. Operators with the same precedence occur at the same table row.}\label{tab:operator-precedence}

Both -- and {} appear correctly in the pdf.

@eshmoylova eshmoylova added bug Something isn't working LaTeX Issue with the LaTeX code labels Nov 12, 2021
@eshmoylova eshmoylova changed the title LaTex rendering makes "-2" illegal LaTeX rendering makes "-2" illegal Nov 12, 2021
@eshmoylova eshmoylova added the Generated HTML The generated HTML-code label Nov 12, 2021
@HansOlsson
Copy link
Collaborator

The second issue is reported as brucemiller/LaTeXML#1377 so it seems we can just wait until it is fixed in LaTeXML; as I don't see any obvious good work-around.

@sjoelund
Copy link
Member

Well, a space between them doesn't hurt that much, right? Otherwise, a zero-width space might work?

@HansOlsson
Copy link
Collaborator

Yes, I was planning that as a PR for the first issue, was just testing it first.

HansOlsson added a commit to HansOlsson/ModelicaSpecification that referenced this issue Nov 12, 2021
@henrikt-ma
Copy link
Collaborator

Now that the fix changed in the last minute from plain space to $\hspace{0pt}$, it turned from a nice example into a some sort of hacky workaround. As such, there should be a comment with a link to the relevant LaTeXML issue so that we can track when it get's fixed and the workaround can be removed.

@henrikt-ma henrikt-ma reopened this Nov 16, 2021
HansOlsson added a commit to HansOlsson/ModelicaSpecification that referenced this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Generated HTML The generated HTML-code LaTeX Issue with the LaTeX code
Projects
None yet
4 participants