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

BREAKING: Support typesetting apostrophe (') and backtick (`) #3105

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 13, 2024

See #3476 for context.

As explained in #3476, currently, we can't typeset the original apostrophes and backticks because they're mapped to ‘’ in PostScript. This PR adds the patch to support typesetting apostrophes and backticks.

Please note that this is a breaking change. The main motivation of this PR is to ensure what you type is what you get (WYTIWIG, similar to WYSIWIG). So I think it's breaking things in a good way.

See the script and images below for the changes:

import pygmt

chars = "A ` ' ‘ ’ \" “ ” B"
fig = pygmt.Figure()
fig.basemap(
    projection="X4c/2c", region=[0, 4, 0, 2], frame=["WSen", f"x+l{chars}"]
)
fig.text(x=2, y=1, text=chars, font="20p")
fig.show()
Main branch This PR
main RP-3105

Fixes #3476.

Copy link
Contributor

github-actions bot commented Mar 13, 2024

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
modified pygmt/tests/baseline/test_text_quotation_marks.png

Image diff(s)

Added images

Modified images

Path Old New
test_text_quotation_marks.png

Report last updated at commit 94092b4

@seisman seisman marked this pull request as draft March 13, 2024 13:11
@michaelgrund michaelgrund added final review call This PR requires final review and approval from a second reviewer needs review This PR has higher priority and needs review. and removed final review call This PR requires final review and approval from a second reviewer labels Mar 13, 2024
@seisman seisman removed the needs review This PR has higher priority and needs review. label Mar 13, 2024
@seisman seisman self-assigned this Oct 30, 2024
@seisman seisman changed the title Better support for single quotation and double quotation marks ('"‘’“”) BREAKING: Support typesetting apostrophe (') and backtick (`) Dec 2, 2024
@seisman seisman marked this pull request as ready for review December 2, 2024 03:29
@seisman seisman added needs review This PR has higher priority and needs review. discussions Need more discussion before taking further actions labels Dec 2, 2024
@seisman seisman added this to the 0.14.0 milestone Dec 2, 2024
@seisman seisman added enhancement Improving an existing feature and removed discussions Need more discussion before taking further actions labels Dec 2, 2024
pygmt/helpers/utils.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature needs review This PR has higher priority and needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typesetting backticks ` and straight single quote '
2 participants