Comments (3)
Hi @gruvw, the cleanest way for this to be fixed would be for LaTeX-Workshop to update their syntax files so that the math environment wouldn't be active inside a \text
command, or alternatively to add another distinguishable scope once inside such a command (this implementation has the clear drawback where we are just pushing the problem one step down the scope ladder, what happens if we have a math block inside a \text
command?).
On our end, the best we can probably do is to create a vscode extension that injects the relevant LaTeX grammar. The end result would be the same, but it would require one additional extension installation.
Unfortunately, my knowledge of textmate grammars isn't all that great (I'm barely able to add syntax highlighting to the .hsnips
files), so I'd have to take some time to find out how to do that.
from hsnips.
Ok...
I don't think that the solution is to create a special extension just for this purpose and I hope we don't need to go that way...
About pushing the problem to the next text nesting, I don't really see the point: if you are in text mode (within a math block), why would you nest a new \text
context ?
In short: \text{test $x+3 \text{ test}$}
is the same as \text{test $x+3$ test}
.
At least for me, one level nesting would be enough.
I will create a new issue in the LaTeX Workshop repository to see what they can do about it.
from hsnips.
will be merged into main branch of LaTeX-Workshop extension
from hsnips.
Related Issues (20)
- "Error creating hsnips directory in WSL2 when using 'open snippets file' command in extension"
- Regular Expression with underscore
- Can Not Match regular expression like: `(\S*)\.log$` "Desc" without A
- "Open snippet file for current language" command?
- 有时无法触发 HOT 2
- Hypersnip not always start with vscode on MacOS HOT 1
- Hide snippet suggestion
- Autocomplete failure if no language field exist in tokens/scopes HOT 1
- Escape character not working for code blocks in markdown HOT 1
- Callback is not a function when using directory
- **Description** is only visible when the snippet is selected.
- Problem with hyperref and `` ''
- Everything stop working HOT 2
- Bug Report Abw not working
- Latest hypersnips does not work for me HOT 2
- Snippets lag depending on position.
- Feature request: Configure keybindings from vscode HOT 1
- Expanding snippets inside snippets deletes tabstops HOT 44
- all.hsnips fails on C/C++ projects
- Running 'File Delete' participants Bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hsnips.