Atom の LaTeX 用 Snippets(個人用)
パッケージ「language-latex」の Snippets は、次のサイトから取得していると思われる。
github.com自分用として、これに細かい修正を加えたかったので、「File」→「Snippets」からファイル「snippets.cson」を開いて、そこに下記の内容を追加。
################################## # My snippets for LaTeX # # Last modified time: 2017/10/06 # ################################## '.text.tex.latex': # preamble and package/class file '\\documentclass{article}...': 'prefix': 'article' 'body': '\\\\documentclass[a4paper, 12pt]{article}\n$2\n\\\\begin{document}\n\t\n\\\\end{document}' '\\documentclass{jsarticle}...': 'prefix': 'jsarticle' 'body': '\\\\documentclass[a4paper, 12pt]{jsarticle}\n$2\n\\\\begin{document}\n\t\n\\\\end{document}' '\\usepackage{}': 'prefix': 'usepackage' 'body': '\\\\usepackage{$1}' # \begin{}...\end{} '\\begin{center}...\\end{center}': 'prefix': 'center' 'body': '\\\\begin{center}\n\t${2:% text}\n\\\\end{center}' # Document level '\\chapter{}': 'prefix': 'chapter' 'body': '%---------------------------------------------------------------\n% Chapter ${1:1}\n%---------------------------------------------------------------\n\\\\chapter{${2:chapter name}}\n\\\\label{chap: ${2:chapter label}}\n\t$0' '\\section{}': 'prefix': 'section' 'body': '%-----------------------------------------------------------\n% Section ${1:1}\n%-----------------------------------------------------------\n\\\\section{${2:section name}}\n\\\\label{sec: ${2:section label}}\n\t$0' '\\subsection{}': 'prefix': 'subsection' 'body': '%-------------------------------------------------------\n% Subsection ${1:1.1}\n%-------------------------------------------------------\n\\\\subsection{${2:subsection name}}\n\\\\label{sub: ${2:subsection label}}\n\t$0' '\\subsubsection{}': 'prefix': 'subsubsection' 'body': '%---------------------------------------------------\n% Subsubsection ${1:1.1.1}\n%---------------------------------------------------\n\\\\subsubsection{${2:subsubsection name}}\n\\\\label{subs: ${2:subsubsection label}}\n\t$0' # environment '\\begin{center}...\\end{center}': 'prefix': 'center' 'body': '\\\\begin{center}\n\t${2:% text}\n\\\\end{center}' # amsmath '\\usepackage{amsmath}': 'prefix': 'amsmath' 'body': '\\\\usepackage{amsmath}' '\\begin{equation}...\\end{equation}': 'prefix': 'Equation' 'body': '\\\\begin{equation}\n\t${2:% equation}\n\\\\label{eq: ${1:ref_name}}\n\\\\end{equation}' '\\begin{equation*}...\\end{equation*}': 'prefix': 'equation' 'body': '\\\\begin{equation*}\n\t${1:% equation}\n\\\\end{equation*}' '\\begin{align}...\\end{align}': 'prefix': 'Align' 'body': '\\\\begin{align}\n\t${2:% equation}\n\\\\label{eq: ${1:ref_name}}\n\\\\end{align}' '\\begin{align*}...\\end{align*}': 'prefix': 'align' 'body': '\\\\begin{align*}\n\t${1:% equation}\n\\\\end{align*}' # amsthm '\\usepackage{amsthm}': 'prefix': 'amsthm' 'body': '% Settings: Theorem environment\n\\\\usepackage{amsthm}\n\t\\\\newtheorem{definition}{Definition}[section]\n\t\\\\newtheorem{theorem}{Theorem}[section]\n\t\\\\newtheorem{lemma}[theorem]{Lemma}\n\t\\\\newtheorem{proposition}[theorem]{Proposition}\n\t\\\\newtheorem{corollary}[theorem]{Corollary}\n\t\\\\newtheorem{remark}{Remark}[section]' '\\theoremstyle{}': 'prefix': 'theoremstyle' 'body': '\\\\theoremstyle{${1:stylename}}\t% stylename = plain, definition, remark' '\\newtheoremstyle{}': 'prefix': 'newtheoremstyle' 'body': ''' \\\\newtheoremstyle{${1:stylename}} % name of the style to be used \t{${2:spaceabove}} % measure of space to leave above the theorem. E.g.: 3pt \t{${3:spacebelow}} % measure of space to leave below the theorem. E.g.: 3pt \t{${4:bodyfont}} % name of font to use in the body of the theorem \t{${5:indent}} % measure of space to indent \t{${6:headfont}} % name of head font \t{${7:headpunctuation}} % punctuation between head and body \t{${8:headspace}} % space after theorem head; " " = normal interword space \t{${9:headspec}} % Manually specify head. ''' '\\newtheorem{}{}': 'prefix': 'newtheorem' 'body': '\\\\newtheorem{${1:name}}{${2:Printed output}}' '\\newtheorem{}{}[numberby]': 'prefix': 'newtheorem_num' 'body': '\\\\newtheorem{${1:env_name}}{${2:output_name}}[${3:numberby}]' '\\newtheorem{}[counter]{}': 'prefix': 'newtheorem_count' 'body': '\\\\newtheorem{${1:env_name}}[${2:counter}]{${3:output_name}}' '\\begin{definition}...\\end{definition}': 'prefix': 'definition' 'body': '\\\\begin{definition}\n\t${2:% text}\n\\\\label{def: ${1:ref_name}}\n\\\\end{definition}' '\\begin{theorem}...\\end{theorem}': 'prefix': 'theorem' 'body': '\\\\begin{theorem}\n\t${2:% text}\n\\\\label{thm: ${1:ref_name}}\n\\\\end{theorem}' '\\begin{lemma}...\\end{lemma}': 'prefix': 'lemma' 'body': '\\\\begin{lemma}\n\t${2:% text}\n\\\\label{lem: ${1:ref_name}}\n\\\\end{lemma}' '\\begin{proposition}...\\end{proposition}': 'prefix': 'proposition' 'body': '\\\\begin{proposition}\n\t${2:% text}\n\\\\label{prop: ${1:ref_name}}\n\\\\end{proposition}' '\\begin{corollary}...\\end{corollary}': 'prefix': 'corollary' 'body': '\\\\begin{corollary}\n\t${2:% text}\n\\\\label{cor: ${1:ref_name}}\n\\\\end{corollary}' '\\begin{remark}...\\end{remark}': 'prefix': 'remark' 'body': '\\\\begin{remark}\n\t${2:% text}\n\\\\label{rem: ${1:ref_name}}\n\\\\end{remark}' '\\begin{problem}...\\end{problem}': 'prefix': 'problem' 'body': '\\\\begin{problem}\n\t${2:% text}\n\\\\label{prob: ${1:ref_name}}\n\\\\end{problem}' '\\begin{example}...\\end{example}': 'prefix': 'example' 'body': '\\\\begin{example}\n\t${2:% text}\n\\\\label{e.g.: ${1:ref_name}}\n\\\\end{example}' '\\begin{proof}...\\end{proof}': 'prefix': 'proof' 'body': '\\\\begin{proof}\n\t$1\n\\\\end{proof}' # math environment '.text.tex.latex .string.other.math': # fractions '\\frac': 'prefix': 'frac' 'body': '\\\\frac{$1}{$2} $0' 'd/dx': 'prefix': 'differential operator' 'body': '\\\\frac{d$2}{d${1:x}$2} $0' 'd/dx: partial': 'prefix': 'partially differential operator' 'body': '\\\\frac{\\\\partial$2}{\\\\partial ${1:x}$2} $0' # variable-sized symbols '\\sum': 'prefix': 'sum' 'body': '\\\\sum_{$1}^{$2} $0' '\\prod': 'prefix': 'product' 'body': '\\\\prod_{$1}^{$2} $0' '\\bigcap': 'prefix': 'bigcap' 'body': '\\\\bigcap_{$1}^{$2} $0' '\\bigcup': 'prefix': 'bigcup' 'body': '\\\\bigcup_{$1}^{$2} $0' '\\int': 'prefix': 'int' 'body': '\\\\int_{$1}^{$2} ${4:f(x)} \\\\, d${3:x} $0' # log-like Symbols '\\det()': 'prefix': 'det' 'body': '\\\\det \\\\left ( $1 \\\\right ) $0' '\\exp()': 'prefix': 'exp' 'body': '\\\\exp \\\\left ( $1 \\\\right ) $0' '\\lim': 'prefix': 'lim' 'body': '\\\\lim_{$1} $0' '\\liminf_{}': 'prefix': 'liminf' 'body': '\\\\liminf_{$1} $0' '\\limsup_{}': 'prefix': 'limsup' 'body': '\\\\limsup_{$1} $0' '\\max': 'prefix': 'max' 'body': '\\\\max_{$1} $0' '\\min': 'prefix': 'min' 'body': '\\\\min_{$1} $0' # brackets '\\left \\right': 'prefix': 'LeftRight' 'body': '\\\\left ${1:<} $3 \\\\right ${2:>} $0' '()': 'prefix': 'brackets.soft' 'body': '\\\\left ( $1 \\\\right ) $0' '{}': 'prefix': 'brackets.curly' 'body': '\\\\left \\\\{ $1 \\\\right \\\\} $0' '[]': 'prefix': 'brackets.hard' 'body': '\\\\left [ $1 \\\\right ] $0' '<>': 'prefix': 'brackets' 'body': '\\\\left < $1 \\\\right > $0' 'angular <>': 'prefix': 'brackets.angular' 'body': '\\\\left \\\\langle $1 \\\\right \\\\rangle $0' '| |': 'prefix': 'absolute value' 'body': '\\\\left | $1 \\\\right | $0' '|| ||': 'prefix': 'norm' 'body': '\\\\left \\\\| $1 \\\\right \\\\| $0' '||...||_{}': 'prefix': 'Norm' 'body': '\\\\left \\\\| $2 \\\\right \\\\|_{$1} $0' # other '\\begin{matrix}...\\end{matrix}': 'prefix': 'matrix' 'body': '\\\\begin{${1:p/b/v/V/B}matrix}\n\t$2\n\\\\end{${1:p/b/v/V/B}matrix}$0' '\\begin{matrix}...\\end{matrix}': 'prefix': 'SmallMatrix' 'body': '\\\\begin{smallmatrix} $1 \\\\end{smallmatrix} $0'