Conversation
7d14bfc to
807ed18
Compare
3d325e9 to
7f95045
Compare
| >>> non_ascii_to_octal("•‰“”±°ÿ") | ||
| '\\31\\214\\216\\217\\261\\260\\377' | ||
| >>> non_ascii_to_octal("αζΔΩ∑π∇") | ||
| >>> non_ascii_to_octal("αζ∆Ω∑π∇") |
There was a problem hiding this comment.
In [19]: "Ω" == "Ω"
Out[19]: False
In [20]: "Δ" == "∆"
Out[20]: False
In [21]: import unicodedata
In [22]: unicodedata.name("Ω")
Out[22]: 'OHM SIGN'
In [23]: unicodedata.name("Ω")
Out[23]: 'GREEK CAPITAL LETTER OMEGA'
In [24]: unicodedata.name("Δ")
Out[24]: 'GREEK CAPITAL LETTER DELTA'
In [25]: unicodedata.name("∆")
Out[25]: 'INCREMENT'We were using incorrect characters previously!
| fig.text(position="TL", text="position-text:°α") # noqa: RUF001 | ||
| fig.text(x=1, y=1, text="xytext:°α") # noqa: RUF001 | ||
| fig.text(x=[5, 5], y=[3, 5], text=["xytext1:αζΔ❡", "xytext2:∑π∇✉"]) | ||
| fig.text(x=[5, 5], y=[3, 5], text=["xytext1:αζ∆❡", "xytext2:∑π∇✉"]) |
| charset["ZapfDingbats"] = dict( | ||
| zip( | ||
| [*range(0o040, 0o220), *range(0o240, 0o400)], | ||
| "\u0020\u2701\u2702\u2703\u2704\u260e\u2706\u2707" |
There was a problem hiding this comment.
In previous version, we maintained a big dictionary like:
✁✂✃✄☎✆✇✈✉☛☞✌✍✎✏
but here I decide to use:
\u0020\u2701\u2702\u2703\u2704\u260e\u2706\u2707
The main reasons are:
- Avoid having too many non-ASCII characters in the source code
- Some non-ASCII characters can't be displayed correctly in text editors or GitHub web UI
For similar reasons, in the documentation, I use HTML syntax like
  | ✁ | ✂ | ✃ | ✄ | ☎ | ✆ | ✇ |
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
| @@ -0,0 +1,7 @@ | |||
| # Technical Reference | |||
There was a problem hiding this comment.
As discussed in #2834, the documentation group is called "Technical Reference". Here the directory name is techref. Please let me know if you're OK with the name.
There was a problem hiding this comment.
Yep, ok with the title name. We could maybe add a short paragraph under this title to mention what this page is about? Also would be good to link to https://docs.generic-mapping-tools.org/6.5/reference.html.
|
Ping @GenericMappingTools/pygmt-maintainers for reviews and will self-approve and merge in one week if no further comments. |
weiji14
left a comment
There was a problem hiding this comment.
Just some minor typos and one suggestion on adding a short descriptive paragraph in the Technical Reference page. Haven't checked every single character in the tables, but I trust that they're ok 🙂
| @@ -0,0 +1,7 @@ | |||
| # Technical Reference | |||
There was a problem hiding this comment.
Yep, ok with the title name. We could maybe add a short paragraph under this title to mention what this page is about? Also would be good to link to https://docs.generic-mapping-tools.org/6.5/reference.html.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
See #2204 (comment) for background and the issue.
This PR solves the issue by:
Preview:
The tables of supported encodings are at
https://pygmt-dev--3206.org.readthedocs.build/en/3206/techref/encodings.html.
This page is in the "Technical Reference" section, as discussed in #2834.
Note to maintainers
Below is the script used to generate the Markdown tables in the documentation