Closed thawk closed 4 years ago
wsdjeg
Expected behavior, english is required
When the lang#latex layer is enabled,
tex
code block should be correctly highlighted.The reproduce ways from Vim starting (Required!)
Enable
lang#latex
layer ininit.toml
Create
test.tex
, input```tex
$\frac{1}{3} = \frac{x_1}{y_1}$
```
It should be colourful, but not.
Enable the non-existed
lang#tex
layer ininit.toml
and try again,the aboved code is highlight correctlyThe Cause
The code in
SpaceVim#layers#lang#markdown#config()
fillsg:markdown_nested_languages
with names of all enabledlang#
layers. Those names were used as code block name in thevim-markdown
and load the syntax file with same name for highlighting.Because SpaceVim has
lang#latex
layer, but what vim has issyntax/tex.vim
notsyntax/latex.vim
, so the syntax file can't be correctly loaded.Should we rename the latex layer, or let the latex layer load
syntax/tex.vim
instead?--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
The language name is tex
. The file extension which LaTeX
handles is *.tex
(Wiki). Also the syntax file provied by vim/nvim is syntax/tex.vim
.
la
is added?wsdjeg
The language name is
tex
. The file extension whichLaTeX
handles is*.tex
(Wiki). Also the syntax file provied by vim/nvim issyntax/tex.vim
.-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/SpaceVim/SpaceVim/issues/3138#issuecomment-541070113
Actually, I am not a TeX/LaTeX user. I just want to write some Tex formula in Markdown document.
I found some descriptions:
[texhax] learning tex vs latex
LaTeX is a script-like user interface to the binary TeX program, i.e., Knuth's versions up to TeX3, or extensions of the latter, most notably: e-TeX, pdfTeX, XeTeX.
Plain TeX is kind of an alternative user interface to TeX, but with a few exceptions, it is just a part of LaTeX. ... "in a silent way", however: plain TeX code is present in the LaTeX source latex.ltx, but usual LaTeX documentation doesn't mention it. Plain TeX and LaTeX are called "formats".
When you are writing `tex', it is not quite clear whether you are referring to the binary or to the format Plain TeX. This confusion seems to lurk in other postings.
What is the difference between TeX and LaTeX?
TeX is both a program (which does the typesetting, tex-core) and format (a set of macros that the engine uses, plain-tex). Looked at in either way, TeX gives you the basics only. If you read the source for The TeXBook, you'll see that Knuth wrote more macros to be able to typeset the book, and made a format for that.
LaTeX is a generalised set of macros to let you do many things. Most people don't want to have to program TeX, especially to set up things like sections, title pages, bibliographies and so on. LaTeX provides all of that: these are the 'macros' that it is made up of.
Thanks for your info.
Expected behavior, english is required
When the lang#latex layer is enabled,
tex
code block should be correctly highlighted.The reproduce ways from Vim starting (Required!)
Enable
lang#latex
layer ininit.toml
Create
test.tex
, inputIt should be colourful, but not.
Enable the non-existed
lang#tex
layer ininit.toml
and try again,the aboved code is highlight correctlyThe Cause
The code in
SpaceVim#layers#lang#markdown#config()
fillsg:markdown_nested_languages
with names of all enabledlang#
layers. Those names were used as code block name in thevim-markdown
and load the syntax file with same name for highlighting.Because SpaceVim has
lang#latex
layer, but what vim has issyntax/tex.vim
notsyntax/latex.vim
, so the syntax file can't be correctly loaded.Should we rename the latex layer, or let the latex layer load
syntax/tex.vim
instead?