diff --git a/.gitignore b/.gitignore index 818934c..a4ad97d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ main.pdf *.iml .sublime-project .sublime-workspace -.vscode ## MS Office Temp Files ~$*.ppt* diff --git a/.vscode/bibtex.code-snippets b/.vscode/bibtex.code-snippets new file mode 100644 index 0000000..050f42a --- /dev/null +++ b/.vscode/bibtex.code-snippets @@ -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" + ] + } +} \ No newline at end of file diff --git a/.vscode/latex.code-snippets b/.vscode/latex.code-snippets new file mode 100644 index 0000000..32dba15 --- /dev/null +++ b/.vscode/latex.code-snippets @@ -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}}" + }, +} \ No newline at end of file diff --git a/README.md b/README.md index e59a4eb..114b954 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,23 @@ It's based on the `scrbook` document class and currently layed out for german sc -- [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) @@ -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).