diff --git a/wiki/docker/alexta69_-_metube.md b/wiki/docker/alexta69_-_metube.md index fac021f..035526f 100644 --- a/wiki/docker/alexta69_-_metube.md +++ b/wiki/docker/alexta69_-_metube.md @@ -32,7 +32,7 @@ Set the following ports in the `ports:` section. ```sh #!/bin/sh docker-compose down -docker pull vim alexta69/metube +docker pull alexta69/metube docker-compose up -d ``` diff --git a/wiki/ltex.md b/wiki/ltex.md new file mode 100644 index 0000000..a843290 --- /dev/null +++ b/wiki/ltex.md @@ -0,0 +1,81 @@ +# LTeX + +[LTeX](https://valentjn.github.io/ltex/index.html) is an offline grammar checking tool that can use +the Language Server Protocol - short LSP. +It is supports various [Markup languages](/wiki/markup_language.md) like LaTeX and Markdown. + +## Setup + +LTeX can be installed on various editors and officially supports VS Code, Vim and Neovim. +For Neovim the completion tool `coc` is recommended, but Neovims own lspconfig can be used aswell. + +## Usage + +This section addresses the usage of LTeX. + +### Switching Languages Inside a File + +The language is normally static for all file types. +It can however be changed using magic comments as explained in +[the official documentation](https://valentjn.github.io/ltex/advanced-usage.html]. + +### Switching Languages in Markdown + +At the start of a file the following lines - called YAML front matter - can be used to change the +language for the whole file. +In the following it is changed to german (`de-DE`) but this can be changed. + +```md +--- +lang: de-DE +--- +``` + +The following magic comment can be used to change the language from the place of the comment +onwards. + +```md + +``` + +### Switching Languages in LaTeX + +The following magic comment can be used to change the language from the place of the comment +onwards. + +```tex +% LTeX: language=de-DE +``` + +However this can be difficult when only using a few words. +Another easy and generally recommended way to change the language inside LaTeX documents is using +the babel package. +In the following examples `` is the language indicator that babel uses (for example +`english`, `american`, `ngerman`). + +At the start of the document the language can be changed for the rest of the file using the +following command. + +```tex +\usepackage[]{babel} +``` + +Additionally the following command can be used to change the language from that place onwards. + +```tex +\selectlanguage{} +``` + +Using the following command the language can be changed just for the text that is subsituted for +``. + +``` +\foreignlanguage{}{} +``` + +Finally an otherlanguage environment can be used to achieve the same as shown in the following +example. + +```tex +\begin{otherlanguage}{}\end{otherlanguage} +``` diff --git a/wiki/markup_language.md b/wiki/markup_language.md index d5e8788..9424a21 100644 --- a/wiki/markup_language.md +++ b/wiki/markup_language.md @@ -3,7 +3,16 @@ A markup Language is way to encode text so that it has great amounts of structure and formatting. The most common markup languages are [HTML](#html), Markdown, LaTeX and [XML](#xml). -## HTML +## Grammar Checking + +An often used grammar and spell checking tool that supports many markup languages is +[LTeX](/wiki/ltex.md). + +## Different languages + +This section addresses various markup languages and their usages. + +### HTML HTML is a markup language that is mostly used in the internet via the hypertext system and accessed via [web browsers](/wiki/web_browser.md). @@ -13,6 +22,6 @@ An easy way to do the latter one is a validation service. One of the most used ones is the [Markup Validation Service by W3C](https://validator.w3.org/#validate_by_input). -## XML +### XML XML is a markup language often used together with [RSS Feeds](/wiki/rss.md).