GeneralTexnic generates blank PDF

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
bcfla
Posts: 5
Joined: Sun Jul 06, 2008 12:48 pm

Texnic generates blank PDF

Post by bcfla »

Dear all,

I'm trying to use Texnic along with Miktek 2.7 to write my thesis. When it's set to "Latex=>PDF" and I click on "Build Current File" (I don't know why but "Build Output" is disabled) it says that it found no errors, some "bad boxes" and some warnings. It generates a PDF file with 78 pages but they are all blank and as I scroll down a message saying "An error was found in this file" is displayed. After I click OK on this message box, another one pops up saying "Wrong operand type".

If I change the setting to "Latex=>DVI", the file is correctly generated.

Any suggestions?

Thanks a lot in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Texnic generates blank PDF

Post by localghost »

bcfla wrote:[…] When it's set to "Latex=>PDF" and I click on "Build Current File" (I don't know why but "Build Output" is disabled) it says that it found no errors, some "bad boxes" and some warnings. […]
The "Build Output" button (or pressing F7) is only active when working with a project. So you can make sure that always the main file of the project is processed. You must not neglect the warnings. In most cases they are very useful to explain why things are going wrong. I suggest to attach the log file here.
bcfla wrote:[…] It generates a PDF file with 78 pages but they are all blank and as I scroll down a message saying "An error was found in this file" is displayed. After I click OK on this message box, another one pops up saying "Wrong operand type".

If I change the setting to "Latex=>DVI", the file is correctly generated. […]
Choose the build profile "LaTeX => PS => PDF" and check the log file as well as the resulting PDF. If necessary, provide a minimal working example (MWE) that reproduces the undesired behaviour or attach the critical source file here. Alternatively you should post at least the preamble of your document. Sometimes that's enough to find causes of errors.


Best regards and welcome to the board
Thorsten¹
bcfla
Posts: 5
Joined: Sun Jul 06, 2008 12:48 pm

Re: Texnic generates blank PDF

Post by bcfla »

Dear Thorsten,

Thank you very much for your reply.

I'm a complete newbie to Texnic (actually, to Latex as a whole) and I'm not sure of what to look for in the log file. Nothing in the file caught my eye as something that might be the cause of the problem or that I would be capable of solving.

I tried setting up an example of my file that replicates the condition I described, which is attached along with the .cls file. If anyone is able to take a look at this I would greatly appreciate it.

Once again, thanks a lot for all the help!

Best regards
Attachments
Dissertation.zip
(8.63 KiB) Downloaded 152 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Texnic generates blank PDF

Post by localghost »

The posted files are useless, because I don't have the file brhyphen.tex and I don't know where to get it from. A was able to acquire atbeginend.sty from the web. I only need the log file the compiler produced when processing the source file on your machine. So, please attach this file as I already requested.

Supplement:
I'm not sure but I probably found the cause. The custom class file requires the graphicx package.

Code: Select all

\RequirePackage[dvipdfm]{graphicx}
This package should always be loaded without any driver option. So modify the code as follows.

Code: Select all

\RequirePackage{graphicx}
Perhaps this solves the problem, but we will know better after a new run with the modified class file.
bcfla
Posts: 5
Joined: Sun Jul 06, 2008 12:48 pm

Re: Texnic generates blank PDF

Post by bcfla »

Sorry for not getting your message correctly.

I have tried the piece of code you posted but got an error saying "Unknown graphics extension: .ps".

I am now attaching the log file for both cases (with and without the modification of the .cls file) and also the brhyphen.tex just in case.

Hope I have done things right this time :)

Best regards!
Attachments
Files.zip
(10.92 KiB) Downloaded 137 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Texnic generates blank PDF

Post by localghost »

I'm sorry, but I'm afraid my help ends here. I still got an error message caused by the \setpage command and I have not been able to eliminate it.

Code: Select all

! Undefined control sequence.
\puc@setmargins@front ->\setpage 
                                 {\csname puc@textheight@front\endcsname }{\...
l.63 \begin{document}
The modification doesn't seem to work and I can't find any irregularities in the log files. Sorry, but I'm out of the race.
bcfla
Posts: 5
Joined: Sun Jul 06, 2008 12:48 pm

Re: Texnic generates blank PDF

Post by bcfla »

Thank you very much for investing your time into this!

I have absolutely no idea of what to do but if I get an answer to this I'll post here.

Best regards.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Texnic generates blank PDF

Post by Juanjo »

After a Google search, I've found Thomas Lewiner's homepage, the author of the ThesisPUC class. There one can download a zip file with the latest version of ThesisPUC.cls and some additional files.

The command which yielded the error reported by localghost is \setpage. I conjectured that it was related with fixing the page layout, so I took a look to one of the packages loaded by ThesisPUC.cls, specifically, to chngpage.sty. I opened this file located somewhere in my TeX-Live 2007 distribution. I found there a quite similar command, \changepage, which fitted with the usage and number of arguments that ThesisPUC.cls assigns to \setpage. When I downloaded the zip file from the above link, I understood the whole matter: Thomas Lewiner has adapted chngpage.sty, introducing \setpage and more commands, but unfortunately he did not change the file name. The package that he distributes together with ThesisPUC.cls is unproperly named chngpage.sty, leading to confusion.

ThesisPUC.cls also loads the graphic file puc.ps, with the logo of the university. Since it is a ps file, the class forces to follow the path LaTeX->PS->PDF. I've converted that file to PDF format and changed puc.ps by puc.pdf in ThesisPUC.cls, since I prefer the direct way from LaTeX to PDF. But then I found a new error: hyperref is loaded with an unexisting option pdflatex. After replacing pdflatex by pdftex, I managed to compile.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
tomlew
Posts: 1
Joined: Mon Jul 07, 2008 4:54 pm

Re: Texnic generates blank PDF

Post by tomlew »

Sorry for the package confusion. I updated the class style for the standard chngpage style:
http://cuca.mat.puc-rio.br/~tomlew/thesis_puc.zip

Thank you for the comment!!
bcfla
Posts: 5
Joined: Sun Jul 06, 2008 12:48 pm

Re: Texnic generates blank PDF

Post by bcfla »

Thank you all very much for the replies!

I'll try to make it work right now!

Best regards,

Bruno
Post Reply