-
Notifications
You must be signed in to change notification settings - Fork 390
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 mathbf #557
Comments
The problem is that this is within the |
You can do something like syntax cluster texMathZoneGroup add=texBoldStyle
syntax cluster texMathMatchGroup add=texBoldStyle
syntax region texBoldStyle matchgroup=texStatement start='\\vect\s*{' end='}' contains=texMathZoneX contained concealends
syntax region texBoldStyle matchgroup=texStatement start='\\boldsymbol\s*{' end='}' contains=texMathZoneX contained concealends This works well with |
Thanks @aquadr, that seems like it should or could work. Is there a good reason not to add this by default? Or, perhaps: Do you (either @anntzer or @aquadr or anyone else) have a list of specific math fonts that should be italized or bolded that I could create custom groups for that I would add to the clusters? I guess it does not really make sense to add |
I don't think there is a good reason not to add this by default. My understanding of vim syntax files is limited... I think creating Here is a small (surely incomplete) list of commands which could be styled: \documentclass[]{article}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{fixmath}
\begin{document}
\begin{align}
a \\
\textit{a} \\
\mathit{a} \\
\mathbf{a} \\
\mathbold{a} \\
\boldsymbol{a} \\
\bm{a} \\
\pmb{a} \\
\mathsf{a} \\
\textsf{a} \\
\mathrm{a} \\
\text{a}
\end{align}
\end{document} One might argue, wheter |
I don't have any exhaustive list, looks like @aquadr is already doing all the work there. |
I've been looking at this and thinking. I've tried to implement it, but to me it does not look quite right. I would have to add options that control it, and the default would be to have it disabled. Since this is "easily" added on a per user basis by adding the lines suggested by @aquadr to ones |
Just found the two-year old https://github.com/KeitaNakamura/tex-conceal.vim that resolves all of this concealing quite well. Perhaps it can be mentioned, or even implemented as an option. |
Thanks for the notice! I'll make a comment on this in the docs. I'm not personally a big fan of conceals, and so I don't really feel like adding it to vimtex. However, if it is a popular opinion that this should be added to vimtex, then I could reconsider (feel free to open a new issue to check if there is such an interest). |
Hi @lervag, I just found tex-conceal.vim and it's really nice, but today vimtex blocks most of it from working. I'm not sure how to make the two play together. There's a simple rendering test on tex-conceal.vim, it works standalone, but with vimtex, almost nothing gets concealed as expected, so it can be stated the two are currently incompatible. |
@oblitum Feel free to open a new issue on this topic. Note: I will not do anything to make Vimtex play nice with tex-conceal, but I might consider adding more conceal rules inspired by tex-conceal. |
This is a request for concealing \mathbf similarly to \textbf. Unfortunately, just adding
mathbf
at https://github.com/lervag/vimtex/blame/master/after/syntax/tex.vim#L31 does not seem to suffice, perhaps due to group nesting?Thanks in advance.
Minimal working example
Please provide a minimal working LaTeX example, e.g.
Minimal vimrc file
Please provide a minimal vimrc file that reproduces the issue. The following
should often suffice:
The text was updated successfully, but these errors were encountered: