Is there, somewhere, some documentation explaining what arguments TeXShop accepts when started, for example with the shell command "open" on mac os X?

My specific problem is that I would like to be able to open a pdf at a specific page with TeXShop, from a unix shell script. Does anyone know how to do that?

Thanks for any hint!

  • If only there were a way to automatically execute TeXShop's typesetter on launch :( Dec 19, 2015 at 22:43

1 Answer 1


TeXShop does not accept command line options.

The open command allows a few (run open --help), but they only allow you to do generic things like open the file without bringing TeXShop to the foreground.

Edit: The open command does accept the --args option, which allows you to pass arguments directly to any application. These arguments are passed to the application's main function. TeXShop's main function does not do anything with its arguments.

  • Thanks for the answer. May I ask how you know for sure that TexShop does not accept command line arguments? One thing that open lets you do is pass an argument to the app you're opening.
    – Baptiste
    Jul 13, 2012 at 13:25
  • I had never noticed that, but TeXShop doesn't seem to support arguments anyway. I have updated my answer. Jul 13, 2012 at 14:16
  • Thanks. Do you have a way of checking for sure that TeXShop doesn't support arguments? I mean, did you see it written officially somewhere in the documentation, or did you experiment in a conclusive way? I agree that it doesn't look like it supports such arguments, but I'd like to have a more definite answer than an impression.
    – Baptiste
    Jul 13, 2012 at 14:48
  • I quickly looked inside the source code for the obvious things (mainly argument handling code inside main.c). Of course there may be other ways to extract command line arguments. In this case, however, it is highly unlikely. Jul 13, 2012 at 15:08
  • Another argument against this type of command line argument is that TeXShop integrates with AppleScript. Even with AppleScript, there is no way to go to a certain page in the PDF, and it seems unlikely that TeXShop would expose something via a command line option and not through AppleScript. Furthermore, TeXShop includes (internally) a shell script to go to a certain source line (used with TeX's TEXEDIT variable). The shell script is just wrapped AppleScript. It would be strange if TeXShop accepted command line arguments but didn't use them in its own code. Jul 13, 2012 at 15:13

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.