texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.78k stars 344 forks source link

Previewer is hard-coded to use PdfLaTeX #302

Open numberZero opened 6 years ago

numberZero commented 6 years ago

I use XeLaTeX to compile my documents, so they contain some special code (like font selection). But internal previewer is hard-coded to use either PdfLaTeX or plain LaTeX. It works fine if I set the “PdfLaTeX” option to xelatex, though, but that makes me unable to use true PdfLaTeX for documents that require that.

Environment

septatrix commented 4 years ago

Yes I also noticed this when using LuaLaTeX with fontspec and is something which should definitely be dynamic. Possibly the cleanest solution would be to just use the program for the current document (so we obey the default program from the settings and also make it overwriteable using the magic comments).

Is this were the preview logic is implemented? https://github.com/texstudio-org/texstudio/blob/fc2c012843150aa3185a3b8df47263ce7dc4b6e4/src/buildmanager.cpp#L1788

sunderme commented 4 years ago

looks like it

e-dervieux commented 4 months ago

I do not know whether this is linked or not, but the fact that the previewing tool is different from the compilation tool might cause some strange behaviour like this one: https://tex.stackexchange.com/questions/718530/pdftex-log-file-eating-up-disk-space

Mayhap automatically changing the preview tool so that it's identical to the compilation tool would avoid this kind of problem?