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

Remove green checkmark from docs Markdown #108

Open
hpretl opened this issue Aug 26, 2024 · 15 comments
Open

Remove green checkmark from docs Markdown #108

hpretl opened this issue Aug 26, 2024 · 15 comments

Comments

@hpretl
Copy link

hpretl commented Aug 26, 2024

There is a green checkmark in the summary section of the result Markdown. This special characters fails in some environments, and it is not really needed in my view. Please just stick with a "Pass"/"Fail" verdict.

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

@mole99 @RTimothyEdwards Please take a look if you agree.

@mole99
Copy link
Member

mole99 commented Aug 26, 2024

Hi Harald, can you tell me under which environment it fails?

I personally like the green checkmark ✅ and the red cross ❌ to see at a glance if a parameter failed or everything was successful.

OpenLane 2 already makes heavy use of Unicode and ANSI escape codes and any modern terminal emulator should have support for this. (You too now Tim 😉)

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

It fails when compiling the md with Quarto/Pandoc into Latex to compile to a PDF :-) Sounds complicated, but I use it to do this: https://iic-jku.github.io/analog-circuit-design/#t-ota-simulation-versus-pvt

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

The alternative is that I do post-processing of the Md to remove these characters, as I do currently with the figures paths (need to tweak the paths). Do you have any idea how to do this with a sed?

@mole99
Copy link
Member

mole99 commented Aug 26, 2024

Wow, I'm impressed! That's a lot of conditions in those plots 🤯

Yes, you can replace it with sed if you specify the hex value. The UTF-8 encoding for ✅ is 0xe29c85, therefore we can do something like:

echo "✅" | sed 's/\xe2\x9c\x85/Pass/g'

But I believe there is a way to handle this correctly in pandoc. You could try changing the pdf-engine or the font to support Unicode characters. (https://stackoverflow.com/questions/18178084/pandoc-and-foreign-characters)

PS: Did you mean to close #109? We can try to find a suitable solution if you need one.

@RTimothyEdwards
Copy link
Collaborator

@hpretl : I also have difficulties with unicode, but I managed to figure out some workarounds (like using urxvt instead of mrxvt as a terminal application). However, the checkmark and X-mark are not just unicode, they are from the emoji symbol set, and I also am having difficulty with many applications failing to render them correctly. There are a number of traditional unicode font symbols that can be substituted. Maybe an option to not use the emoji characters?

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

As said, I am perfectly happy with an ASCII pass and fail :-)

A WA for me is this: iconv -c -f utf-8 -t ascii $FILE.tmp > $FILE (FILE is the Markdown report)

@mole99
Copy link
Member

mole99 commented Aug 26, 2024

@RTimothyEdwards Yes, we could try to use alternative characters. How about 🮱 or ✓ and 🮽 or ⨯ ?

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

Whatever these characters are, they do not even render correctly in my browser :-(

image

@mole99
Copy link
Member

mole99 commented Aug 26, 2024

It should look like:

grafik

That is really strange, they seem to be basic Unicode symbols. Does your terminal render them correctly?

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

I changed the Latex compiler to Xelatex, and now I can render w/o fail, although it still does not show this caracter. I use now a script to remove all unicode characters :-)

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

Not sure about terminal, but also my mail program can not render it (all macOS).

@mole99
Copy link
Member

mole99 commented Aug 26, 2024

Your browser and mail program probably use the same font which does not support these characters. Are you using the default macOS font? If so, then I'm a bit surprised that they're not supported, but ✅ and ❌ both work?

@RTimothyEdwards
Copy link
Collaborator

@hpretl : Just be aware that beyond the check-mark and X-mark, unicode symbols are being used for basic engineering text like square root (as in 1/sqrt(Hz)), squared, micro, degree, and a handful of others. Some of those are in the ISO font encoding and some in the standard symbol font, but I don't know how universally they display. But just watch out for the possibility that wiping all unicode out of the output will screw up a lot of units.

@hpretl
Copy link
Author

hpretl commented Aug 26, 2024

@RTimothyEdwards Good point! Maybe I need to selectively remove Unicode characters then. But so far, I avoid Unicode wherever I can, and use things like uV and rtHz. :-)

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

3 participants