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

Word: Math symbols mistakenly bolded in formulas #876

Closed
ronaldtse opened this issue Dec 4, 2022 · 6 comments
Closed

Word: Math symbols mistakenly bolded in formulas #876

ronaldtse opened this issue Dec 4, 2022 · 6 comments
Assignees
Labels

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Dec 4, 2022

From ISO/CS on ISO 34000:

In 3.6.1 to 3.6.4, the symbols a and b in bold have been changed to regular type a and b. Variables are represented by single-letter symbols in italicized regular type. The bold type is used for matrices and vectors.

In Word output, these variables are mistakenly "bolded":
image

In PDF output, they are fine:
Screen Shot 2022-12-04 at 7 30 38 PM

The source has no bolding:

==== closed time interval
preferred:[stem:[[a,b\]]]

{{time interval}} that includes both the beginning {{instant}} and the final
instant

==== open time interval
preferred:[stem:[(a, b)]]

{{time interval}} that does not include either the beginning {{instant}} or the
final instant

==== right half-open time interval
preferred:[stem:[[a,b)]]
admitted:[contiguous time interval]

{{time interval}} that includes the beginning {{instant}} but not the final
instant

==== left half-open time interval
preferred:[stem:[(a,b\]]]

{{time interval}} that includes the final {{instant}} but not the beginning
instant

Document: https://github.com/CalConnect/iso-34000

@opoudjis
Copy link
Contributor

What's happening is that in MathML handling, the font shift from normal to italic is being kept as a shift to non-bold italic: the fact that the entire MathML expression is wrapped in bold is not impacting the italic instance, to make it cumulative.

@opoudjis
Copy link
Contributor

opoudjis commented Jan 21, 2023

And Ronald, The Word is wrong here. The PDF and HTML is correct.

This is marked up as a preferred expression. Preferred expressions are meant to be bold.

So:

== Terms and definitions

==== closed time interval
preferred:[stem:[[a,b\]]]
alt:[stem:[[a,c\]]]

{{time interval}} that includes both the beginning {{instant}} and the final
instant

==== open time interval
preferred:[[a, b\]]
alt:[[a, c\]]

Renders as follows:

HTML:
Στιγμιότυπο οθόνης 2023-01-21, 20 28 39

Word:
Στιγμιότυπο οθόνης 2023-01-21, 20 29 04

PDF:
Στιγμιότυπο οθόνης 2023-01-21, 20 29 43

The two terms have the same content in their designations; they differ in italicisation, which MathML correctly does for variables, and in the inheriting of boldface from the surrounding context, which is failing to happen. So HTML and PDF are wrong.

Now, as it happens, this is something I fixed in Word, when translating to OOXML, and dealing with its font changes. But it's clear I'm going to have to fix this in Presentation XML, inheriting any boldface from parent nodes into the current MathML expression.

I will not inherit italics as well, as that's probably going to introduce more confusion than not. (Italics is already meaningful in mathematical formatting, and I don't want to override that.)

@opoudjis
Copy link
Contributor

Fixing this is going to be exceedingly difficult in the general case, such as in headlines, when the boldface is being introduced by the CSS, not by formatting: so the Presentation XML simply does not know that the content of <h1> is boldface.

Luckily, though, preferred terms are explicitly boldfaced via <strong>, so we can use that for inheritance.

@opoudjis
Copy link
Contributor

This has worked in HTML and DOC, but not PDF: <mstyle fontweight="bold"> appears to be ignored by the PDF. Attempting CSS directive <mstyle style="font-weight:bold"> instead

@opoudjis
Copy link
Contributor

opoudjis commented Jan 21, 2023

No, that did not work either. Raising ticket, but satisfied with HTML/DOC treatment. For now reverting to fontweight. Will change markup if instructed to by @Intelligent2013, but all three known ways of doing MathML boldface are ignored on PDF output.

@opoudjis
Copy link
Contributor

PDF issue is separate; closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants