1

I've got a problem with pdflatex on Windows system in console.

My tex file is working fine, when I generate it with TeXWorks. But when I try to generate a PDF file from the command line, it does not recognize my parameters. The tex file is placed in the same folder where I start the command:

enter image description here

The command I try to use is this one:

pdflatex -job-name Omn9MRHEeHDTEvvDtS9y.tex

But the console does not recognize it as parameter. It asks always for the input file:

enter image description here

I also tried this commands:

pdflatex -job-name=Omn9MRHEeHDTEvvDtS9y.tex
pdflatex -job-name "Omn9MRHEeHDTEvvDtS9y.tex"
pdflatex -job-name="Omn9MRHEeHDTEvvDtS9y.tex"
pdflatex -job-name 'Omn9MRHEeHDTEvvDtS9y.tex'

Same result... Any hint what I'm doing wrong?

  • 1
    Oh no, isn't it pdflatex -jobname ... ? – Keks Dose Jun 12 at 15:02
  • 1
    -job-name is wrong, the name of the option is -jobname. – Ulrike Fischer Jun 12 at 15:03
  • Ok. Thanks for your hints. When I used pdflatex Omn9MRHEeHDTEvvDtS9y.tex it worked fine! Thanks! – dns_nx Jun 12 at 15:04
  • 1
    and when using --jobname you need two arguments: the new jobname and the name of the file. – Ulrike Fischer Jun 12 at 15:04
  • 1
    @KJO ah yes, miktex accepts both. But I would stick to --jobname, that works in texlive too (the main problem is naturally the missing argument). – Ulrike Fischer Jun 12 at 15:09
2

The answer is: the option is -jobname or --jobname, but not -job-name. As pointed out in the comments, --jobname requires an argument as well as the file name to be loaded.

  • 1
    Er, no: --jobname requires one argument, but you still have to give the file name to be loaded. If you do just pdflatex --jobname foo you are replacing the default texinput – Joseph Wright Jun 12 at 15:56
  • @JosephWright I'm searching for documentation, but in vain. In the pdftex manual I simply found "All options can be specified with one or two dashes and unambiguously abbreviated." Where can I draw enlightment? Other docu: "-jobname name Use name for the job name, instead of deriving it from the name of the input file." pdftex.man1.pdf – Keks Dose Jun 12 at 16:07

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.