-
Notifications
You must be signed in to change notification settings - Fork 357
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
Revisit the handling of hyphen-minus inconsistence #1421
Comments
To implement the idea from #196 we would need a new flag in the PSL structure to tell us if we are dealing with annotations or arbitrary text, since the switch from minus to hyphen etc in the PS code happens inside postscriptlight, and that function (psl_fix_utf8) is clueless as to what is being passed. Something like |
Can we do the switch outside postscriptlight, e.g. in the -B functions? |
No, we don't want to. I think the spirit of the above is that we always want to use minus sign when we place annotations and use always hyphens elsewhere, but users can override the latter with octal codes when they see fit. |
Related to #196, #198, #391, #644.
Sorry to be too picky. I'm not quite satisfied with how GMT handles hyphen and minus.
See the script and the generated figure below as a possible use case. If I don't have much knowledge about the difference between hyphen and minus, I think I would be confused why spaces in a string change the appearance of -.
I know that GMT internally converts some hyphens to minus, following some rules. I don't know the exact rules, but I think it's based on the definition of hyphen, as mentioned in comments of previous issues/PRs:
However, I don't think the definition is always true. I can imagine many use cases where I need a hyphen, not a minus. For example, command line option -B should use a hyphen, instead of a minus. Sometimes, we even need a en-dash or a em-dash. I don't think there are perfect rules to determine when a hyphen should be used or not.
Actually, I quite like the idea proposed by @PaulWessel in #196 (comment).
I think we should follow the idea, and let users decide which one to use. The only exception is annotations, as pointed by the first point of Paul's comment, in which we should always use a minus.
The text was updated successfully, but these errors were encountered: