James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.55k stars 522 forks source link

Open wrong PDF file generated from plain tex format source file #4196

Closed SwitWu closed 6 months ago

SwitWu commented 6 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: [mac OS]
  • Visual Studio Code Version: [1.87.1 (Universal)]
  • LaTeX Workshop Version: [9.19.0]
  • TeX Distribution Version: [TeX Live 2023]

The Issue*

Please briefly describe the issue you come across.

The plugin can't open the correct PDF file for me.

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

Note: I'm using external PDF viewer skim app.

  1. Create a new folder test
  2. Create a tex file a.tex with latex format
    \documentclass{article}
    \begin{document}
    hello
    \end{document}

    Compile a.tex in the integrated terminal and press the View LaTeX PDF file button in the upper right corner, then a.pdf can be opened as expected.

  3. Create a tex file b.tex with plain tex format
    world
    \bye
  4. Compile b.tex in the integrated terminal and press View LaTeX PDF file button, b.pdf can't be opened.
  5. Create another file c.tex with latex format and the generated PDF can be opened as expected.

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

I hope the PDF generated from plain tex format .tex file can be opened successfully.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Developer Tools Console

Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click Help -> Toggle Developer Tools -> Console.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Anything Else?

Add any other context about the problem below.

James-Yu commented 6 months ago

The extension doesn't support plain TeX document. It uses \documentclass[]{} (or latex-workshop.latex.rootFile.indicator) to determine the root file. There is no plan to support plain TeX.