## auto-pst-pdf and automultiplechoice do not seem to work together

Hi,
I appear to have different requirements than everyone else, so I'm back with another question :-)
Our testing center requires us to put a barcode sticker on exams before we copy them. (Thus every student's copy has the same barcode on it). This is a problem with AMC, because every student's exam is unique.

I figured out how to use pst-barcode and auto-pst-pdf to create a barcode in latex that looks like the barcode I need to have on each exam. I can therefore put the barcode into my file directly. However, it does not seem to work correctly. When I run it, I have no errors, but I get a warning:

Package auto-pst-pdf Warning:
Could not create amc-compiled-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

amc-compiled-pics.pdf is supposed to be the pic containing the barcode.

I verified with a simple example that pst-barcode and auto-pst-pdf work on my system, so there must be something going on with automultiplechoice that makes this not work.

Maybe the barcode system that automultplechoice is using is interfering with this? Does anyone have any ideas?

This is not a huge issue, because I can create the barcode separately, and then use graphicx to include it, but it would be nicer if everything could be in the same file, especially since AMC stuff needs to be in its own directory. I am attaching the file that I am testing this on, along with the style file I am creating to make this (eventually) easier.

Thanks,
S.M.

### Replies (9)

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by Alexis Bienvenüeover 8 years ago

simple.tex does not require examheader. Can you provide a source file we can compile to test the barcode?

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by S. McKayover 8 years ago

Sorry.
The simple.tex that I uploaded does require examheader. I probably should have renamed it.

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by Alexis Bienvenüeover 8 years ago

It seems OK using latex, dvips and then ps2pdf.

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by S. McKayover 8 years ago

Right. When I run
pdflatex --shell-escape simple.tex
it works correctly. However, when I hit the "Update Documents" button in the gui, I get the error message that I mentioned above.

In the preferences, my latex engine is listed as
pdflatex --shell-escape,
so I would assume that it should compile correctly. But, it does not.

Again,
this is an error I see in the AMC app, not when I compile directly. I apologize that that wasn't evident in my first post.

Thanks,
S.M.

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by Alexis Bienvenüeover 8 years ago

pdflatex --shell-escape simple.tex does not work with me: I have

Package pst-pdf Warning: simple-pics.pdf' contains 1 pages
(pst-pdf)                but 10 pages are requested:
(pst-pdf)                File simple-pics.pdf' is no more valid!
(pst-pdf)                Recreate it .


and there is only one barcode on the first page of the PDF (and I'm not sure it is as needed).

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by S. McKayabout 8 years ago

Interesting. It works for me. auto-pst-pdf is supposed to do the intermediate steps. I don't want to bother you with this anymore, since different people are getting different behaviors. Like I said, I can create it outside of AMC, and include it as a graphic. So, I'm not sure this is worth bothering about. If I get more time, I'll try to figure out what is going on.

Thanks,
S.M.

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by Andrea Paloiabout 8 years ago

Hi, i'm experiencing he same issue generating the PDF file inside AMC, when I run "pdflatex --shell-escape simple.tex" from terminal it works.
It works also changing the dafault Latex Engine to "latex+dvipdf" inside AMC but it's very slow generating the output file(s).
I'm new to LaTex, the issue is generated trying to write a BarCode in the document, the OS is Ubuntu 14.04 desktop.

-------------------------------------------------
auto-pst-pdf: Auxiliary LaTeX compilation
-------------------------------------------------
-------------------------------------------------
auto-pst-pdf: End auxiliary LaTeX compilation
-------------------------------------------------
Package auto-pst-pdf Warning:
Could not create amc-compiled-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by Andrea Paloiabout 8 years ago

More useful rows from the logfile:

Underfull \hbox (badness 10000) in paragraph at lines 242--242
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!] [2] [3]
Overfull \hbox (6.66504pt too wide) in paragraph at lines 242--242
[]
Package pst-pdf Warning: pspicture No. 1 undefined.
[4]
(pst-pdf) Use the following commands to create it:
(pst-pdf) ----------------------------------------------------
(pst-pdf) latex amc-compiled.tex
(pst-pdf) dvips o amc-compiled-pics.ps amc-compiled.dvi
(pst-pdf) ps2pdf amc-compiled-pics.ps
(pst-pdf) ---------------------------------------------------
.
(./amc-compiled.aux) )

#### RE: auto-pst-pdf and automultiplechoice do not seem to work together - Added by S. McKayabout 8 years ago

Yes, this is what I get. Works great outside of AMC, doesn't work at all inside AMC. I haven't had time to do some code diving to see what is going on. I suspect that it has to do with the fact that amc tricks latex into thinking the filename is different, and somehow that is messing auto-pst-pdf up.

(1-9/9)