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

[FEATURE] Custom conceal characters #242

Open
grepgrok opened this issue Dec 28, 2023 · 5 comments
Open

[FEATURE] Custom conceal characters #242

grepgrok opened this issue Dec 28, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@grepgrok
Copy link

grepgrok commented Dec 28, 2023

Description of the Problem

There are some sequences where either there is no current concealment or I can think of a better but I can't just make it do that. For example, I would like to have \lVert a \rVert be concealed as || a || but it currently just shows the base LaTeX.

Description of the Solution

Add JSON like with the snippets mapping commands or strings of text to a concealment. For example,

{
    "\\lVert": " || ",
    "\\rVert": " || ",
}
@grepgrok grepgrok added the enhancement New feature or request label Dec 28, 2023
@mayurankv
Copy link

I would also really like this! For portability to other places I generally like to use as few custom definitions as possible but that means things like writing \operatorname*{Var} which I would love to just see as Var and there's tons more examples. I wouldn't have thought this would be particularly hard to implement (and I'd be happy to submit a pr if helpful) and I think it would be a great addition!

More examples include things like ^{\intercal} as a superscript T.

One additional thing I'd like to have is the opportunity to set multiple strings to a single conceal, like ^{T} in addition to the above example or variations of the same function.

One last thing is it would also be great if this was implemented like the snippets so that you could define your own files or do it via settings and also where you can modify the default concealments if you prefer alternatives!

@artisticat1
Copy link
Owner

I wouldn't have thought this would be particularly hard to implement (and I'd be happy to submit a pr if helpful) and I think it would be a great addition!

You are very welcome to submit a PR! Let me know if you'd like any pointers as to navigating the codebase etc.

@mayurankv
Copy link

I'll get a start on this then! Thank you (also apologies for spam commenting on some of your issues across your plugins, just trying to help clear them up so more relevant things can be addressed!). Really appreciate all your work!

@artisticat1
Copy link
Owner

No worries, I appreciate the effort! If it's something you'd be interested in, I can try looking into whether I can offer you permissions to label/close/organise issues.

Apologies if I'm unable to respond to all your FRs! I noticed that you offered to submit PRs for many of them, so I wanted to let you know that any such PRs would be very welcome.

@mayurankv
Copy link

mayurankv commented Feb 23, 2024

I'd definitely be happy to help with that! It sometimes irks me when there's valid issues that get lost under ones that don't need to stay open anymore haha. And no worries, you're presumably busy as well so no rush at all. Yeah this project is something that's essential to working with maths in Obsidian imo so I'll definitely try and make those FRs - though I am also pretty busy right now so no idea when this would be.

EDIT: Though in terms of organising issues and closing labels, that's definitely something I'd be happy to do now as I think it would really help me work out which stuff needs to be done first etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants