Merge branch '22-move-vs-code-snippets-from-gitlab-snippets-to-vs-code-workspace-directory' into 'master'
Resolve "Move VS Code Snippets from GitLab Snippets to VS Code Workspace Directory" Closes #22 See merge request fastexitlane/latex-boilerplate!9
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -11,7 +11,6 @@ main.pdf | ||||
| *.iml | ||||
| .sublime-project | ||||
| .sublime-workspace | ||||
| .vscode | ||||
|  | ||||
| ## MS Office Temp Files | ||||
| ~$*.ppt* | ||||
|   | ||||
							
								
								
									
										87
									
								
								.vscode/bibtex.code-snippets
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								.vscode/bibtex.code-snippets
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| { | ||||
| 	"book": { | ||||
|         "scope": "bibtex", | ||||
| 		"prefix": "@Book", | ||||
| 		"body": [ | ||||
| 			"@Book{${1:citekey},", | ||||
| 			"    title      = {$2},", | ||||
| 			"    subtitle   = {$3},", | ||||
| 			"    year       = {$4},", | ||||
| 			"    author     = {$5},", | ||||
| 			"    publisher  = {$6},", | ||||
| 			"    location   = {$7},", | ||||
| 			"    file       = {:${8:filename}:${9:mimetype}},", | ||||
| 			"}$0" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"article": { | ||||
|         "scope": "bibtex", | ||||
| 		"prefix": "@Article", | ||||
| 		"body": [ | ||||
| 			"@Article{${1:citekey},", | ||||
| 			"    title      = {$2},", | ||||
| 			"    subtitle   = {$3},", | ||||
| 			"    year       = {$4},", | ||||
| 			"    author     = {$5},", | ||||
| 			"    journal    = {$6},", | ||||
| 			"    volume     = {$7},", | ||||
| 			"    number     = {$8},", | ||||
| 			"    pages      = {$9},", | ||||
| 			"    file       = {:${10:filename}:${11:mimetype}},", | ||||
| 			"}$0" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"online": { | ||||
|         "scope": "bibtex", | ||||
| 		"prefix": "@Online", | ||||
| 		"body": [ | ||||
| 			"@Online{${1:citekey},", | ||||
| 			"    title      = {$2},", | ||||
| 			"    subtitle   = {$3},", | ||||
| 			"    year       = {$4},", | ||||
| 			"    author     = {$5},", | ||||
| 			"    url        = {$6},", | ||||
| 			"    urldate    = {$7},", | ||||
| 			"    file       = {:${8:filename}:${9:mimetype}},", | ||||
| 			"}$0" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"collection": { | ||||
|         "scope": "bibtex", | ||||
| 		"prefix": "@Collection", | ||||
| 		"body": [ | ||||
| 			"@Collection{${1:citekey},", | ||||
| 			"    title      = {$2},", | ||||
| 			"    subtitle   = {$3},", | ||||
| 			"    year       = {$4},", | ||||
| 			"    editor     = {$5},", | ||||
| 			"    location   = {$6},", | ||||
| 			"    file       = {:${7:filename}:${8:mimetype}},", | ||||
| 			"}$0"			    | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"in collection": { | ||||
|         "scope": "bibtex", | ||||
| 		"prefix": "@InCollection", | ||||
| 		"body": [ | ||||
| 			"@InCollection{${1:citekey},", | ||||
| 			"    title        = {$2},", | ||||
| 			"    year         = {$3},", | ||||
| 			"    author       = {$4},", | ||||
| 			"    chapter      = {$5},", | ||||
| 			"    pages        = {$6},", | ||||
| 			"    booktitle    = {$7},", | ||||
| 			"    booksubtitle = {$8},", | ||||
| 			"    editor       = {$9},", | ||||
| 			"    publisher    = {$10},", | ||||
| 			"    editor       = {$11}", | ||||
| 			"    location     = {$12},", | ||||
| 			"    file         = {:${13:filename}:${14:mimetype}},", | ||||
| 			"}$0" | ||||
| 		] | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										94
									
								
								.vscode/latex.code-snippets
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								.vscode/latex.code-snippets
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| { | ||||
|     "Figure": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "fig", | ||||
| 		"body": [ | ||||
| 			"\\begin{figure}[h]", | ||||
| 			"    \\centering", | ||||
| 			"    \\fbox{\\includegraphics[width=1\\textwidth]{resources/$1}}", | ||||
| 			"    \\caption{$2}", | ||||
| 			"    \\label{fig:$3}", | ||||
| 			"    \\source{$4}", | ||||
| 			"\\end{figure}" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"Code Listing": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "lst", | ||||
| 		"body": [ | ||||
| 			"\\begin{code}", | ||||
| 			"    \\inputminted{${1:language}}{resources/${2:source file}}", | ||||
| 			"    \\label{lst:$3}", | ||||
| 			"    \\captionof{listing}{$4}", | ||||
| 			"    \\source{$5}", | ||||
| 			"\\end{code}" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"Table": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "tab", | ||||
| 		"body": [ | ||||
| 			"\\begin{table}[h]", | ||||
| 			"    \\centering", | ||||
| 			"    \\begin{tabularx}{\\textwidth}{$1}", | ||||
| 			"        $5", | ||||
| 			"    \\end{tabularx}", | ||||
| 			"    \\caption{$2}", | ||||
| 			"    \\label{tab:$3}", | ||||
| 			"    \\source{$4}", | ||||
| 			"\\end{table}" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"online im Internet": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "oii", | ||||
| 		"body": "online im Internet" | ||||
| 	}, | ||||
|  | ||||
| 	"bold": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "bf", | ||||
| 		"body": "\\textbf{$1}$0" | ||||
| 	}, | ||||
|  | ||||
| 	"italic": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "it", | ||||
| 		"body": "\\textit{$1}$0" | ||||
| 	}, | ||||
|  | ||||
| 	"enquote": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "enq", | ||||
| 		"body": "\\enquote{$1}$0" | ||||
| 	}, | ||||
|  | ||||
| 	"item": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "item", | ||||
| 		"body": [ | ||||
| 			"\\begin{compactitem}", | ||||
| 			"    \\item $1", | ||||
| 			"\\end{compactitem}" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"enum": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "enum", | ||||
| 		"body": [ | ||||
| 			"\\begin{compactenum}", | ||||
| 			"    \\item $1", | ||||
| 			"\\end{compactenum}" | ||||
| 		] | ||||
| 	}, | ||||
|  | ||||
| 	"autocite": { | ||||
|         "scope": "latex", | ||||
| 		"prefix": "ac", | ||||
| 		"body": "\\autocite[vgl.][${2:page}]{${1:bibentry}}" | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										42
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								README.md
									
									
									
									
									
								
							| @@ -5,23 +5,23 @@ It's based on the `scrbook` document class and currently layed out for german sc | ||||
|  | ||||
| <!-- TOC --> | ||||
|  | ||||
| - [Getting Started](#getting-started) | ||||
| - [Basic Structure](#basic-structure) | ||||
| - [Inserting basic content](#inserting-basic-content) | ||||
| - [Bibliography](#bibliography) | ||||
| - [Layout and further configuration](#layout-and-further-configuration) | ||||
| - [Document Outline](#document-outline) | ||||
| - [Continuous Integration using GitLab CI](#continuous-integration-using-gitlab-ci) | ||||
|     - [Basic Requirements](#basic-requirements) | ||||
|     - [Spellchecking](#spellchecking) | ||||
|     - [Building the PDF](#building-the-pdf) | ||||
| - [Some special effects...](#some-special-effects) | ||||
|     - [Lists](#lists) | ||||
|     - [Images](#images) | ||||
|     - [Acronyms](#acronyms) | ||||
|     - [Code Listings](#code-listings) | ||||
|     - [Paragraph Distances and Onehalf Spacing](#paragraph-distances-and-onehalf-spacing) | ||||
| - [Snippets for working in VS Code](#snippets-for-working-in-vs-code) | ||||
| * [Getting Started](#getting-started) | ||||
| * [Basic Structure](#basic-structure) | ||||
| * [Inserting basic content](#inserting-basic-content) | ||||
| * [Bibliography](#bibliography) | ||||
| * [Layout and further configuration](#layout-and-further-configuration) | ||||
| * [Document Outline](#document-outline) | ||||
| * [Continuous Integration using GitLab CI](#continuous-integration-using-gitlab-ci) | ||||
|   * [Basic Requirements](#basic-requirements) | ||||
|   * [Spellchecking](#spellchecking) | ||||
|   * [Building the PDF](#building-the-pdf) | ||||
| * [Some special effects...](#some-special-effects) | ||||
|   * [Lists](#lists) | ||||
|   * [Images](#images) | ||||
|   * [Acronyms](#acronyms) | ||||
|   * [Code Listings](#code-listings) | ||||
|   * [Paragraph Distances and Onehalf Spacing](#paragraph-distances-and-onehalf-spacing) | ||||
| * [Snippets for working in VS Code](#snippets-for-working-in-vs-code) | ||||
|  | ||||
| <!-- /TOC --> | ||||
|  | ||||
| @@ -251,6 +251,10 @@ For that reason you may wrap such environments (e.g. lists, images, tables, para | ||||
| ``` | ||||
|  | ||||
| ## Snippets for working in VS Code | ||||
| I compiled a few useful editor snippets to work with this boilerplate in VS Code. | ||||
| I compiled the abovementioned "conventions" from this boilerplate to a set of snippets for Visual Studio Code to faciliate the use of this boilerplate within that editor. | ||||
| There are snippets available for both LaTex documents and BibTex library files. | ||||
| As they're bundled in this repo (`.vscode/*.code-snippets`), you should be able to use them right away. | ||||
|  | ||||
| See [VS Code: LaTex-Snippets](https://gitlab.com/snippets/1729310) for more. | ||||
| **(!)** Please note: | ||||
| * Repo-level snippets are [only supported starting with VS Code 1.28 (September 2018)](https://code.visualstudio.com/updates/v1_28#_project-level-snippets). | ||||
| * Editing LaTex projects in VS Code requires the [LaTex Workshop Extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop). | ||||
|   | ||||
		Reference in New Issue
	
	Block a user