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 use pdflatex, Windows7, and TeXnicCenter. I am interested in using \psbarcode in combination with \usepackage{auto-pst-pdf}. A possible solution is to use latex-dvips-ps2pdf. The question is how to activate latex-dvips-ps2pdf. I found a detailed explanation on the TeXworks site

Windows
Create a file latex-dvips-ps2pdf.bat containing
@latex -synctex=1 "%1.tex" && dvips "%1.dvi" && ps2pdf "%1.ps"
If -synctex=1 causes problems, simply remove it.

I do not know how and where to create this .bat file for latex-dvips-ps2pdf. Could you please clarify this to me, or give me other suggestions, screenshots, etc. on how to proceed?

share|improve this question
    
The easiest way is to use xelatex then you do not need any additional package –  Herbert Jun 6 '12 at 6:56
    
TeXWorks isn'T TeXniCenter. The editor TeXniCenter offers a compilation "LaTeX-ps-pdf". If you want to use auto-pst-pdf you need shell-escape`. For more information see: tug.org/PSTricks/main.cgi?file=pdf/pdfoutput –  Marco Daniel Jun 6 '12 at 12:12
add comment

1 Answer

If you use TeXnicCenter, there's no need to create a .bat file. IMHO there's a more fluid way of doing that.

I'm using the alpha version of TeXnicCenter. I suppose the following steps also work with 1.x branch.

Let's create a new output profile. Go to Build > Define Output Profiles.

Image 1

There are some predefined output profiles. Let's create a new profile based on an existing one. Select LaTeX → DVI → PDF and click the Copy button.

Image 2

Let's give a new name for our profile. I'll use (new) LaTeX → DVI → PDF. Click OK.

Image 3

Now it's time to configure our new profile. Make sure our profile is selected in the list. The first tab is (La)TeX. Since we copied from another LaTeX workflow, we don't need to modify anything here.

Image 4

Go to the Preprocessor tab. The list should be empty. Let's move on.

Image 5

Now we are in the Postprocessor tab. Select the dvipdfm item and click the Delete button. The list is now empty.

Image 6

Let's add the first postprocessor of our workflow. Click the New button.

Image 7

Name it dvips.

Image 8

With dvips selected, now go to the Executable: field and click the ... button.

Image 9

Find the dvips.exe executable. Mine is inside the bin\win32 directory from TeX Live. Click Open.

Image 10

Now, in the Arguments: textfield, type "%bm.dvi" (with the quotes).

Image 11

Time to add the second postprocessor. Let's do the very same steps we did before. Add a new postprocessor called ps2pdf:

Image 12

With ps2pdf selected, go to the Executable: field and click the ... button. Find the ps2pdf.exe executable and click Open.

Image 13

In the Arguments: textfield, type "%bm.ps" (with the quotes). We are done. Click the OK button.

Image 14

Open your .tex file (my example is from the pst-barcode manual).

Image 15

Make sure to select the new profile we created:

Image 16

And then compile your .tex file:

Image 17

The output:

Image 18

And everything works as expected. :)

If you want to use auto-pst-pdf, a simple pdflatex workflow might be enough, but in this case, note that auto-pst-pdf requires --shell-escape enabled (as Marco pointed out). The correct workflow would be pdflatex --shell-escape myfile.tex.

Or you could use xelatex as Herbert suggested. :)

share|improve this answer
    
Windows? What? -- Is Fedora down? –  Marco Daniel Jun 6 '12 at 13:24
1  
@MarcoDaniel: I... I... have Windows installed too! /cries Oh the shame! :) Someone has to make arara works on Windows too. :P –  Paulo Cereda Jun 6 '12 at 13:29
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.