I'm using Texmaker and need to compile using latex, biber, latex, latex, dvips, ps2pdf. If compiling from command line, doing

latex -interaction=nonstopmode file.tex
biber file.bcf
latex -interaction=nonstopmode file.tex
latex -interaction=nonstopmode file.tex
dvips -o file.ps file.dvi
ps2pdf -dMaxSubsetPct#100 -dCompatibilityLevel#1.2 -dSubsetFonts#true -dEmbedAllFonts#true -dAutoFilterColorImages#false -dAutoFilterGrayImages#false -dColorImageFilter#/FlateEncode -dGrayImageFilter#/FlateEncode -dModoImageFilter#/FlateEncode -dDownsampleColorImages#false -dDownsampleGrayImages#false -dDownsampleMonoImages#false -dColorImageFilter#/FlateEncode -dPDFsettings#/prepress file.ps file.pdf

everything works fine. But when configuring a custom command in Texmaker like

latex -interaction=nonstopmode %.tex|biber %.bcf|latex
-interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -o %.ps %.dvi|ps2pdf -dMaxSubsetPct#100
-dCompatibilityLevel#1.2 -dSubsetFonts#true -dEmbedAllFonts#true -dAutoFilterColorImages#false -dAutoFilterGrayImages#false -dColorImageFilter#/FlateEncode -dGrayImageFilter#/FlateEncode -dModoImageFilter#/FlateEncode -dDownsampleColorImages#false -dDownsampleGrayImages#false -dDownsampleMonoImages#false -dColorImageFilter#/FlateEncode -dPDFsettings#/prepress %.ps %.pdf|"C:/Program Files (x86)/Adobe/Reader 10.0/Reader/AcroRd32.exe" %.pdf

the creation of PDF fails. There is an error saying that the file cannot be found, but the message is gone too fast for me to entirely read it...

What am I doing wrong?

  • 1
    I guess you don't want to pipe the output from one command to the next (using "|"), but just want to put the commands in sequence. Then ";" is the proper way to separate those. – TeXter Jun 26 '12 at 19:31
  • Texmaker requires multiple commands to be separated by "|". Using latex -interaction=nonstopmode %.tex|biber %.bcf|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -o %.ps %.dvi|ps2pdf %.ps %.pdf|"C:/Program Files (x86)/Adobe/Reader 10.0/Reader/AcroRd32.exe" %.pdf works and produces a PDF - but with poor quality which is why I need those options for ps2pdf. – Wampo Jun 26 '12 at 19:35
  • @Wampo What TeX distribution are you using? If it's MiKTeX, install the cm-super package and your PDF files will have good quality also with pdflatex. Welcome to TeX.SX! – egreg Jun 26 '12 at 21:16
  • I'm using MiKTeX and need above mentioned parameters so that ps2pdf doesn't compress my images. If I use these parameters from command line, the PDF is 300 kB larger in file size and displays the images as I want them to be displayed. – Wampo Jun 26 '12 at 21:24
  • Remove the interaction so you can read the errors. – Sigur Jun 27 '12 at 0:49

In Texmaker, you can use Quickbuild Wizard to have your own sequence of commands to be executed on the .tex file

First step is to load the latex/dvips/ps2pdf commands in texmaker as shown below. Try zooming the browser to check the correct command line arguments

Texmaker Configuration for latex/dvips/biber/ps2pdf

After this build the sequence of commands as shown below Order of Execution

Once you press ok you will find the below commands in the user defined box

latex -interaction=nonstopmode %.tex|biber %.bcf|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -o %.ps %.dvi|ps2pdf -dMaxSubsetPct#100 -dCompatibilityLevel#1.2 -dSubsetFonts#true -dEmbedAllFonts#true -dAutoFilterColorImages#false -dAutoFilterGrayImages#false -dColorImageFilter#/FlateEncode -dGrayImageFilter#/FlateEncode -dModoImageFilter#/FlateEncode -dDownsampleColorImages#false -dDownsampleGrayImages#false -dDownsampleMonoImages#false -dColorImageFilter#/FlateEncode -dPDFsettings#/prepress %.ps

Confirm your userdefined choice and Use the Quickbuild and Press VIEW PDF to see the pdf document.

  • Thank you for your comment! The command itself works but will produce a PDF with bad image quality, too. I don't get why compiling from command-line works fine and letting Texmaker handle it won't give me satisfying results... – Wampo Jun 27 '12 at 19:22
  • I have just added the commands inside texmaker configure menu (1st screen shot). Texmaker will execute the commands as if it were executed from 'cmd' window shell. – texenthusiast Jun 27 '12 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.