Skip to content

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

Merged
michaelgrund merged 21 commits into
mainfrom
quotes
Feb 20, 2025
Merged

BREAKING: Support typesetting apostrophe (') and backtick (`)#3105
michaelgrund merged 21 commits into
mainfrom
quotes

Conversation

@seisman

@seismanseisman commented Mar 13, 2024

Copy link
Copy Markdown
Member

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:

importpygmtchars="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 branchThis PR
mainRP-3105

Fixes#3476.

@github-actions

github-actionsBot commented Mar 13, 2024

Copy link
Copy Markdown
Contributor

Summary of changed images

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

StatusPath
modifiedpygmt/tests/baseline/test_text_quotation_marks.png

Image diff(s)

Details

Added images

Modified images

PathOldNew
test_text_quotation_marks.png

Report last updated at commit 045548c

@seisman
seisman marked this pull request as draft March 13, 2024 13:11
@michaelgrundmichaelgrund 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
@seismanseisman removed the needs review This PR has higher priority and needs review. label Mar 13, 2024
@seismanseisman self-assigned this Oct 30, 2024
@seismanseisman 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
@seismanseisman added needs review This PR has higher priority and needs review. discussions Need more discussion before taking further actions labels Dec 2, 2024
@seismanseisman added this to the 0.14.0 milestone Dec 2, 2024
@seismanseisman added enhancement Improving an existing feature and removed discussions Need more discussion before taking further actions labels Dec 2, 2024
@seismanseisman removed this from the 0.14.0 milestone Dec 24, 2024
@seismanseisman removed the needs review This PR has higher priority and needs review. label Dec 27, 2024
@seismanseisman modified the milestone: 0.15.0Dec 27, 2024
@seismanseisman added this to the 0.15.0 milestone Jan 4, 2025
@seismanseisman added the needs review This PR has higher priority and needs review. label Jan 4, 2025
@seismanseisman removed the needs review This PR has higher priority and needs review. label Feb 10, 2025
@seisman
seisman changed the base branch from main to is_printable_asciiFebruary 10, 2025 14:00
@seisman
seisman marked this pull request as draft February 10, 2025 14:17
Base automatically changed from is_printable_ascii to mainFebruary 17, 2025 06:35
@seismanseisman added the needs review This PR has higher priority and needs review. label Feb 20, 2025
@seisman
seisman marked this pull request as ready for review February 20, 2025 04:53
@seisman
seisman requested a review from a teamFebruary 20, 2025 05:13
@seismanseisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Feb 20, 2025

@yvonnefroehlichyvonnefroehlich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor formulation suggestions.

Comment threadpygmt/tests/test_text.py Outdated
Comment threadpygmt/helpers/utils.py Outdated
Comment threadpygmt/helpers/utils.py Outdated
seismanand others added 2 commits February 20, 2025 16:45
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
@michaelgrund
michaelgrund merged commit e66589f into mainFeb 20, 2025
@michaelgrund
michaelgrund deleted the quotes branch February 20, 2025 09:42
@michaelgrundmichaelgrund removed the final review call This PR requires final review and approval from a second reviewer label Feb 20, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementImproving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typesetting backticks ` and straight single quote '

3 participants

@seisman@michaelgrund@yvonnefroehlich