{"id":16573384,"url":"https://github.com/tecosaur/latex-auto-activating-snippets","last_synced_at":"2025-04-05T12:05:37.071Z","repository":{"id":43463629,"uuid":"256395861","full_name":"tecosaur/LaTeX-auto-activating-snippets","owner":"tecosaur","description":"Mirror of https://git.tecosaur.net/tec/LaTeX-auto-activating-snippets","archived":false,"fork":false,"pushed_at":"2024-12-12T13:15:05.000Z","size":103,"stargazers_count":105,"open_issues_count":10,"forks_count":25,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T11:09:48.458Z","etag":null,"topics":["emacs","emacs-package","mirror"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tecosaur.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tecosaur","liberapay":"tec"}},"created_at":"2020-04-17T03:53:56.000Z","updated_at":"2024-12-24T02:39:31.000Z","dependencies_parsed_at":"2024-12-22T09:14:37.931Z","dependency_job_id":"6ee77491-85a2-4851-bf83-94e9b88a8203","html_url":"https://github.com/tecosaur/LaTeX-auto-activating-snippets","commit_stats":{"total_commits":145,"total_committers":8,"mean_commits":18.125,"dds":"0.11724137931034484","last_synced_commit":"a00f0aba237b85b3e5fd60cf84de5759d1bf5d48"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecosaur%2FLaTeX-auto-activating-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecosaur%2FLaTeX-auto-activating-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecosaur%2FLaTeX-auto-activating-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecosaur%2FLaTeX-auto-activating-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tecosaur","download_url":"https://codeload.github.com/tecosaur/LaTeX-auto-activating-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332604,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-package","mirror"],"created_at":"2024-10-11T21:42:02.383Z","updated_at":"2025-04-05T12:05:37.033Z","avatar_url":"https://github.com/tecosaur.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/tecosaur","https://liberapay.com/tec"],"categories":[],"sub_categories":[],"readme":"#+title: LaTeX Auto Activating Snippets\n#+author: tecosaur, ymarco\n\n#+html: \u003ca href=\"https://www.gnu.org/software/emacs/emacs.html#Releases\"\u003e\u003cimg src=\"https://img.shields.io/badge/Emacs-26.3+-blueviolet.svg?style=flat-square\u0026logo=GNU%20Emacs\u0026logoColor=white\"\u003e\u003c/a\u003e\n#+html: \u003ca href=\"https://melpa.org/#/laas\"\u003e\u003cimg src=\"https://melpa.org/packages/laas-badge.svg\"\u003e\u003c/a\u003e\n\nA chunky set of LaTeX snippets for the [[https://github.com/ymarco/auto-activating-snippets][auto-activating-snippets engine]].\n\n* Sample Configuration\n#+begin_src emacs-lisp\n(use-package laas\n  :hook (LaTeX-mode . laas-mode)\n  :config ; do whatever here\n  (aas-set-snippets 'laas-mode\n                    ;; set condition!\n                    :cond #'texmathp ; expand only while in math\n                    \"supp\" \"\\\\supp\"\n                    \"On\" \"O(n)\"\n                    \"O1\" \"O(1)\"\n                    \"Olog\" \"O(\\\\log n)\"\n                    \"Olon\" \"O(n \\\\log n)\"\n                    ;; bind to functions!\n                    \"Sum\" (lambda () (interactive)\n                            (yas-expand-snippet \"\\\\sum_{$1}^{$2} $0\"))\n                    \"Span\" (lambda () (interactive)\n                             (yas-expand-snippet \"\\\\Span($1)$0\"))\n                    ;; add accent snippets\n                    :cond #'laas-object-on-left-condition\n                    \"qq\" (lambda () (interactive) (laas-wrap-previous-object \"sqrt\"))))\n#+end_src\n\n* Credits\n[[https://github.com/cdominik/cdlatex][cdlatex]] and this [[https://castel.dev/post/lecture-notes-1/][very nice blog post]].\n* Snippets\n/Note:/ The rendering on GitHub is a little wonkey. It should be understandable\nenough, but in any case you can also view this file from emacs:\n#+begin_src sh\n(browse-url-emacs \"https://raw.githubusercontent.com/tecosaur/LaTeX-auto-activating-snippets/master/README.org\")\n#+end_src\n** Basic set\n#+begin_src emacs-lisp :exports results\n(aas--format-doc-to-org 'laas-basic-snippets)\n#+end_src\n\n#+RESULTS:\n: Basic snippets. Expand only inside maths.\n\n#+begin_src emacs-lisp :exports results\n(aas--format-snippet-array laas-basic-snippets)\n#+end_src\n\n#+RESULTS:\n| ~!=~     | \\neq                   |\n| ~!\u003e~     | \\mapsto             |\n| ~**~     | \\cdot                   |\n| ~+-~     | \\pm                   |\n| ~-+~     | \\mp                 |\n| ~-\u003e~     | \\to                   |\n| ~...~    | \\dots                   |\n| ~\u003c\u003c~     | \\ll                   |\n| ~\u003c=~     | \\leq                   |\n| ~\u003c\u003e~     | \\diamond                   |\n| ~=\u003c~     | \\impliedby          |\n| ~==~     | \u0026=                  |\n| ~=\u003e~     | \\implies            |\n| ~\u003e=~     | \\geq                   |\n| ~\u003e\u003e~     | \\gg                   |\n| ~AA~     | \\forall                   |\n| ~EE~     | \\exists                   |\n| ~cb~     | ^3                  |\n| ~iff~    | \\iff                |\n| ~inn~    | \\in                   |\n| ~notin~  | \\not\\in                  |\n| ~sr~     | ^2                  |\n| ~xx~     | \\times                   |\n| ~❘-\u003e~    | \\mapsto             |\n| ~❘=~     | \\models             |\n| ~❘❘~     | \\mid                |\n| ~∽=~     | \\approx                   |\n| ~∽∽~     | \\sim                   |\n| ~arccos~ | \\arccos             |\n| ~arccot~ | \\arccot             |\n| ~arccot~ | \\arccot             |\n| ~arccsc~ | \\arccsc             |\n| ~arcsec~ | \\arcsec             |\n| ~arcsin~ | \\arcsin             |\n| ~arctan~ | \\arctan             |\n| ~cos~    | \\cos                |\n| ~cot~    | \\cot                |\n| ~csc~    | \\csc                |\n| ~exp~    | \\exp                |\n| ~ln~     | \\ln                 |\n| ~log~    | \\log                |\n| ~perp~   | \\perp                   |\n| ~sin~    | \\sin                |\n| ~star~   | \\star                   |\n| ~gcd~    | \\gcd                |\n| ~min~    | \\min                |\n| ~max~    | \\max                |\n| ~eqv~    | \\equiv              |\n| ~CC~     | \\CC                 |\n| ~FF~     | \\FF                 |\n| ~HH~     | \\HH                 |\n| ~NN~     | \\NN                 |\n| ~PP~     | \\PP                 |\n| ~QQ~     | \\QQ                 |\n| ~RR~     | \\RR                 |\n| ~ZZ~     | \\ZZ                 |\n| ~;a~     | \\alpha                   |\n| ~;A~     | \\forall                   |\n| ~;;A~    | \\aleph                   |\n| ~;b~     | \\beta                   |\n| ~;;;c~   | \\cos                |\n| ~;;;C~   | \\arccos             |\n| ~;d~     | \\delta                   |\n| ~;;d~    | \\partial                   |\n| ~;D~     | \\Delta                   |\n| ~;;D~    | \\nabla                   |\n| ~;e~     | \\epsilon                   |\n| ~;;e~    | \\varepsilon                   |\n| ~;;;e~   | \\exp                |\n| ~;E~     | \\exists                   |\n| ~;;;E~   | \\ln                 |\n| ~;f~     | \\phi                   |\n| ~;;f~    | \\varphi                   |\n| ~;F~     | \\Phi                   |\n| ~;g~     | \\gamma                   |\n| ~;;;g~   | \\lg                 |\n| ~;G~     | \\Gamma                   |\n| ~;;;G~   | 10^{?}                 |\n| ~;h~     | \\eta                   |\n| ~;;h~    | \\hbar                   |\n| ~;i~     | \\in                   |\n| ~;;i~    | \\imath                   |\n| ~;I~     | \\iota                   |\n| ~;;I~    | \\Im                 |\n| ~;;j~    | \\jmath                   |\n| ~;k~     | \\kappa                   |\n| ~;l~     | \\lambda                   |\n| ~;;l~    | \\ell                   |\n| ~;;;l~   | \\log                |\n| ~;L~     | \\Lambda                   |\n| ~;m~     | \\mu                   |\n| ~;n~     | \\nu                   |\n| ~;;;n~   | \\ln                 |\n| ~;N~     | \\nabla                   |\n| ~;;;N~   | \\exp                |\n| ~;o~     | \\omega                   |\n| ~;O~     | \\Omega                   |\n| ~;;O~    | \\mho                   |\n| ~;p~     | \\pi                   |\n| ~;;p~    | \\varpi                   |\n| ~;P~     | \\Pi                   |\n| ~;q~     | \\theta                   |\n| ~;;q~    | \\vartheta                   |\n| ~;Q~     | \\Theta                   |\n| ~;r~     | \\rho                   |\n| ~;;r~    | \\varrho             |\n| ~;;R~    | \\Re                 |\n| ~;s~     | \\sigma                   |\n| ~;;s~    | \\varsigma                   |\n| ~;;;s~   | \\sin                |\n| ~;S~     | \\Sigma                   |\n| ~;;;S~   | \\arcsin             |\n| ~;t~     | \\tau                   |\n| ~;;;t~   | \\tan                |\n| ~;;;T~   | \\arctan             |\n| ~;u~     | \\upsilon                   |\n| ~;U~     | \\Upsilon                   |\n| ~;v~     | \\vee                   |\n| ~;V~     | \\Phi                   |\n| ~;w~     | \\xi                   |\n| ~;W~     | \\Xi                   |\n| ~;x~     | \\chi                   |\n| ~;y~     | \\psi                   |\n| ~;Y~     | \\Psi                   |\n| ~;z~     | \\zeta                   |\n| ~;0~     | \\emptyset                   |\n| ~;8~     | \\infty                   |\n| ~;!~     | \\neg                   |\n| ~;^~     | \\uparrow                   |\n| ~;\u0026~     | \\wedge                   |\n| ~;∽~     | \\approx                   |\n| ~;;∽~    | \\simeq                   |\n| ~;_~     | \\downarrow                   |\n| ~;+~     | \\cup                   |\n| ~;-~     | \\leftrightarrow                   |\n| ~;;+~    | \\oplus              |\n| ~;;-~    | \\longleftrightarrow |\n| ~;*~     | \\times                   |\n| ~;/~     | \\not                   |\n| ~;❘~     | \\mapsto             |\n| ~;;❘~    | \\longmapsto         |\n| ~;\\~     | \\setminus                   |\n| ~;=~     | \\Leftrightarrow                   |\n| ~;;=~    | \\Longleftrightarrow |\n| ~;(~     | \\langle                   |\n| ~;)~     | \\rangle                   |\n| ~;[~     | \\Leftarrow                   |\n| ~;;[~    | \\Longleftarrow      |\n| ~;]~     | \\Rightarrow                   |\n| ~;;]~    | \\Longrightarrow     |\n| ~;{~     | \\subset                   |\n| ~;}~     | \\supset                   |\n| ~;\u003c~     | \\leftarrow                   |\n| ~;;\u003c~    | \\longleftarrow      |\n| ~;;;\u003c~   | \\min                |\n| ~;\u003e~     | \\rightarrow                   |\n| ~;;\u003e~    | \\longrightarrow     |\n| ~;;;\u003e~   | \\max                |\n| ~;'~     | \\prime                   |\n| ~;.~     | \\cdot                   |\n\n\n\n** Annoying Subscripts\n#+begin_src emacs-lisp :exports results\n(aas--format-doc-to-org 'laas-subscript-snippets)\n#+end_src\n\n#+RESULTS:\n: Automatic subscripts! Expand In math and after a single letter.\n\n#+begin_src emacs-lisp :exports results\n(aas--format-snippet-array laas-subscript-snippets)\n#+end_src\n\n#+RESULTS:\n| ~ii~  | X_i, or X_{Yi} if a subscript was typed already |\n| ~ip1~ | _{i+1}                                       |\n| ~jj~  | X_j, or X_{Yj} if a subscript was typed already |\n| ~jp1~ | _{j+1}                                       |\n| ~nn~  | X_n, or X_{Yn} if a subscript was typed already |\n| ~np1~ | _{n+1}                                       |\n| ~kk~  | X_k, or X_{Yk} if a subscript was typed already |\n| ~kp1~ | _{k+1}                                       |\n| ~0~   | X_0, or X_{Y0} if a subscript was typed already |\n| ~1~   | X_1, or X_{Y1} if a subscript was typed already |\n| ~2~   | X_2, or X_{Y2} if a subscript was typed already |\n| ~3~   | X_3, or X_{Y3} if a subscript was typed already |\n| ~4~   | X_4, or X_{Y4} if a subscript was typed already |\n| ~5~   | X_5, or X_{Y5} if a subscript was typed already |\n| ~6~   | X_6, or X_{Y6} if a subscript was typed already |\n| ~7~   | X_7, or X_{Y7} if a subscript was typed already |\n| ~8~   | X_8, or X_{Y8} if a subscript was typed already |\n| ~9~   | X_9, or X_{Y9} if a subscript was typed already |\n\n\n** The infamous fraction\n#+begin_src emacs-lisp :exports results\n(aas--format-doc-to-org 'laas-frac-snippet)\n#+end_src\n\n#+RESULTS:\n: Frac snippet.\n: Expand to a template frac after //, or wrap the object before point if it isn~t /.\n:\n: ab/ =\u003e \\frac{ab}{}\n: // =\u003e \\frac{}{}\n\n#+begin_src emacs-lisp :exports results\n(aas--format-snippet-array laas-frac-snippet)\n#+end_src\n\n#+RESULTS:\n| ~/~ | See the docs of `laas-frac-snippet' |\n\n\n** Simpler Accents\n#+begin_src emacs-lisp :exports results\n(aas--format-doc-to-org 'laas-accent-snippets)\n#+end_src\n\n#+RESULTS:\n: A simpler way to apply accents. Expand If LaTeX symbol immidiately before point.\n\n#+begin_src emacs-lisp :exports results\n(aas--format-snippet-array laas-accent-snippets)\n#+end_src\n\n#+RESULTS:\n| ~'r~  | Wrap in \\mathrm{} or \\textrm{}     |\n| ~'i~  | Wrap in \\mathit{} or \\textit{}     |\n| ~'b~  | Wrap in \\mathbf{} or \\textbf{}     |\n| ~'e~  | Wrap in \\mathemph{} or \\textemph{} |\n| ~'y~  | Wrap in \\mathtt{} or \\texttt{}     |\n| ~'f~  | Wrap in \\mathsf{} or \\textsf{}     |\n| ~'l~  | Wrap in \\textsl                    |\n| ~'.~  | Wrap in \\dot{}                     |\n| ~':~  | Wrap in \\ddot{}                    |\n| ~'∽~  | Wrap in \\tilde{}                   |\n| ~'N~  | Wrap in \\widetilde{}               |\n| ~'^~  | Wrap in \\hat{}                     |\n| ~'H~  | Wrap in \\widehat{}                 |\n| ~'-~  | Wrap in \\bar{}                     |\n| ~'T~  | Wrap in \\overline{}                |\n| ~'_~  | Wrap in \\underline{}               |\n| ~'{~  | Wrap in \\overbrace{}               |\n| ~'}~  | Wrap in \\underbrace{}              |\n| ~'\u003e~  | Wrap in \\vec{}                     |\n| ~'/~  | Wrap in \\grave{}                   |\n| ~'\"~  | Wrap in \\acute{}                   |\n| ~'v~  | Wrap in \\check{}                   |\n| ~'u~  | Wrap in \\breve{}                   |\n| ~'m~  | Wrap in \\mbox{}                    |\n| ~'c~  | Wrap in \\mathcal{}                 |\n| ~'0~  | Wrap in {\\textstyle }              |\n| ~'1~  | Wrap in {\\displaystyle }           |\n| ~'2~  | Wrap in {\\scriptstyle }            |\n| ~'3~  | Wrap in {\\scriptscriptstyle }      |\n| ~'q~  | Wrap in \\sqrt{}                    |\n| ~..␣~ | Wrap in \\dot{}                     |\n| ~,.~  | Wrap in \\vec{}                     |\n| ~.,~  | Wrap in \\vec{}                     |\n| ~∽␣~  | Wrap in \\tilde{}                   |\n| ~hat~ | Wrap in \\hat{}                     |\n| ~bar~ | Wrap in \\overline{}                |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecosaur%2Flatex-auto-activating-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftecosaur%2Flatex-auto-activating-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecosaur%2Flatex-auto-activating-snippets/lists"}