Viewers for PDF, PS, and DVI ⇒ Problem with sumatrapdf - could it be document's class file?
Problem with sumatrapdf - could it be document's class file?
Well I'm having a strange problem compiling my .tex file with TexnicCenter and viewing with SumatraPDF. It compiles and views fine in Acrobat Reader. When compiling and viewing in SumatraPDF, however, the following error message appears in a pop-up window:
********************************************
[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
Cannot execute the command.
********************************************
The funny thing is that SumatraPDF works great most of the time, I'm only getting this error message with this file for some reason. The class file is elsarticle.cls used in Elsevier journals - could that be what's causing this? On another machine I even attempted to set up Texlipse (instead of TexnicCenter) with SumatraPDF, and got the same error message from SumatraPDF when compiling and viewing, while Acrobat Reader again worked fine.
Can anyone point me in the right direction to get this fixed?
********************************************
[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
Cannot execute the command.
********************************************
The funny thing is that SumatraPDF works great most of the time, I'm only getting this error message with this file for some reason. The class file is elsarticle.cls used in Elsevier journals - could that be what's causing this? On another machine I even attempted to set up Texlipse (instead of TexnicCenter) with SumatraPDF, and got the same error message from SumatraPDF when compiling and viewing, while Acrobat Reader again worked fine.
Can anyone point me in the right direction to get this fixed?
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with sumatrapdf - could it be document's class file?
This problem is certainly not related to the used document class. I can confirm this problem, but only when using the »LaTeX => PS => PDF« build profile. This might be caused by the fact that SumatraPDF expects some data from a SyncTeX file for forward and inverse search, which is only useful when compiling with pdflatex. Nevertheless the resulting PDF file should be displayed correctly.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Problem with sumatrapdf - could it be document's class file?
Hi Thorsten,
Thank you for your reply and the kind welcome to this great site.
This is perplexing... I am only compiling with pdflatex, using the LaTeX =>PDF build profile (well, I actually made a copy of the original, renaming it "LaTeX =>PDF (SumatraPDF)", and adjusted the necessary viewer settings, etc.).
I've went through my preamble and verified that there are no extraneous commands there (i.e., I have only kept those which, if removed, cause a compilation error). Even after this, the file does not compile in TeXnicCenter using pdflatex -- the error message still pops up, though the previously compiled version of the PDF does appear in SumatraPDF.
Are there any other suggestions as to why this is happening, other than it not having to do with the document class?
Thank you for your reply and the kind welcome to this great site.
This is perplexing... I am only compiling with pdflatex, using the LaTeX =>PDF build profile (well, I actually made a copy of the original, renaming it "LaTeX =>PDF (SumatraPDF)", and adjusted the necessary viewer settings, etc.).
I've went through my preamble and verified that there are no extraneous commands there (i.e., I have only kept those which, if removed, cause a compilation error). Even after this, the file does not compile in TeXnicCenter using pdflatex -- the error message still pops up, though the previously compiled version of the PDF does appear in SumatraPDF.
Are there any other suggestions as to why this is happening, other than it not having to do with the document class?
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with sumatrapdf - could it be document's class file?
You have to do a little bit more. As shown in the attachment, you have to add the synctex=1 option to the command line arguments for the compiler. (Although the screenshot is from the older TXC2 alpha 1, it also works for TXC1 RC1 and TXC alpha 2 this way.)
- Attachments
-
- TXC2alpha1-pdflatex-profile-modified.png (46.78 KiB) Viewed 11675 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Problem with sumatrapdf - could it be document's class file?
Hey again localghost, thanks for your reply. I think I have been setting the synctex switch... I'm attaching screenshots of the profile windows. Here's the LaTeX tab:
and the Viewer tab:
and, finally, the text that's too long to fit in the box reads:
"C:\USER\ANDY\SUMATRAPDF\SUMATRAPDF.EXE" -inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]\""
Do you see anything missing? And is there a difference between setting "-synctex=1" vs. "-synctex=-1"? Does it matter whether there is 1 vs. 2 dashes before synctex (i.e., "-synctex=" vs. "--synctex=..."?)
Thanks for all of your help!
and the Viewer tab:
and, finally, the text that's too long to fit in the box reads:
"C:\USER\ANDY\SUMATRAPDF\SUMATRAPDF.EXE" -inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]\""
Do you see anything missing? And is there a difference between setting "-synctex=1" vs. "-synctex=-1"? Does it matter whether there is 1 vs. 2 dashes before synctex (i.e., "-synctex=" vs. "--synctex=..."?)
Thanks for all of your help!
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with sumatrapdf - could it be document's class file?
There are two main resources with instructions on how to set up TeXnicCenter (TXC) with Sumatra PDF [1,2]. Compare your settings with those you find there (especially in [1]).
[1] TeXnicCenter.org - Tutorials
[2] william.familie-blum.org news - Configuring editors with SumatraPDF
For the front dash see the attachment in my last reply. The »-1« is an older setting and in opposite to »1« does not compress the SyncTeX data file. But this should not affect the functionality. The only possible values are -1, 0 or 1.ralphey wrote:Do you see anything missing? And is there a difference between setting "-synctex=1" vs. "-synctex=-1"? Does it matter whether there is 1 vs. 2 dashes before synctex (i.e., "-synctex=" vs. "--synctex=..."?)
[1] TeXnicCenter.org - Tutorials
[2] william.familie-blum.org news - Configuring editors with SumatraPDF
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: Problem with sumatrapdf - could it be document's class f
localghost: I probably should have mentioned that I used the first resource in your list to initially set up TexnicCenter + SumatraPDF configuration! The configuration has worked beautifully on every file except this particular .tex file - which, again, displays just fine when compiled with pdflatex and viewed using Acrobat Reader.
Any other recommendations?
Any other recommendations?
Re: Problem with sumatrapdf - could it be document's class f
I just want to confirm Ralphey's observation: I get the error with some tex files and not others...
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with sumatrapdf - could it be document's class file?
Give a concrete example, which means that you have to reduce a problematic document to a minimal working example (MWE) that exactly reproduces the undesired behaviour. The page behind the link gives detailed instructions.jonasson wrote:I just want to confirm Ralphey's observation: I get the error with some tex files and not others...
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: Problem with sumatrapdf - could it be document's class f
I am receiving the same error with this file. This program has worked many times in the past.
I just ran this program in XP and it work. It has worked in the past using Win 7. I have not tried uninstalling and reinstalling the software.
Why would it stop working?
I just ran this program in XP and it work. It has worked in the past using Win 7. I have not tried uninstalling and reinstalling the software.
Why would it stop working?
- Attachments
-
- JACPASLetterhead.tex
- (1.56 KiB) Downloaded 532 times