James-Yu / LaTeX-Workshop

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

align pdf viewer to center #4298

Closed thangckt closed 2 weeks ago

thangckt commented 2 weeks 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 feature request has not been suggested in this repository.

The Missed*

Is your feature request related to a problem? Please provide a clear and concise description of what the problem is.

When setting

"latex-workshop.view.pdf.zoom": "page-actual",

the PDF viewer aligns to the left by default. I wonder if there is any setting that can center the PDF viewer by the default.

Thank you.

James-Yu commented 2 weeks ago

The pages are center-aligned no matter what zoom level is selected. If not, please share your PDF for debug.

thangckt commented 2 weeks ago

hi @James-Yu

My pdf viewer align on the left image

James-Yu commented 2 weeks ago

That's the "actual" size of your PDF. You have a scrollbar in the bottom.

thangckt commented 2 weeks ago

Is there anyway that we can display the page like this?

image

Thank.

James-Yu commented 2 weeks ago

Scroll it. There is no auto-way of doing so.

thangckt commented 2 weeks ago

@James-Yu Thank you for your information In some editors, such as Texstudio, there is an option to display pdf page with "fit to textwidth". Can you implement it in Latex-workshop?

Thank

James-Yu commented 2 weeks ago

page-width

thangckt commented 2 weeks ago

I see the page-width option, but it displays in different way with text-width

James-Yu commented 2 weeks ago

There is no such a feature. You are advised to submit a feature request to PDF.js viewer, as we primarily use this viewer to display PDF.