mirror of
https://github.com/tiyn/wiki.git
synced 2026-09-13 10:31:36 +02:00
LTeX: Added LTeX+
This commit is contained in:
31
wiki/ltex.md
31
wiki/ltex.md
@@ -1,18 +1,23 @@
|
|||||||
# LTeX
|
# LTeX
|
||||||
|
|
||||||
[LTeX](https://valentjn.github.io/ltex/index.html) is an offline grammar checking tool that can use
|
[LTeX](https://valentjn.github.io/ltex/index.html) is an offline grammar and spell checking tool
|
||||||
the Language Server Protocol – short LSP.
|
using the Language Server Protocol – short LSP.
|
||||||
It is supports various [Markup languages](/wiki/markup_language.md) like
|
It supports various [markup languages](/wiki/markup_language.md) like
|
||||||
[LaTeX](/wiki/markup_language.md#latex) and Markdown.
|
[LaTeX](/wiki/markup_language.md#latex) and Markdown.
|
||||||
|
|
||||||
|
[LTeX+](https://github.com/ltex-plus/ltex-ls-plus) is an actively maintained fork and successor of
|
||||||
|
the original LTeX language server and is recommended for new setups.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
LTeX can be installed on various editors and officially supports VS Code, Vim and Neovim.
|
LTeX can be integrated into various editors including VS Code, Vim and Neovim.
|
||||||
For Neovim the completion tool `coc` is recommended, but Neovims own lspconfig can be used aswell.
|
|
||||||
|
For new setups it is recommended to use the LTeX+ language server `ltex-ls-plus`.
|
||||||
|
The original LTeX can still be used for existing setups.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This section addresses the usage of LTeX.
|
This section addresses the usage of LTeX and LTeX+.
|
||||||
|
|
||||||
### Switching Languages Inside a File
|
### Switching Languages Inside a File
|
||||||
|
|
||||||
@@ -24,7 +29,7 @@ It can however be changed using magic comments as explained in
|
|||||||
|
|
||||||
At the start of a file the following lines – called YAML front matter – can be used to change the
|
At the start of a file the following lines – called YAML front matter – can be used to change the
|
||||||
language for the whole file.
|
language for the whole file.
|
||||||
In the following it is changed to german (`de-DE`) but this can be changed.
|
In the following it is changed to German (`de-DE`) but this can be changed.
|
||||||
|
|
||||||
```md
|
```md
|
||||||
---
|
---
|
||||||
@@ -50,9 +55,9 @@ onwards.
|
|||||||
|
|
||||||
However this can be difficult when only using a few words.
|
However this can be difficult when only using a few words.
|
||||||
Another easy and generally recommended way to change the language inside
|
Another easy and generally recommended way to change the language inside
|
||||||
[LaTeX](/wiki/markup_language.md#latex) documents is using the babel package.
|
[LaTeX](/wiki/markup_language.md#latex) documents is using the `babel` package.
|
||||||
In the following examples `<language>` is the language indicator that babel uses (for example
|
In the following examples `<language>` is the language indicator that `babel` uses (for example
|
||||||
`english`, `american`, `ngerman`).
|
`english`, `american` or `ngerman`).
|
||||||
|
|
||||||
At the start of the document the language can be changed for the rest of the file using the
|
At the start of the document the language can be changed for the rest of the file using the
|
||||||
following command.
|
following command.
|
||||||
@@ -67,14 +72,14 @@ Additionally, the following command can be used to change the language from that
|
|||||||
\selectlanguage{<language>}
|
\selectlanguage{<language>}
|
||||||
```
|
```
|
||||||
|
|
||||||
Using the following command the language can be changed just for the text that is subsituted for
|
Using the following command the language can be changed just for the text that is substituted for
|
||||||
`<text>`.
|
`<text>`.
|
||||||
|
|
||||||
```
|
```tex
|
||||||
\foreignlanguage{<language>}{<text>}
|
\foreignlanguage{<language>}{<text>}
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, an otherlanguage environment can be used to achieve the same as shown in the following
|
Finally, an `otherlanguage` environment can be used to achieve the same as shown in the following
|
||||||
example.
|
example.
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
# Markup Language
|
# Markup Language
|
||||||
|
|
||||||
A markup Language is way to encode text so that it has great amounts of structure and formatting.
|
A markup language is a way to encode text with additional structure and formatting.
|
||||||
The most common markup languages are [HTML](#html), Markdown, [LaTeX](#latex) and [XML](#xml).
|
The most common markup languages are [HTML](#html), Markdown, [LaTeX](#latex) and [XML](#xml).
|
||||||
Markup languages can be used for [note-taking](/wiki/note-taking.md).
|
Markup languages can be used for [note-taking](/wiki/note-taking.md).
|
||||||
Adding to normal markdown files, there are also `.mdx` files which allows the usage of JavaScripts
|
In addition to normal Markdown files, `.mdx` files allow the usage of JavaScript JSX inside Markdown
|
||||||
JSX in the markdown content for displaying charts and more.
|
content.
|
||||||
|
|
||||||
## Grammar Checking
|
## Grammar Checking
|
||||||
|
|
||||||
An often used grammar and spell checking tool that supports many markup languages is
|
An often used grammar and spell checking tool supporting many markup languages is
|
||||||
[LTeX](/wiki/ltex.md).
|
[LTeX](/wiki/ltex.md).
|
||||||
|
For new setups its actively maintained successor [LTeX+](/wiki/ltex.md) is recommended.
|
||||||
|
|
||||||
## Different languages
|
## Different languages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user