texstudio
texstudio copied to clipboard
"Go to PDF" command does not work
In TeXstudio 4.7.2, on MacOS, I am trying to write a paper with a multi-part structure that uses the \subimport command
It seems to compile fine. When I do the "Build and View" command I get the correct main.pdf (currently 44 pp) in the RHS. Within that PDF, the "Go to Source" command works just fine, that is, the cursor jumps to the proper place in the proper "subfile.tex" file.
HOWEVER, when in the subfile.tex file, it will not "Go to PDF". Instead I get an error saying that it is unable to find the PDF with name /Users/ ....../subfile.pdf.
It should not be able to find that pdf, because that pdf does not exist. The relevant pdf is /Users/...../main.pdf. But, try as I might, I cannot find a way to cause TexStudio to use the correct main.pdf. At one point I tried a Magic Command suggested on the web, but it freaked out the program. Probably I did not do it correctly. I think I have removed the Magic Command, though that is also hard to tell.
FWIW, I also cannot seem to get tool tips or other previews to work.
Any guidance is much appreciated.
Can't reproduce on Win10 with current build, jumps to corresponding location in pdf from subfiles. Worked it before? If so what has been changed since then? Any changes made on options? Add some screenshots or screencast here? Where did you add the magic command (should be comment)? Normally it is placed in the documents.
Thanks for your prompt response.
Yes worked before. I went to the version saved on Backup, and can’t get it to work. I went to earlier versions of TExStudio and can’t get it to work. I think there is a change in some file that is actually stored external to TeXstudio app, but I do not know how to change those files, or to restore them.
I did not make any changes under the Options Tab so, for example, no change (under that tab) to my profile.
If it helps, I now get this message after the Build and View: Process started: pdflatex -synctex=1 -interaction=nonstopmode "0PHYSICS main”.tex. That is the correct file name, but I do not recall such a long message before.
I attempted to use this Magic Comment fix, adding
% !TeX program = pdflatex -jobname=mypdf % | txs:///view-pdf “mypdf.pdf” See https://tex.stackexchange.com/questions/703481/texstudio-does-not-show-pdf-preview
I may not have done it correctly. I think I put the above at the start of both my main.tex file and the subfile. Literally the first line, of both.
The file I want the program to find is "0Physics main.pdf”
I am not sure I have the format correct, but I tried to copy the above directly.
David
On Jan 13, 2024, at 15:19, octaeder @.***> wrote:
Can't reproduce on Win10 with current build, jumps to corresponding location in pdf from subfiles. Worked it before? If so what has been changed since then? Any changes made on options? Add some screenshots or screencast here? Where did you add the magic command (should be comment)? Normally it is placed in the documents.
— Reply to this email directly, view it on GitHub https://github.com/texstudio-org/texstudio/issues/3475#issuecomment-1890771467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWGPLNLDZYRAXDAJLXZDK3YOL24PAVCNFSM6AAAAABBZSIT52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQG43TCNBWG4. You are receiving this because you authored the thread.
This is, as always, a question of delivering a reproducible test case. There is basically no details on documents and document structure, so we can guess and try to put together documents here without any chance to know that it is the same on your side. So, provide a minimal example which shows the behaviour and then we can discuss.
Thanks for your response.
What’s frustrating is that, by careful deletion of test in all relevant files (attempting to create a MWE) and then reversing the order to reinsert (command Z), over the course of several hours, the problem went away. It also required renaming the imported file.
I remain convinced that there are (a) hidden characters - perhaps created by my hopefully-not-to-be-repeated use of magic comments, (b) hangover elements in auxiliary files, or (c) other elements that get changed without visibility in written files, but I can’t find them.
If there is a command that literally reveals ALL codes (as well as characters) in files, it could help (at least me).
Meanwhile, the inline preview functionality still does not work (on new macbook pro), but I can get by with the pdf.
Thanks again.
On Jan 14, 2024, at 03:47, sunderme @.***> wrote:
This is, as always, a question of delivering a reproducible test case. There is basically no details on documents and document structure, so we can guess and try to put together documents here without any change to know that it is the same on your side. So, provide a minimal example which shows the behaviour and then we can discuss.
— Reply to this email directly, view it on GitHub https://github.com/texstudio-org/texstudio/issues/3475#issuecomment-1890901488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWGPLL52YXX3QQ3IBXWTCLYOOSSNAVCNFSM6AAAAABBZSIT52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQHEYDCNBYHA. You are receiving this because you authored the thread.
There are no hidden characters in a file. It is a text file and txs acts as a text editor. Also, txs does not look at aux files or similar. txs however tries to load included files (unless disabled) and it tries to cache basic information.
For inline preview, an document example is needed.
Thanks for your response. Does it sometimes help to clear the cache? If so, how to do that?
Here is a MWE re inline preview:
— MAIN.TEX ---
\documentclass{book}
\usepackage{mhsetup} \usepackage{mathtools} \usepackage{import}
\begin{document}
\subimport{30pt-UNDERGRADUATE/}{SubFile}
\end{document}
— in folder 30pt-UNDERGRADUATE, SubFile.tex
\part{SubFile}
$3 x 2 = 6$
— the pdf gets generated, but placing the tooltip on the formula give nothing, and I get nothing by highlighting the equation.
Do the previews work in imported files?
DAvid
On Jan 15, 2024, at 14:04, sunderme @.***> wrote:
There are no hidden characters in a file. It is a text file and txs acts as a text editor. Also, txs does not look at aux files or similar. txs however tries to load included files (unless disabled) and it tries to cache basic information.
For inline preview, an document example is needed.
— Reply to this email directly, view it on GitHub https://github.com/texstudio-org/texstudio/issues/3475#issuecomment-1892712275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWGPLP5OB42GYYICSD7I5DYOWDV5AVCNFSM6AAAAABBZSIT52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSG4YTEMRXGU. You are receiving this because you authored the thread.
yes, it does and it works here.
I am closing this as the issue stated in the title seems resolved.
Next time, please directly come back with filled out template and a meaningful example.