I have the following situation: I have to produce 60+ files in latex, each one from a .txt file, and with one master file (tex): I mean, I have a 1- or 2-page file per situation (a .txt file, in UTF8 with its own file name), and I need to compile them with the same master .tex file.

After that, the produced pdf file should take the .txt name (otherwise it'll overwrite the same file and at the end I´ll have only one "master.pdf"

Can it be possible, rathe than copy/paste for each one?

I'm using OSX 10.8.3, and TeXShop

closed as off-topic by Joseph Wright Aug 3 '14 at 11:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Joseph Wright
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    With a few lines of Python (comes pre-installed on the Mac) or some shell scripting this should be possible. You can also pass variable to TeX during the compiler run, e.g. to name the file to be included. How is the txt file included in the TeX code? – Uwe Ziegenhagen Apr 3 '13 at 20:32
  • 1
    See for example stackoverflow.com/questions/1465665/… – Uwe Ziegenhagen Apr 3 '13 at 20:35
  • 1
    Is there a way for you to revert the situation? I mean input the master from the children... That definitely would be easier, especially for the name of the pdf. – T. Verron Apr 3 '13 at 21:06
  • This is really a job for a shell script, which would make it off-topic for us, really, but on-topic for SuperUser. – Joseph Wright Aug 3 '14 at 11:23

Browse other questions tagged or ask your own question.