Open hpretl opened 3 weeks ago
@mole99 @RTimothyEdwards Please take a look if you agree.
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 😉)
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
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
?
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.
@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?
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)
@RTimothyEdwards Yes, we could try to use alternative characters. How about 🮱 or ✓ and 🮽 or ⨯ ?
Whatever these characters are, they do not even render correctly in my browser :-(
It should look like:
That is really strange, they seem to be basic Unicode symbols. Does your terminal render them correctly?
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 :-)
Not sure about terminal, but also my mail program can not render it (all macOS).
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?
@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.
@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. :-)
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.