TransWikia.com

What's the VS Code LaTeX-Workshop recipe and tools for the Tufte book class?

TeX - LaTeX Asked on July 21, 2021

Issue

I’d like to really understand how to use the recipes and tools function for the LaTeX-Workshop extension for LaTeX in VS Code. I’ve read the documentation, but I can’t quite figure out how to get it running for the tufte-book class.

As an additional layer of an issue, when I run the recommended commands for the tufte-book documentation, I get a pile of errors and the pdf doesn’t compile.

Errors

For the following MWE I named Test.tex

documentclass{tufte-book}
title{Test}
author{kapple}
date{}
begin{document}
maketitle
This should work, right?
end{document}

building with the built-in recipe pdflatex ➞ bibtex ➞ pdflatex ×2 I get the errors (warnings):

  1. shell escape is disabled, so I can only detect ifwindows.
  2. You have used nobibliography*
  3. File Test.out has changed.

When compiling the provided sample-book.tex with the same built-in recipe, I get error 1 above, while also:

  1. A tonne of Marginpar on page # moved.
  2. h float specifier changed to ht.
  3. There were undefined citations.
  4. The file sample-book.out has changed.
  5. Label(s) may have changed. Rerun to get cross-references right.
  6. Citation blah on page # undefined.
  7. Reference blah on page # undefined.
  8. And a bunch of under/overfull hboxes.

Even running the document-specified recipe in the terminal, I get a bunch of errors. Should a sample file be that hard to get running?

Fix Attempt

I’ve added the following section to settings.json

"latex-workshop.latex.tools": [
    {
        "name": "latexmk",
        "command": "latexmk",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "-outdir=%OUTDIR%",
            "%DOC%"
        ],
        "env": {}
    },
    {
        "name": "pdflatex",
        "command": "pdflatex",
        "args": [
            "-shell-escape",
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%"
        ],
        "env": {}
    },
    {
        "name": "bibtex",
        "command": "bibtex",
        "args": [
            "%DOCFILE%"
        ],
        "env": {}
    }
],

and compiling my MWE Test.tex with pdflatex ➞ bibtex ➞ pdflatex ×2 results in a pdf produced with errors #2 and #3.

Compiling sample-book.tex with pdflatex ➞ bibtex ➞ pdflatex ×2 results in no pdf produced, error #1 is gone but errors #4 through #11 remain.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP