From cff8902b3a4430cc256118dc02b2988a92385c9a Mon Sep 17 00:00:00 2001 From: Daniel Kapla Date: Mon, 7 Jan 2019 16:33:27 +0100 Subject: [PATCH] Sync and add (own) lizence file --- LICENSE.md | 6 ++---- LIZENCE_ORIGINAL.md | 11 +++++++++++ dictionary/text_symbols.ts | 4 ++-- scripts/cleanup.sh | 21 --------------------- scripts/makeindex.sh | 20 -------------------- snippets/LaTeX.json | 15 +++------------ src/commands.ts | 1 - 7 files changed, 18 insertions(+), 60 deletions(-) create mode 100644 LIZENCE_ORIGINAL.md delete mode 100755 scripts/cleanup.sh delete mode 100755 scripts/makeindex.sh diff --git a/LICENSE.md b/LICENSE.md index 5715afc..c8a517a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) Long Nhat Nguyen +Copyright (c) 2017 Loki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -6,6 +6,4 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -This package was derived from a TextMate bundle located at https://github.com/textmate/latex.tmbundle and distributed under the following license, located in README.mdown: - -Permission to copy, use, modify, sell and distribute this software is granted. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose. \ No newline at end of file +This package was derived from a VS Marketplace Extention located at https://marketplace.visualstudio.com/items?itemName=torn4dom4n.latex-support and distributed under the following license, located in LIZENCE_ORIGINAL.md diff --git a/LIZENCE_ORIGINAL.md b/LIZENCE_ORIGINAL.md new file mode 100644 index 0000000..060fa31 --- /dev/null +++ b/LIZENCE_ORIGINAL.md @@ -0,0 +1,11 @@ +Copyright (c) Long Nhat Nguyen + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This package was derived from a TextMate bundle located at https://github.com/textmate/latex.tmbundle and distributed under the following license, located in README.mdown: + +Permission to copy, use, modify, sell and distribute this software is granted. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose. diff --git a/dictionary/text_symbols.ts b/dictionary/text_symbols.ts index d521dab..e1b940d 100644 --- a/dictionary/text_symbols.ts +++ b/dictionary/text_symbols.ts @@ -98,8 +98,8 @@ export default { "centering": { insertText: "centering", documentation: "Centers the content of figure or minipage content", kind: latex_types.keyword }, "caption": { insertText: "caption{$1}$0", documentation: "Figure description", kind: latex_types.function }, - "verb": { insertText: "verb{$1}$0", detail: "Do not use verbatim environment and the \\verb command within parameters of other commands.", documentation: "Environment content will be directly printed, as if typed on a typewriter, with all line breaks and spaces, without any LaTeX command being executed.", kind: latex_types.environment }, - "verb*": { insertText: "verb*{$1}$0", detail: "Do not use verbatim environment and the \\verb command within parameters of other commands.", documentation: "Environment content will be directly printed, as if typed on a typewriter, with all line breaks and spaces, without any LaTeX command being executed. The additional * lets spaces be printed visible.", kind: latex_types.environment }, + "verb": { insertText: "verb|$1|$0", detail: "Do not use verbatim environment and the \\verb command within parameters of other commands.", documentation: "Environment content will be directly printed, as if typed on a typewriter, with all line breaks and spaces, without any LaTeX command being executed.", kind: latex_types.environment }, + "verb*": { insertText: "verb*|$1|$0", detail: "Do not use verbatim environment and the \\verb command within parameters of other commands.", documentation: "Environment content will be directly printed, as if typed on a typewriter, with all line breaks and spaces, without any LaTeX command being executed. The additional * lets spaces be printed visible.", kind: latex_types.environment }, "ldots": { insertText: "ldots", documentation: "3 lower dots", kind: latex_types.symbol }, diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh deleted file mode 100755 index f5ad27d..0000000 --- a/scripts/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -cleanupDir=${1%/} # remove trailing / if necessary - -echo $cleanupDir - -if [ -d $cleanupDir ]; then # check if cleanupDir is a directory - cd $cleanupDir; -else - echo "Couldn't find directory to clean up" -fi -for file in $cleanupDir/*.*; do - if [ -f $file ]; then - for ending in "log" "ilg" "out" "toc" "aux" "synctex.gz" "idx" "ind"; do - if [[ $file == *.$ending ]]; then - rm "$file" - echo -e "\033[93m rm $file \033[0m" - fi - done - fi -done diff --git a/scripts/makeindex.sh b/scripts/makeindex.sh deleted file mode 100755 index 2387363..0000000 --- a/scripts/makeindex.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -FILEDIRNAME=$1 -FILE=$2 -echo "fileDirname : $FILEDIRNAME" -echo "file : $FILE" - -if [ ${FILE: -4} == ".tex" ]; then - cd "$FILEDIRNAME" - FILE=${FILE##*/} # remove directory path from filename - makeindex "${FILE%.tex}.idx" > ~/.vscode/.makeindex_log # ${FILE%.tex}.idx replaces .tex ending with .idx - if [ $? == 0 ]; then # check success status (return value) of the last command (pdflatex) - echo -e "\033[32mCreated \"${FILE%.*}.idx\" successfully.\033[0m"; - else - cat ~/.vscode/.makeindex_log - echo -e "\033[31mERROR: Make Index for \"${FILE}\" failed.\033[0m"; - fi -else - echo "$FILE is not a *.tex file." -fi diff --git a/snippets/LaTeX.json b/snippets/LaTeX.json index c5cb439..5a936a1 100644 --- a/snippets/LaTeX.json +++ b/snippets/LaTeX.json @@ -1,13 +1,4 @@ { -// "begin-end": { -// "prefix": "\\begin", -// "body": [ -// "\\begin{${1:displaymath}}", -// "\t$0", -// "\\end{$1}" -// ], -// "description": "A Begin/End Block" -// }, "environment_tikz": { "prefix": "environment_tikz", "body": [ @@ -28,9 +19,9 @@ "body": [ "\\begin{figure}[]", "\t\\centering", - "\t\\includegraphics{$1}", - "\t\\label{fig:$2}", - "\t\\caption{$0}", + "\t\\includegraphics{$1}", + "\t\\caption{$0}", + "\t\\label{fig:$2}", "\\end{figure}" ], "description": "The figure environment" diff --git a/src/commands.ts b/src/commands.ts index 28d92d5..b8197f3 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1,7 +1,6 @@ import * as vscode from 'vscode'; import * as child_process from 'child_process'; import documentclass_symbols from '../dictionary/documentclass_symbols'; -import { window, Range } from 'vscode'; /** ${workspaceFolder} - the path of the workspace folder that contains the tasks.json file