Using Tectonic with VS Code #896
-
I have been using Tectonic from terminal itself, manually entering compilation commands and editing with files with gedit. But since VS Code has great extension like TexLab and LaTeX Workshop, I wanted to try it and could not get those extensions to work with Tectonic. It would be helpful if someone could share instructions for configuring one of these extensions to work with Tectonic. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 19 replies
-
EDIT: So, after taking a look at this answer I wanted to update my workflow to adhere to Creating a Base to Start Working FromYou should generate a base work environment by invoking the .
├── src
│ ├── _preamble.tex
│ ├── _postamble.tex
│ └── index.tex
└── Tectonic.toml You'll figure out the significance of the That said, here's a bare minimum [doc]
name = "example-book"
# The following bundle will be generated automatically by the "tectonic -X new" command. DO NOT change it!
bundle = "https://some-remote-url.tar"
[[output]]
# DO NOT change! The VSCode plugin mightn't work as expected if you do so.
name = "index"
type = "pdf" You can update & modify the file as per your needs by referring to the official documentations on the NOTE: It's IMPORTANT you don't change the value of Update the Contents of the Generated
|
Beta Was this translation helpful? Give feedback.
-
Here's my configuration with VS Code and LaTeX Workshop. My document structure doesn't fit the default Tectonic structure, so I'm using the
|
Beta Was this translation helpful? Give feedback.
-
NOTE: I updated my workflow to adhere to The Old Answer:Having using both TexLab & LaTex Workshop, I can confidently suggest using the later even though the former's LSP suggestions & highlight is the best! LaTex Workshop did a great job at documenting it's features, is prompt when responding to issues/queries & the plugin is VERY feature rich. You almost won't need the command-line at all if using the plugin. So, I suggest reading their documentations in case you want to work with LaTex frequently on VSCode. But regardless, I believe you need to have these properties in your "latex-workshop.latex.recipes": [
{
"name": "tectonic",
"tools": ["tectonic"]
}
],
"latex-workshop.latex.tools": [
{
"name": "tectonic",
"command": "tectonic",
"args": ["%DOC%.tex", "--outdir", "%OUTDIR%", "--synctex"],
"env": {}
}
],
"latex-workshop.latex.outDir": "build", P.S: Read more about " |
Beta Was this translation helpful? Give feedback.
-
Minor quibble: AFAIK the recommended way to write `"%DOC%.tex" is in fact "%DOC_EXT%". |
Beta Was this translation helpful? Give feedback.
EDIT: So, after taking a look at this answer I wanted to update my workflow to adhere to
tectonic
's v2 interface as well. This answer is an attempt to do so & if you would like to check out the older v1 way of doing things, see this answer (comment).Creating a Base to Start Working From
You should generate a base work environment by invoking the
tectonic -X new
command. It should create the follow directory structure:You'll figure out the significance of the
.tex
files eventually. But it's important to pay special heed to theTectonic.toml
file since this is what'll helptectonic
with the file nam…