GeneralCompilation with Build Profile "LaTeX => PS => PDF"

General information and discussion about TeXnicCenter
Post Reply
amatya
Posts: 3
Joined: Sat Mar 31, 2012 9:49 pm

Compilation with Build Profile "LaTeX => PS => PDF"

Post by amatya »

Hi,

My understanding of Latex is minimal and my capabilities are restricted to producing PDFs and beamer presentations containing math and tables. I am trying to create a PDF with graphics using PSTricks. I have found an identical thread to this one in the forums but those eventually involved posting log files etc so some of the problems could be diagnosed. I wasn't sure if I should post in a thread inactive for 2 years so I am starting this one.

I am able to "LaTeX => DVI" and get a beautiful document in Yap with my PSTricks figure. But I am not able to figure out how to get that to become a PDF file. At some point in the process I have installed GSview as well and am able to view a PS files in GSview.

I have looked up how to create a "LaTeX => PS => PDF" output profile by looking on this forum, using an attachment posted by Thorsten and have installed appropriate packages using MiKTeX but it's not working. It compiles when I do "LaTeX => PS => PDF" but when I click on view output, TeXnicCenter freezes and then I get an error like [DocOpen%bm(FileOpen%bm)] cannot execute.

Attached are the warning messages in the log file I am getting and the minimum working example. I have named it MWE.tex. My profile settings are in the attachment, too.

You will notice that there are output profiles of Latex=>dvi=>pdf and latex=>dvips=>ps2pdf but those are also created by me and they don't work at all.

I am attaching what I think is the log file. It has three warnings if you scroll down.
  1. ifplatform Warning: shell escape is disabled, so I can only detect \ifwindows.
  2. Unused global option(s):[psfig].
  3. Float too large for page by 118.52003pt on input line 18.
When I go look in my work directory, there is a MWE.PS file created and I am able to view the file and the figure in GSview. There is also a MWE.dvi which I can view in YAP. There is also MWE files with extensions aux, txt, tex,bbl,performance monitor file also in the directory.

Any help will be greatly appreciated. Thanks
Attachments
The compiler settings for the profile "LaTeX => PS => PDF".
The compiler settings for the profile "LaTeX => PS => PDF".
TXC-Profiles-LaTeXPSPDF-Compiler.jpg (151.5 KiB) Viewed 13691 times
The post-processor settings for the profile "LaTeX => PS => PDF".
The post-processor settings for the profile "LaTeX => PS => PDF".
TXC-Profiles-LaTeXPSPDF-Postprocessor.jpg (116.37 KiB) Viewed 13691 times
The viewer settings for the profile "LaTeX => PS => PDF".
The viewer settings for the profile "LaTeX => PS => PDF".
TXC-Profiles-LaTeXPSPDF-Viewer.jpg (150.51 KiB) Viewed 13691 times
MWE.zip
The example file including log.
(4.4 KiB) Downloaded 341 times
Last edited by localghost on Sun Apr 01, 2012 10:52 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

amatya
Posts: 3
Joined: Sat Mar 31, 2012 9:49 pm

Compilation with Build Profile "LaTeX => PS => PDF"

Post by amatya »

woohoo!!

I did the following things and it worked.
  1. In the post processor section of build profile, I deleted Dvips and created a new ps2pdf and in the executable I linked to a file called ps2pdf.exe under miktek/../bin and
  2. In the viewer, I changed from DDE command to command line argument and changed "Doc...(some more stuff)...fileopen" to %bm.pdf without the quotes for both view project output and forward search and lo and behold it works!
I have no idea what just happened so I'd really appreciate it if anyone could give me some input on it!

anyway.. I'm so happy.. it was so frustrating to get those dings... I would find myself flinching in anticipation.

Thanks
A
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Compilation with Build Profile "LaTeX => PS => PDF"

Post by localghost »

amatya wrote:[…] When I go look in my work directory, there is a MWE.PS file created and I am able to view the file and the figure in GSview. There is also a MWE.dvi which I can view in YAP. There is also MWE files with extensions aux, txt, tex,bbl,performance monitor file also in the directory. […]
Just for clarification which files are located in the working directory and produced during a compiler run or the (possibly automated) calls of BibTeX and MakeIndex.
  • *.tex: The actual source file(s) generated by the user.
  • *.log: The log file. It contains the same text that appears on the screen during a compiler run.
  • *.dvi: The LaTeX output file. Intermediate file format.
  • *.pdf: The PDFLaTeX output file. Can also be produced by conversion.
  • *.ps: The Postscript output file. Usually produced by DviPS per conversion from DVI to PS.
  • *.aux: The auxiliary file(s). Contains important information about e. g. cross-references and lists (ToC, …).
  • *.toc: File with information about the Table of Contents (ToC).
  • *.lof: File with information about the List of Figures (LoF).
  • *.lot: File with information about the List of Tables (LoT).
  • *.idx: Is only produced if the \makeindex command appears in the document preamble. It contains index entries produced by \index commands in the document.
  • *.ind: Produced by MakeIndex from the *.idx file.
  • *.ilg: The log file of MakeIndex.
  • *.bbl: The log file of BibTeX. BibTeX needs information from the *.aux file(s).
  • *.bib: The bibliography database for BibTeX. Usually generated by the user.
  • *.blg: The log file of BibTeX.
There are neither a *.txt file nor other files produced. It can be that Wind0ws associates the *.log files with Notepad, thus they appear as *.txt files. This is similar for the *.blg files and their association to the performance monitor. I suggest to always display file suffixes in the explorer.
amatya wrote:[…] In the post processor section of build profile, I deleted Dvips and created a new ps2pdf and in the executable I linked to a file called ps2pdf.exe under miktek/../bin […]
I don't think that this works since the conversion step from DVI to PS would be skipped. Hence the conversion from PS to PDF would fail.
amatya wrote:[…] In the viewer, I changed from DDE command to command line argument and changed "Doc...(some more stuff)...fileopen" to %bm.pdf without the quotes for both view project output and forward search and lo and behold it works![…]
Since you use the Ad0be Reader 10 (ARX), you should note that there have been significant changes in the way this PDF reader is invoked by other programs like TeXnicCenter (TXC). A search in the forum will yield appropriate solutions. I remember to have posted this along with some screen captures. Restrict the search to only my posts and you should find it.

Furthermore you should think about using another PDF reader like Sumatra PDF. When working with LaTeX it is a much better partner for TXC since it supports forward and inverse search in the PDF output (by the SyncTeX technology) and it doesn't lock opened files. On the TXC homepage (see partner sites on the right) there are tutorials which show you how to make this team work together. Here, too, a forum search should be helpful for other sources of information.


Best regards and welcome to the board
Thorsten
amatya
Posts: 3
Joined: Sat Mar 31, 2012 9:49 pm

Compilation with Build Profile "LaTeX => PS => PDF"

Post by amatya »

Hi Thorsten,

Thank you so much for replying. It will take me a few days to process everything you have written so I will write again to address those issues but I just want to not wait that long to send out a thank you email.
In the post processor section of build profile, I deleted Dvips and created a new ps2pdf and in the executable I linked to a file called ps2pdf.exe under miktek/../bin
I don't think that this works since the conversion step from DVI to PS would be skipped. Hence the conversion from PS to PDF would fail.
I am attaching a jpeg of the postprocessor of my Latex=>PS=>PDF and I guess the reason why it is working might be due to the fact the it is using the DViPS option already on it and not the ps2pdf I added or something.
The new post-processor settings.
The new post-processor settings.
TXC-Profiles-LaTeXPSPDF-Postprocessor-new.jpg (111.61 KiB) Viewed 13665 times
The new viewer settings.
The new viewer settings.
TXC-Profiles-LaTeXPSPDF-Viewer-new.png (41.96 KiB) Viewed 13665 times
My TeXnicCenter is producing a PDF containing my PSTricks figure. I created a new latex file with the same earlier code and called it MWE2 and I did the Latex=>PS=>PDF and it produced a PDF (which I am attaching).

I'll comment more when I get a chance to comprehend more of what you've written. I have downloaded and installed Sumatra and I guess at some point I will make it the reader in these build profiles. Thanks for introducing me to it.

Thanks a lot for your help
Cheers
Amatya
Attachments
MWE2.tex
(515 Bytes) Downloaded 422 times
MWE2.pdf
(8.77 KiB) Downloaded 414 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Compilation with Build Profile "LaTeX => PS => PDF"

Post by localghost »

According to the new screen capture of your post-processor settings you did not delete the DviPs processing as you described earlier. Replacing Ghostscript with ps2pdf is not really significant. So this was a bit misleading.

By the way, we would appreciate it if you exclusively add attachment by upload to the forum server. external links can get lost with time and make a problem or a thread incomprehensible.
Post Reply