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

Conceal support for more math text style commands #2034

Closed
patnr opened this issue Apr 16, 2021 · 4 comments
Closed

Conceal support for more math text style commands #2034

patnr opened this issue Apr 16, 2021 · 4 comments

Comments

@patnr
Copy link
Contributor

patnr commented Apr 16, 2021

As mentioned after resolution of #1972 I use \mathds to produce (e.g.) the double-struck 1, and would like to see it concealed. Seeing as this is a fairly common use case, I would say adding it to vimtex is reasonable. @lervag agrees that concealment for some more font style commands may be added. However, which ones to add? It's beyond me to firmly judge which ones are pertinent or frivolous, but the following lists those not already in vimtex that appear at the top of this popular stackexchange answer.

To be rendered in bold:

  • pmb
  • bm

To be rendered as double-struck

  • mathds
  • mathbbb
  • mathbbm
  • mathbbmss
  • mathbbmtt
  • varmathbb

To be rendered as Goth/Frak:

  • textfrak
  • textswab
  • textgoth

@lervag also mentioned that this might be activated upon availability of the corresponding package.

lervag added a commit that referenced this issue Apr 23, 2021
@lervag
Copy link
Owner

lervag commented Apr 23, 2021

I've pushed an update that should solve at least your issue here. I did not consider pmb, bm, and the text* variants as of now, since I'm not sure if these are really of interest. Perhaps bm is; I can remember using it myself. But the other seems to be fringe commands?

lervag added a commit that referenced this issue Apr 23, 2021
@lervag lervag closed this as completed Apr 23, 2021
@patnr
Copy link
Contributor Author

patnr commented Apr 28, 2021

Sorry for the latency. I certainly never used the text* variants, but bm I use a lot. Oh, but I see now that you did also conceal bm! It all looks good to me, except that the use case I mentioned above (double struck 1) is not concealed. However, I personally now have that handled like this anyways:

let g:vimtex_syntax_custom_cmds = [
      \ {'name': 'ones', 'mathmode': 1, 'concealchar': '𝟙'},
      \]

@lervag
Copy link
Owner

lervag commented Apr 28, 2021

Ah, yes, I've only added the double struck for alphabetic characters. I could add this also for the numbers - it is a trivial change. Will do it later today.

lervag added a commit that referenced this issue Apr 28, 2021
@lervag
Copy link
Owner

lervag commented Apr 28, 2021

Double struck should work with all letters (a-zA-Z) and numbers (0-9) now.

@patnr patnr mentioned this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants