Files
knowledge-base/docs/VS-Code/attachments/latex.json
Arity-T 74ebd01b5f
All checks were successful
Build MkDocs / build-and-deploy (push) Successful in 1s
VS Code latex
2025-01-20 21:40:32 +03:00

143 lines
4.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
// Place your snippets for latex here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Inclue image": {
"prefix": [
"\\fig",
"\\img"
],
"body": [
"\\begin{figure}[h!]",
" \\centering",
" \\includegraphics[width=0.${1:5}\\linewidth]{img/$2.png}",
" \\caption{$3.}",
" \\label{fig:$2}",
"\\end{figure}"
]
},
"Include listing": {
"prefix": [
"\\lst",
"\\listing"
],
"body": [
"\\begin{lstlisting}[caption={$1.}, label={lst:$2}]",
"$3",
"\\end{lstlisting}"
]
},
"Texttt": {
"prefix": "\\tt",
"body": [
"\\texttt{$1}",
]
},
"Textit": {
"prefix": "\\it",
"body": [
"\\textit{$1}",
]
},
"Textbf": {
"prefix": "\\bf",
"body": [
"\\textbf{$1}",
]
},
"Picture reference": {
"prefix": [
"рис",
"Рис"
],
"body": [
"Рис.~\\ref{fig:$1}",
]
},
"Special multiline cell for tables": {
"prefix": "\\specialcell",
"body": "\\newcommand{\\specialcell}[2][l]{\\begin{tabular}[#1]{@{}l@{}}#2\\end{tabular}}"
},
"TableX": {
// c - это просто колонка с тектом по центру, X - максимальная по ширине
"prefix": "\\tablex",
"body": [
"${1:\\usepackage{tabularx\\}}",
"\\begin{table}[h!]",
" \\centering",
" \\caption{$2.}",
" \\footnotesize",
" \\begin{tabularx}{\\textwidth}{${3:|X|X|X|}}",
" \\hline",
" \\textbf{${4:Заголовок 1}} & \\textbf{${5:Заголовок 2}} & \\textbf{${6:Заголовок 3}} \\\\\\",
" \\hline",
" Один & Два & Три \\\\\\",
" \\hline",
" \\end{tabularx}",
"\\end{table}"
]
},
"Table": {
"prefix": "\\table",
"body": [
"\\begin{table}[h!]",
" \\centering",
" \\caption{$1.}",
" \\footnotesize",
" \\begin{tabular}{${2:|c|c|c|}}",
" \\hline",
" \\textbf{${3:Заголовок 1}} & \\textbf{${4:Заголовок 2}} & \\textbf{${5:Заголовок 3}} \\\\\\",
" \\hline",
" Один & Два & Три \\\\\\",
" \\hline",
" \\end{tabular}",
"\\end{table}"
],
},
"Literature list": {
"prefix": ["\\literature", "\\bibliography"],
"body": [
"\\newpage",
"\\section*{Список литературы}",
"\\addcontentsline{toc}{section}{Список литературы}",
"",
"\\vspace{-1.5cm}",
"\\begin{thebibliography}{0}",
" \\bibitem{novikov}",
" Новиков, Ф. А. <<Дискретная математика для программистов>>. — 3-е изд. — Санкт-Петербург: Питер, 2009. — 383 с.",
" \\bibitem{vostrov}",
" Востров А. В, <<Лекции по теории графов>> URL: \\url{https://tema.spbstu.ru/tgraph_lect/}, Дата обращения: 17.09.2024",
"\\end{thebibliography}",
]
},
"change number": {
"prefix": ["\\counter", "\\addtocounter"],
"body": [
"\\addtocounter{${1:table}}{-1}",
]
},
"include pdf": {
"prefix": ["\\includepdf", "\\pdf"],
"body": [
"${1:\\usepackage{pdfpages\\}}",
"${2:\\usepackage{tikz\\}}",
"\\addtocounter{figure}{1}",
"\\includepdf[pages={1}, fitpaper, pagecommand={",
"\\thispagestyle{empty}",
" \\begin{tikzpicture}[remember picture, overlay]",
" \\node at (current page.south) [anchor=north, yshift=35pt] {\\large{${3:Рис 3. }}};",
" \\end{tikzpicture}",
"}]{${4:pdf/$5.pdf}}"
]
}
}