Skip to content

snippet(latex): Add (texmathp) condition to certain snippets #104

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

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions latex-mode/bigcap_^
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- mode: snippet -*-
# name: bigcap_^
# key: cap
# condition: (texmathp)
# --
\bigcap${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
Expand Down
1 change: 1 addition & 0 deletions latex-mode/bigcup_^
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- mode: snippet -*-
# name: bigcup_^
# key: cup
# condition: (texmathp)
# --
\bigcup${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
Expand Down
1 change: 1 addition & 0 deletions latex-mode/frac
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# name: frac
# key: frac
# uuid: frac
# condition: (texmathp)
# --
\frac{${1:`(or % "numerator")`}}{${2:denominator}}$0
2 changes: 2 additions & 0 deletions latex-mode/int_^
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- mode: snippet -*-
# key: int
# name: int_^
# condition: (texmathp)
# --
\int${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
Expand Down
1 change: 1 addition & 0 deletions latex-mode/lim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: lim
# key: lim
# condition: (texmathp)
# --
\lim_{${1:n} \to ${2:\infty}} $0
1 change: 1 addition & 0 deletions latex-mode/liminf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: liminf
# key: liminf
# condition: (texmathp)
# --
\liminf_{${1:n} \to ${2:\infty}} $0
1 change: 1 addition & 0 deletions latex-mode/limsup
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: limsup
# key: limsup
# condition: (texmathp)
# --
\limsup_{${1:n} \to ${2:\infty}} $0
2 changes: 2 additions & 0 deletions latex-mode/prod_^
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- mode: snippet -*-
# key: prod
# name: prod_^
# condition: (texmathp)
# --
\prod${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
Expand Down
1 change: 1 addition & 0 deletions latex-mode/root
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: sqrt[]{}
# key: root
# condition: (texmathp)
# --
\sqrt[$1]{`%`$2}
1 change: 1 addition & 0 deletions latex-mode/sqrt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: snippet -*-
# name: sqrt
# key: sq
# condition: (texmathp)
# --
\sqrt{`%`$1}$0
2 changes: 2 additions & 0 deletions latex-mode/sum_^
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- mode: snippet -*-
# key: sum
# name: sum_^
# condition: (texmathp)
# --
\sum${1:$(when (> (length yas-text) 0) "_")
}${1:$(when (> (length yas-text) 1) "{")
Expand Down