In vscode, I would like to type something like \scrK to get . There is a Unicode Latex plugin but it takes several extra keystrokes. What would be the easiest way to accomplish this?
Thanks!
(I'm using the LaTeX workshop plugin)
In vscode, I would like to type something like \scrK to get . There is a Unicode Latex plugin but it takes several extra keystrokes. What would be the easiest way to accomplish this?
Thanks!
(I'm using the LaTeX workshop plugin)
One way is to use snippets.
Press Command + Shift + P and enter snippets
Choose latex
"calligraphic K": {
"prefix": "\\scrK",
"body": "",
"description": "insert unicode character U1D4A6"
},
Afterward, the file should look like this
I am on mac, but that shouldn't matter.
If latex is not listed under the Unicode-latex:Extensions then the unicode command functionality that the unicode-latex extension offers does not work in the LaTeX Workshop extension without extra keystrokes. So all I had to do was to add the line latex under the extensions.
With thanks to @UlrikeFischer and @dexteritas for their comments.
\scrKthat outputs a Unicode char? Or do you want to define a keystroke, that put a Unicode character into your tex file? Should it be exactly the Unicode char (0x1D4A6) or would something like\mathcal{K}or\mathscr{K}(with\usepackage{mathrsfs}) be possible? Should it run with LaTeX or would XeLaTeX also be an option? – dexteritas Feb 11 '23 at 19:04\scrKto output a Unicode character (and likewise for other characters). I uselualatexwithunicode-math. Sorry that wasn't clear. – JPi Feb 12 '23 at 20:22\mscrKor\symcal{K}give that already? – Ulrike Fischer Feb 13 '23 at 09:09unicode-math: List of symbols defined by the package by searching for "1D4A6" (hex code of the char). – dexteritas Feb 13 '23 at 09:37