Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

1 Answer

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.

share|improve this answer
    
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
    
Thanks a very helpful feature I never noticed. –  Forkrul Assail Jun 27 '13 at 12:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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