Snippets sharing thread #50
Replies: 17 comments 12 replies
-
Here are my favorite custom snippets, for your pleasure. I have plenty of text mode snippets, because this plugin is useful for more than just formatting math! Text Mode Snippets
Math Mode Snippets
Feel free to use any of these, and please let me know of any bugs and edge cases! Thanks again to @artisticat1 for this plugin. |
Beta Was this translation helpful? Give feedback.
-
Here are some useful sums that I use (I like the limits above/below look) and defaulting to common sums.
For those who are tired of typing \mathbb{R}^{m \times n} or other common set dimension stuff then this is for you.
|
Beta Was this translation helpful? Give feedback.
-
include a latex font size command when beginning new latex sections
|
Beta Was this translation helpful? Give feedback.
-
Kerbless's additionsEntering math mode as quick latex for obsidian.
Functions.
|
Beta Was this translation helpful? Give feedback.
-
Here are snippets I'm using. May have some problems on less used snippets. Most are about physics.
Feel free to use and welcome for any modifications and extension! |
Beta Was this translation helpful? Give feedback.
-
Basic question. Where am I supposed to write these custom snippets to have them working in my Obsidian notes? |
Beta Was this translation helpful? Give feedback.
-
Arrows in specific directions! {trigger: "lra", replacement: "\\longrightarrow", options: "mA"},
{trigger: "(nna|uua)", replacement: "\\uparrow", options: "mAr"},
{trigger: "nea", replacement: "\\nearrow", options: "mA"},
{trigger: "(eea|rra)", replacement: "\\rightarrow", options: "mAr"},
{trigger: "sea", replacement: "\\searrow", options: "mA"},
{trigger: "(ssa|dda)", replacement: "\\downarrow", options: "mAr"},
{trigger: "swa", replacement: "\\swarrow", options: "mA"},
{trigger: "(wwa|lla)", replacement: "\\leftarrow", options: "mAr"},
{trigger: "nwa", replacement: "\\nwarrow", options: "mA"}, Codeblocks! The {trigger: "cbl", replacement: "```$0\n```", options: "tA"},
{trigger: "dvcbl", replacement: "```dataview\n$0\n```", options: "tA"},
{trigger: "rscbl", replacement: "```rust\n$0\n```", options: "tA"},
{trigger: "tscbl", replacement: "```typescript\n$0\n```", options: "tA"},
{trigger: "jscbl", replacement: "```javascript\n$0\n```", options: "tA"},
{trigger: "tikzcbl", replacement: "```tikz\n\\definecolor{bg}{HTML}{1e1e1e}\n\\usetikzlibrary{arrows.meta}\n\n\\begin{document}\n\\LARGE\n\\begin{tikzpicture}[very thick,scale=2,>=Stealth]\n\n$0\n\n\\end{tikzpicture}\n\\end{document}\n```$1", options: "tA"},
{trigger: "chbl", replacement: "```tikz\n\\definecolor{bg}{HTML}{1e1e1e}\n\\usepackage{chemfig}\n\n\\begin{document}\n\\LARGE\n\n\\chemfig{$0}\n\n\\end{document}\n```$1", options: "tA"}, Miscellaneous niceties! Warnings:
{trigger: "adm", replacement: "$$\n\\begin{align}\n$0\n\\end{align}\n$$", options: "tAw"},
{trigger: "lor", replacement: "\\lor", options: "mA"},
{trigger: "land", replacement: "\\land", options: "mA"},
{trigger: "lxor", replacement: "\\oplus", options: "mA"},
{trigger: "neg", replacement: "\\neg", options: "mA"},
{trigger: "col", replacement: ":-: | ", options: "t"},
{trigger: "nin", replacement: "\\notin", options: "mA"},
{trigger: "deg", replacement: "^{\\circ}", options: "mA"},
{trigger: "fah", replacement: "\\text{F} ", options: "mA"},
{trigger: "cel", replacement: "\\text{C} ", options: "mA"},
{trigger: "mod", replacement: "\\mod ", options: "mAw"},
{trigger: "max", replacement: "\\max", options: "mAw"},
{trigger: "min", replacement: "\\min", options: "mAw"}, |
Beta Was this translation helpful? Give feedback.
-
I wanna help. How to do that |
Beta Was this translation helpful? Give feedback.
-
Hi everyone ! Special modes {trigger: "#d", replacement: "\\displaystyle ", options: "mA"},
{trigger: "#t", replacement: "\\text{$0}", options: "mA"},
{trigger: "#b", replacement: "\\mathbf{$0}", options: "mA"},
{trigger: "#n", replacement: "\\mathrm{$0}", options: "mA"}, over / underlining: {trigger: ",b", replacement: "\\bar{$0}$1", options: "mA"},
{trigger: ",h", replacement: "\\hat{$0}$1", options: "mA"},
{trigger: ",H", replacement: "\\widehat{$0}$1", options: "mA"},
{trigger: ",d", replacement: "\\dot{$0}$1", options: "mA"},
{trigger: ",t", replacement: "\\tilde{$0}$1", options: "mA"},
{trigger: ",T", replacement: "\\widetilde{$0}$1", options: "mA"},
{trigger: ",D", replacement: "\\ddot{$0}$1", options: "mA", priority: 2},
{trigger: ",v", replacement: "\\vec{$0}$1", options: "mA"},
{trigger: ",V", replacement: "\\overrightarrow{$0}$1", options: "mA"}, Sums and products {trigger: "sum", replacement: "\\sum", options: "mA"},
{trigger: "\\sum", replacement: "\\sum_{ $0 }^{ $1 }", options: "m"},
{trigger: "prod", replacement: "\\prod", options: "mA"},
{trigger: "\\prod", replacement: "\\prod_{ $0 }^{ $1 }", options: "m"},
{trigger: "lim", replacement: "\\lim_{ ${0:n} \\to ${1:\\infty} } $2", options: "m"}, Some set-theory operators {trigger: "empty", replacement: "\\emptyset", options: "m"},
{trigger: "set", replacement: "\\{ $0 \\}$1", options: "m"},
{trigger: "oo", replacement: "\\infty ", options: "m"},
{trigger: "fa", replacement: "\\forall ", options: "m"},
{trigger: "ex", replacement: "\\exists ", options: "m"},
{trigger: "sub", replacement: "\\subset ", options: "m"},
{trigger: "sub=", replacement: "\\subseteq ", options: "m"},
{trigger: "sup", replacement: "\\supset ", options: "m"},
{trigger: "\\", replacement: "\\setminus ", options: "m"},
{trigger: "sq", replacement: "\\square", options: "m"}, Overall result: my config is a lot shorter and cleaner than the default, despite having added things. And you, do you think the default has too much automatic bindings ? |
Beta Was this translation helpful? Give feedback.
-
I like my notes to never contain the latex command when there is an equivalent unicode character. For example, my notes never contain Using the unicode characters rather than the command creates identical output for mathjax, katex, temml, and latex itself using the unicode-math package. Using unicode characters means that the conceal functionality creates less distraction when navigating through an equation, because most of the conceal "replacements" are already used directly in the note. To input the unicode characters I have some (messy) snippets to replace "\alpha" with "α", etc. I also have some (messy) replacements for the greek bold characters, so again I can use only one character. However, (and here is my point): Does anyone else have snippets I can use that work with unicode characters and would like to share, as it'll be a while before I can sort my snippets out, and would prefer to use the work of someone who has already done this. |
Beta Was this translation helpful? Give feedback.
-
I think I posted my snippet as an issue haha sorry for the inconvenience {trigger: "Ntor", replacement: "<${0:x}{1}, ${0:x}{2}, \cdots ,${0:x}_{n}>", options: "mA"} I use this one to denote vectors in n dimension spaces |
Beta Was this translation helpful? Give feedback.
-
Just beginning to experiment with regex, decided to create a replacement for a column vector using dots as separation instead of tabbing through each item.
Would it be possible to generalize this to an N dimensional vector without having to make each case a separate snippet? |
Beta Was this translation helpful? Give feedback.
-
Questions using a callout, checkbox and tag:
Solutions using a collapsable callout
|
Beta Was this translation helpful? Give feedback.
-
Repeated indicies to write subscripts
|
Beta Was this translation helpful? Give feedback.
-
I have no clue what mk and dm stand for so I changed how to enter math mode. Type one $ for inline, then another $ for Block.
|
Beta Was this translation helpful? Give feedback.
-
Hi there! |
Beta Was this translation helpful? Give feedback.
-
I have some snippets as follow:
|
Beta Was this translation helpful? Give feedback.
-
You can share custom snippets you've written with others here!
Beta Was this translation helpful? Give feedback.
All reactions