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

WIP Explore Latex in subplot tags #7958

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

PaulWessel
Copy link
Member

See this forum post for background. Not straightforward since we run a special PSL function to set those. Tried the obvious (relying on the other places we handle this) but get a crashing PostScript. Will follow up.

See forum post for background.  Not straightforward since we run a special PSL function to set those.  Tried the obvious (relying on the other places we handle this) but get a crashing PostSCript.  Will follow up.
@PaulWessel PaulWessel added the bug Something isn't working label Oct 20, 2023
@PaulWessel PaulWessel self-assigned this Oct 20, 2023
src/gmt_plot.c Outdated
@@ -2675,24 +2675,24 @@ GMT_LOCAL void gmtplot_consider_internal_annotations (struct GMT_CTRL *GMT, stru
PSL_settextmode (PSL, PSL_TXTMODE_HYPHEN); /* Back to leave as is */
}

GMT_LOCAL void gmtplot_map_label (struct GMT_CTRL *GMT, double x, double y, char *label, double angle, int just, unsigned int axis, bool below) {
GMT_LOCAL void gmtplot_map_label (struct GMT_CTRL *GMT, double x, double y, char *label, double angle, int just, unsigned int axis, bool below, unsigned int feature) {
Copy link
Member

Choose a reason for hiding this comment

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

unsigned int feature. Aren't enums signed ints? So this one should be signed int too, no? Besides unsigned ints are a pain.

Copy link
Member Author

Choose a reason for hiding this comment

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

feature is now a enum GMT_enum_feature

@PaulWessel
Copy link
Member Author

For testing, here is a small subplot that fails due to Latex code:

#!/bin/bash
gmt begin Figure png
  gmt set FONT_TAG 16p,Times-Italic
  gmt subplot begin 1x1 -Fs6i -A+o-0.2c/0 -JW180/6i -Rg
    gmt subplot set 0,0 -A"@[\nabla^2@["
    gmt basemap ${eq_proj} -B0
  gmt subplot end
gmt end show

I will update the subplot documentation with a note that Latex expressions in the -A is currently not allowed.

PaulWessel added a commit that referenced this pull request Nov 5, 2023
See #7958 for background.  This updates the documentation until we have a better solution.
@PaulWessel
Copy link
Member Author

See #8016 for documentation warning.

PaulWessel added a commit that referenced this pull request Nov 5, 2023
* Warn that Latex cannot be used in panel tags

See #7958 for background.  This updates the documentation until we have a better solution.

* Update doc/rst/source/subplot.rst

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>

---------

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants