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

A broken generated HTML theory in non-Unicode mode #1225

Open
binghe opened this issue Apr 23, 2024 · 2 comments
Open

A broken generated HTML theory in non-Unicode mode #1225

binghe opened this issue Apr 23, 2024 · 2 comments

Comments

@binghe
Copy link
Contributor

binghe commented Apr 23, 2024

Hi,

It seems that for each core theory there are two HTML pages generated in the help page. One is that you directly click the theory names from the HOL Reference Page (help/index.html), the other is that you first go to the Theory Graph (help/theorygraph/theories.html) and then click the graph nodes. The first one contains definitions and theorems with Unicode letters, and the second one doesn't use Unicode. I would say it's not bad to have two different HTML outputs for the same theory file.

But in cardinalTheory, the abbreviation symbol of cardlt (<</=) has caused problems with HTML because part of it looks like a HTML tag:

val _ = set_fixity "<</=" (Infix(NONASSOC, 450));

val _ = Unicode.unicode_version {u = UTF8.chr 0x227A, tmnm = "<</="};
val _ = TeX_notation {hol = "<</=",          TeX = ("\\ensuremath{\\prec}", 1)};
val _ = TeX_notation {hol = UTF8.chr 0x227A, TeX = ("\\ensuremath{\\prec}", 1)};

val _ = overload_on ("cardlt", ``\s1 s2. ~(cardleq s2 s1)``); (* cardlt *)
val _ = overload_on ("<</=", ``cardlt``);

And if you open the non-Unicode version of HTML page of cardinalTheory, you can see something like this:
Screenshot 2024-04-23 alle 11 46 00

Either we fix the HTML-generation code to escape the problematic characters (better, but I have no idea where is the related SML code), or we modify the symbols of cardlt (but there could be more such cases that I haven't seen).

Chun

@mn200
Copy link
Member

mn200 commented May 1, 2024

The HTML printing is done in src/parse/Hol_pp.sml.

@binghe
Copy link
Contributor Author

binghe commented May 1, 2024

The HTML printing is done in src/parse/Hol_pp.sml.

Thanks. Then I will try to fix this issue.

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

No branches or pull requests

2 participants