Comments (9)
I have just noticed that a .cwl
file for the package tkz-euclide
exists in texstudio https://github.com/texstudio-org/texstudio/blob/master/completion/tkz-euclide.cwl. What about adding the file to https://github.com/James-Yu/LaTeX-Workshop/blob/master/dev/cwl.list?
from latex-workshop.
The macros listed in the first sreenshot as token_case_catcode
are provided by expl3
. Did you set the language type to LaTeX3-expl
? Please post the logs of the extension.
The package tkz-euclide
has not .cwl
files (see https://github.com/LaTeXing/LaTeX-cwl) and hence the extension has no knowledge of the macros it provides. The extension does not parse tikzpicture
environments to discover newly used macros because their content is way too much sophisticated for standard LaTeX parsers.
from latex-workshop.
So, we need a .cwl
for tkz-euclide
?
token_case_catcode
do not appear in the above minicase but in my actual working file.
It's showing that the language type is latex but not latex-expl:
Outputs here:
LaTeX Workshop Output*
[21:13:46.226][Extension] Initializing LaTeX Workshop.
[21:13:47.712][Build][Recipe] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[21:13:48.418][Server] Creating LaTeX Workshop http and websocket server.
[21:13:49.133][Format][Bib] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]}
[21:13:49.406][Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":54334} .
[21:13:49.412][Extension] Extension root: c:\Users\Surface\.vscode\extensions\james-yu.latex-workshop-9.19.1
[21:13:49.413][Extension] $PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\texlive\2024\bin\windows;C:\Users\Surface\AppData\Local\Microsoft\WindowsApps;
[21:13:49.413][Extension] $SHELL: undefined
[21:13:49.416][Extension] $LANG: undefined
[21:13:49.416][Extension] $LC_ALL: undefined
[21:13:49.417][Extension] process.platform: win32
[21:13:49.419][Extension] process.arch: x64
[21:13:49.420][Extension] vscode.env.appName: Visual Studio Code
[21:13:49.420][Extension] vscode.env.remoteName: undefined
[21:13:49.421][Extension] vscode.env.uiKind: 1
[21:13:49.431][Config] latex-workshop.latex.recipes: [{"name":"xetex","tools":["xetex"]},{"name":"latexmk 🔃","tools":["latexmk"]},{"name":"latexmk (latexmkrc)","tools":["latexmk_rconly"]},{"name":"latexmk (lualatex)","tools":["lualatexmk"]},{"name":"latexmk (xelatex)","tools":["xelatexmk"]},{"name":"pdflatex ➞ bibtex ➞ pdflatex × 2","tools":["pdflatex","bibtex","pdflatex","pdflatex"]},{"name":"Compile Rnw files","tools":["rnw2tex","latexmk"]},{"name":"Compile Jnw files","tools":["jnw2tex","latexmk"]},{"name":"tectonic","tools":["tectonic"]}] .
[21:13:49.442][Config] latex-workshop.latex.tools: [{"name":"xetex","command":"xetex","args":["--synctex=-1","--interaction=nonstopmode"],"env":{}},{"name":"latexmk","command":"latexmk","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=%OUTDIR%","%DOC%"],"env":{}},{"name":"lualatexmk","command":"latexmk","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","-lualatex","-outdir=%OUTDIR%","%DOC%"],"env":{}},{"name":"xelatexmk","command":"latexmk","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","-xelatex","-outdir=%OUTDIR%","%DOC%"],"env":{}},{"name":"latexmk_rconly","command":"latexmk","args":["%DOC%"],"env":{}},{"name":"pdflatex","command":"pdflatex","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"],"env":{}},{"name":"bibtex","command":"bibtex","args":["%DOCFILE%"],"env":{}},{"name":"rnw2tex","command":"Rscript","args":["-e","knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')"],"env":{}},{"name":"jnw2tex","command":"julia","args":["-e","using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")"],"env":{}},{"name":"jnw2texmintex","command":"julia","args":["-e","using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")"],"env":{}},{"name":"tectonic","command":"tectonic","args":["--synctex","--keep-logs","%DOC%.tex"],"env":{}}] .
[21:13:49.500][Config] latex-workshop.latex.autoBuild.run: "never" .
[21:13:49.517][Config] latex-workshop.view.pdf.viewer: "customEditor" .
[21:13:49.756][Extension] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[21:13:49.761][Root] Current workspace folders: undefined
[21:13:49.763][Extension] LaTeX Workshop initialized.
[21:13:49.764][Root] Found root file from active editor: c:\Users\Surface\Documents\TeX Files\****.tex
[21:13:49.765][Root] Root file changed: from c:\Users\Surface\Documents\TeX Files\****.tex to c:\Users\Surface\Documents\TeX Files\****.tex, langID latex . Refresh dependencies
[21:13:49.765][Event] ROOT_FILE_CHANGED: "c:\\Users\\Surface\\Documents\\TeX Files\\****.tex"
[21:13:49.766][Cacher][Watcher] Reset.
[21:13:49.766][Cacher][Watcher] Reset.
[21:13:49.770][Cacher] Adding c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:49.772][Cacher][Watcher] Watched c:\Users\Surface\Documents\TeX Files\****.tex with a new .* watcher on c:\Users\Surface\Documents\TeX Files\每周作业 .
[21:13:49.772][Event] FILE_WATCHED: "c:\\Users\\Surface\\Documents\\TeX Files\\****.tex"
[21:13:49.779][Cacher] Caching c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:49.780][Cacher] Updated inputs of c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:49.780][Cacher] Parse LaTeX AST: c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:49.780][Event] ROOT_FILE_SEARCHED
[21:13:49.822][Server] valdOrigin is http://127.0.0.1:54334
[21:13:50.255][Cacher] Parsed LaTeX AST: c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:50.257][File] Calling kpsewhich to resolve ctexart.cls .
[21:13:52.088][File] kpsewhich returned with 'c:/texlive/2024/texmf-dist/tex/latex/ctex/ctexart.cls'.
[21:13:52.101][Cacher] Updated elements in 1844.80 ms: c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:52.102][Event] FILE_PARSED: "c:\\Users\\Surface\\Documents\\TeX Files\\****.tex"
[21:13:52.111][Structure] Structure force updated with 0 root sections for c:\Users\Surface\Documents\TeX Files\****.tex .
[21:13:52.112][Event] STRUCTURE_UPDATED
[21:13:53.997][Event] STRUCTURE_UPDATED
Developer Tools Console
workbench.desktop.main.js:sourcemap:651 INFO Initial editor state Object
workbench.desktop.main.js:sourcemap:651 INFO Started local extension host with pid 12160.
workbench.desktop.main.js:sourcemap:1871 Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/TeX.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1871
workbench.desktop.main.js:sourcemap:1871 Overwriting grammar scope name to file mapping for scope text.tex.latex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/LaTeX.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1871
workbench.desktop.main.js:sourcemap:1871 Overwriting grammar scope name to file mapping for scope text.bibtex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/Bibtex.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1871
workbench.desktop.main.js:sourcemap:1871 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/markdown-latex-combined.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1871
workbench.desktop.main.js:sourcemap:1871 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/cpp-grammar-bailout.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1871
TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/TeX.tmLanguage.json
register @ TMScopeRegistry.ts:46
TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.latex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/LaTeX.tmLanguage.json
register @ TMScopeRegistry.ts:46
TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.bibtex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/Bibtex.tmLanguage.json
register @ TMScopeRegistry.ts:46
TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/markdown-latex-combined.tmLanguage.json
register @ TMScopeRegistry.ts:46
TMScopeRegistry.ts:46 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.
New grammar file: file:///c%3A/Users/Surface/.vscode/extensions/james-yu.latex-workshop-9.19.1/syntax/cpp-grammar-bailout.tmLanguage.json
register @ TMScopeRegistry.ts:46
workbench.desktop.main.js:sourcemap:651 INFO [perf] Render performance baseline is 282ms
from latex-workshop.
I find \documentclass{ctexart}
will cause \tk
hint token_case_catcode
from latex-workshop.
I find
\documentclass{ctexart}
will cause\tk
hinttoken_case_catcode
You can set latex-workshop.kpsewhich.enabled
to false
to disable ctexart
introspection.
@James-Yu This setting also governs the path resolution of bib files. Maybe, we should use two separate settings.
from latex-workshop.
Can we have an new option to parse tikzpicture
environments?
from latex-workshop.
Can we have an new option to parse
tikzpicture
environments?
Unfortunately no. Tikz
code is far too complex to be properly parsed by a non native LaTeX parser. The best solution would be to create a .cwl
file for tkz-euclide
. It takes time but it is not that difficult to write.
from latex-workshop.
Thank you for fixing.
Just a question, why not add all cwl files in https://github.com/texstudio-org/texstudio/tree/master/completion at one stroke?
from latex-workshop.
Just a question, why not add all cwl files in https://github.com/texstudio-org/texstudio/tree/master/completion at one stroke?
Because all the cwl files would definitely weigh too much on the extension size.
from latex-workshop.
Related Issues (20)
- Extension doesn't automatically itemize marked lines of items HOT 1
- The new version(9.20.02024) cannot jump from pdf to .tex
- Autoclean runs between recipe tools HOT 2
- Cannot copy text from pdf viewer after updating and restarting any extension HOT 1
- Ctrl+click command on the pdf viewer not working with the most recent update of Windows 11 HOT 1
- Default icon for LaTeX-Expl3 HOT 1
- unable to generate pdf HOT 1
- IntelliSense doesn't work when a tex file is read by include command HOT 3
- Broken intellisense test HOT 2
- Prevent file deletions error or not. HOT 2
- missing commands for completion of package tkz-euclide HOT 2
- Intellisense autocompletion for derivative package HOT 6
- LaTeX workshop extension "remembers" wrong capitalization of file on case-insensitive file systems HOT 1
- Support for label/ref commands provided by zref HOT 7
- "@ suggestions" is not compatible with Overleaf-Workshop HOT 3
- [Bug] Failed to format tex file via LatexWorkshop when use self-make _latexindent_ yaml settings HOT 5
- PDF viewer not refreshed when it's modified directly. HOT 1
- reverse synctex not working HOT 2
- Allow customisation for the regex to decide if a completion should be triggered. HOT 1
- missing auto completion of commands with () as arguments HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex-workshop.