home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 894882015

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/5682#issuecomment-894882015 https://api.github.com/repos/pydata/xarray/issues/5682 894882015 IC_kwDOAMm_X841VtDf 13205162 2021-08-09T00:27:12Z 2021-08-09T00:27:12Z CONTRIBUTOR

I wonder if it will look best if we avoid splitting inside the latex code? name, extra and units can have latex as well so I think we need to handle the entire name+extra+units string somehow.

I was playing around a little with regex but I didn't get that far:

```python import textwrap import re

name = r"$Ra_s = \mathrm{mean}(\epsilon_k) / \mu M^2_\infty$" extra = "Longwinded comments about something confusing. " units = r"$[N / m]$" label_raw = name + extra + units label_notex = re.sub("\$(.+?)\$", "X ", label_raw, flags=re.DOTALL) label_notex_wrap = textwrap.wrap(label_notex, 30) label_tex_wrap = ... # regex to add back the latex strings.
```

There might very well be a simpler way of doing this.

I couldn't figure out any way to avoid splitting LaTeX code. I suspect that the way to do it might be kind of complex (but I'm happy if someone can prove me wrong). We can also increase the number of columns for the latex option even more to maintain simplicity...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  963239311
Powered by Datasette · Queries took 79.311ms · About: xarray-datasette