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

Percent (%) symbol is being rendered in italics in the SRS #3748

Open
BilalM04 opened this issue May 22, 2024 · 4 comments
Open

Percent (%) symbol is being rendered in italics in the SRS #3748

BilalM04 opened this issue May 22, 2024 · 4 comments

Comments

@BilalM04
Copy link
Collaborator

The percent (%) symbol is being rendered in italics in the SRS, when it should not be.

HTML: % is wrapped in an <em></em> tag. For example:

LaTeX/PDF: % is wrapped in an in-line equation $\%$. For example:

${L_{2}}$ & ${L_{2}}\gt{}0$ & $1.0$ ${\text{m}}$ & 10$\%$

From briefly looking at the Drasil code, it seems that % is defined as an operator, thus it is printed as an expression.

@smiths
Copy link
Collaborator

smiths commented May 22, 2024

Is % implemented as the modulus operator?

@BilalM04
Copy link
Collaborator Author

BilalM04 commented May 22, 2024

Looking at the following code:

-- | Different operators.
data Ops = IsIn | Integer | Real | Rational | Natural | Boolean | Comma | Prime | Log
| Ln | Sin | Cos | Tan | Sec | Csc | Cot | Arcsin | Arccos | Arctan | Not
| Dim | Exp | Neg | Cross | Dot | Scale | Eq | NEq | Lt | Gt | LEq | GEq | Impl | Iff
| Subt | And | Or | Add | Mul | Summ | Inte | Prod | Point | Perc | LArrow | RArrow | ForAll
| VAdd | VSub | Partial

There doesn't seem to be an explicit modulus operator, just percent (labeled Perc). Thus, I'd assume in Drasil both percent and modulus are implemented together as Perc.

@JacquesCarette
Copy link
Owner

It seems weird to me that Perc is an operator. I would want to trace it some more (i.e. both upstream, as in who generates this Perc and downstream, i.e. how is it actually handled by the printers themselves.)

@balacij
Copy link
Collaborator

balacij commented Jun 14, 2024

I would imagine that a % should be rendered in the same slice of code we use to render units -- @BilalM04 do you think that is possible? Do we think this is sensible?

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

No branches or pull requests

4 participants