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

Support left/right single quotation marks in text and arguments #3192

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Apr 23, 2024

Description of proposed changes

Left/right single quotation marks ‘’ are not translated correctly in PR #2584. Here is a minimal example to reproduce the issue:

>>> import pygmt
>>>
>>> fig = pygmt.Figure()
>>> fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
>>> fig.text(text="A ' ‘ ’ \" “ ” B", position="CM", font="20p", fill="230")
>>> fig.show()

This PR fixes the bug.

Incorrect result in the main branch Correct result in this PR
map map

You may notice that the ASCII character ' (usually called straight single quotation mark or apostrophe) is typeset like rather than '. The reason behind this is complicated. Anyone interested can read the references listed below. With ISOLatin+ charset, users can use octal code \234 to get the ' character.

References:

  1. https://en.wikipedia.org/wiki/Apostrophe
  2. https://typographyforlawyers.com/straight-and-curly-quotes.html
  3. https://en.wikipedia.org/wiki/Quotation_mark

@seisman seisman added bug Something isn't working needs review This PR has higher priority and needs review. labels Apr 23, 2024
@seisman seisman added this to the 0.12.0 milestone Apr 23, 2024
@seisman seisman added final review call This PR requires final review and approval from a second reviewer enhancement Improving an existing feature and removed needs review This PR has higher priority and needs review. bug Something isn't working labels Apr 24, 2024
@seisman seisman merged commit 8592b54 into main Apr 25, 2024
23 checks passed
@seisman seisman deleted the singlequotes branch April 25, 2024 00:20
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 25, 2024
@seisman seisman changed the title Fix the bug for support of left/right single quotation marks Support left/right single quotation marks in text and arguments Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants