Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] about 2 months ago
$|$
), the closing $
symbol will be automatically deleted as well. (#266 by @bdm-k)Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 6 months ago
"
-> \text{}
.\sum
Tab -> \sum_{i=1}^{N}
.Published by github-actions[bot] 8 months ago
lVert
and rVert
default snippets, auto-enlarge and conceal (#253 by @Comprehensive-Jason)Published by github-actions[bot] 9 months ago
You can now run JavaScript code in snippets! To do this, make your replacement
a function. For example, the snippet
{trigger: "date", replacement: () => (new Date().toDateString()), options: "t"},
will expand "dateTab" to the current date, such as "Mon Jan 15 2023".
Function snippets work with regex and visual snippets as well.
For regex snippets, Latex Suite will pass in the RegExpExecArray
returned by the matching regular expression to your replacement function. This lets you access the value of capture groups inside your function. For example, the regex snippet
{trigger: /iden(\d)/, replacement: (match) => {
const n = match[1];
let arr = [];
for (let j = 0; j < n; j++) {
arr[j] = [];
for (let i = 0; i < n; i++) {
arr[j][i] = (i === j) ? 1 : 0;
}
}
let output = arr.map(el => el.join(" & ")).join(" \\\\\n");
output = `\\begin{pmatrix}\n${output}\n\\end{pmatrix}`;
return output;
}, options: "mA"},
will expand "iden4" to a 4×4 identity matrix:
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{pmatrix}
. More generally, it will expand "idenN" to an N×N identity matrix.
For more information on function snippets, see the docs here. (Closes #16, thanks to #241 by @duanwilliam)
Other minor improvements
Published by github-actions[bot] 11 months ago
lfloor
, rfloor
, lceil
, rceil
(#226 by @m4rch3n1ng)floor
and ceil
(#227 by @m4rch3n1ng)Published by github-actions[bot] 12 months ago
(a)(b)/
when it shouldn't. (#206, #220 by @duanwilliam)Published by github-actions[bot] 12 months ago
You can now use Regular Expression literals in snippet triggers! e.g. The regex snippet
{trigger: "([A-Za-z])(\\d)", replacement: "[[0]]_{[[1]]}", options: "rA"}
will expand x2
to x_{2}
.
The same snippet can now be written using a RegExp literal as
{trigger: /([A-Za-z])(\d)/, replacement: "[[0]]_{[[1]]}", options: "A"}
.
You can now set regex flags in a snippet using the flag
property on a snippet, e.g.
{ trigger: "foo", replacement: "bar", options: "rA", flags: "i" },
will replace "foo", "FOO", and "fOo" with "bar".
For power users: you can now treat snippet files as javascript modules, with the snippets array being the default export (#219 by @duanwilliam). For example,
const SHORT_SYMBOL = "to|pm|mp"
export default [
{ trigger: `([^\\\\])(${SHORT_SYMBOL})`, replacement: "[[0]]\\[[1]]", options: "rmA" },
]
is now a valid snippet file. See #219 for more information.
Improved setting description for snippet file location.
Published by github-actions[bot] 12 months ago
Published by github-actions[bot] 12 months ago
\set
, improve concealing of operators (#216, #217 by @duanwilliam)\begin{}
and \end{}
are now treated as text environments (#157)Published by github-actions[bot] 12 months ago
${GREEK}
and ${SYMBOL}
in the plugin settings (#181 by @Benjymack)\bigcup
, \bigcap
, \forall
to ${SYMBOLS}
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
n
for inline mathM
for block mathc
for codeblocksmath
codeblocks as regular equationsPublished by github-actions[bot] about 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago