Skip to content

Releases: artisticat1/obsidian-latex-suite

1.9.8

18 Jan 16:35
Compare
Choose a tag to compare
  • Matrix shortcuts will now run in the gather environment as well. (#343 by @llakala)
  • Conceal dfrac, tfrac and gfrac in addition to frac. (#344 by @llakala)
  • Conceal \operatorname. (#353 by @vreithinger)
  • Matrix shortcuts now work in inline math as well. (#362 by @AJCubed)

1.9.7

13 Oct 16:11
Compare
Choose a tag to compare
  • When using Conceal, you can now delay the reveal of LaTeX under the cursor. This makes it much easier to navigate equations using arrow keys when Conceal is enabled.
    (Closes #283, thanks to #332 by @shunby and @bdm-k)

1.9.5

26 Aug 15:00
Compare
Choose a tag to compare
  • Improved handling of tabstops, thanks to #306 by @bdm-k.
  • Improved performance of Latex Suite in large files by ~10X, thanks to #323 by @shunby.

1.9.4

22 Jun 11:58
Compare
Choose a tag to compare
  • When backspacing inside empty inline math ($|$), the closing $ symbol will be automatically deleted as well. (#266 by @bdm-k)

1.9.3

27 Apr 11:10
Compare
Choose a tag to compare
  • The math popup preview no longer blocks LaTeX source code for long inline math equations when its position is set to "Below". (#288 by @bdm-k)
  • When an IME is active, snippets are now disabled by default. (#286 by @RyotaUshio)

1.9.2

11 Apr 16:31
Compare
Choose a tag to compare
  • Improved the default snippets.
    • Reorganised snippets into categories and added more comments.
    • Added shortcut " -> \text{}.
    • Added shortcut \sumTab -> \sum_{i=1}^{N}.
    • Added snippets under "Misc" section that enable you to automatically convert lone letters or Greek letters in text to math.
    • Made some snippets less aggressive.
  • You can now choose to load snippet variables from files, as well as snippets from files. (#280 by @itay-raveh)
  • The "highlight matching bracket" highlight is now more visible.
  • Updated the appearance of snippet placeholders.

1.9.1

23 Feb 18:42
Compare
Choose a tag to compare
  • The math popup preview can now be positioned below instead of above your equation source, so it doesn't obscure text above your equation (#257 by @bdm-k)
  • Added lVert and rVert default snippets, auto-enlarge and conceal (#253 by @Comprehensive-Jason)
  • Snippets can now have more than 9 tabstop placeholders (#256 by @git-wil)
  • Default snippets: Added overbrace shortcut (#249 by @you-n-g)
  • Default snippets: Matrix environment snippets (e.g. pmatrix) now take into account block/inline math

1.9.0

15 Jan 17:25
Compare
Choose a tag to compare

Function snippets

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

  • Added new identity matrix default snippet
  • Fixed/improved snippet placeholder mark decorations appearing when not necessary

1.8.10

27 Nov 16:53
Compare
Choose a tag to compare

1.8.9

03 Nov 12:52
044b962
Compare
Choose a tag to compare
  • Fixed Latex Suite causing cards to be blurry in canvases. (#187)
  • Fixed auto-fraction removing parentheses in (a)(b)/ when it shouldn't. (#206, #220 by @duanwilliam)