diff --git a/extension.toml b/extension.toml index 6a18915..5e3295e 100644 --- a/extension.toml +++ b/extension.toml @@ -1,6 +1,6 @@ id = "latexnips" name = "Latex Snippets" -version = "0.1.1" +version = "0.1.2" schema_version = 1 authors = ["Phani Pavan K "] description = "Common Latex Snippets, common action from overleaf toolbar." diff --git a/snippets/latex.json b/snippets/latex.json index 8d8322d..404008c 100644 --- a/snippets/latex.json +++ b/snippets/latex.json @@ -1,8 +1,43 @@ { - "Insert Figure": { - "scope": "latex", - "prefix": "\\fig", - "body":"\\begin{figure}\n\\centering\n\includegraphics[width=1\\linewidth]{${1:fig_path}}\n\\caption{${2:caption}}\n\label{fig:${3:label}}\n\\end{figure}", + "Figure": { + "prefix": "fig", + "body":"\\begin{figure}[htp!]\n \\centering\n \\includegraphics[width=1\\linewidth]{${1:fig_path}}\n \\caption{${2:caption}}\n \\label{fig:${3:label}}\n\\end{figure}", "description": "Inserts a figure", + }, + + "Itemize": { + "prefix": "itz", + "body":"\\begin{itemize}\n \\item ${1:item}\n\\end{itemize}", + "description": "Adds unordered itemize list" + }, + "Enumerate": { + "prefix": "enu", + "body":"\\begin{enumerate}\n \\item ${1:item}\n\\end{enumerate}", + "description": "Adds ordered enumerate list" + }, + "Item": { + "prefix": "ite", + "body": "\\item ${1:item}", + "description": "Adds an item" + }, + "Section": { + "prefix": "sec", + "body": "\\section{${1:section}}", + "description": "Adds the section command" + }, + "Sub-Section": { + "prefix": "ssc", + "body": "\\subsection{${1:section}}", + "description": "Adds the subsection command" + }, + "Sub-Sub-Section": { + "prefix": "sss", + "body": "\\subsubsection{${1:section}}", + "description": "Adds the subsubsection command" + }, + "Table": { + "prefix": "tab", + "body": "\\begin{table}[htb!]\n \\begin{center}\n \\caption{${1:caption}}\n \\label{tab:${2:label}}\n \\resizebox{1\\linewidth}{!}{\n \\begin{tabular}{${3:columns}}\n ${4:data}\n \\end{tabular}}\n \\end{center}\n\\end{table}", + "description": "Adds table template" } }