8

I’m still looking for the solution to a question asked in 2010: Under Mac OS X, but staying compatible with other operating systems, I want to hide the mechanics. Please note: I do not want to delete the helper files after the job is done and I do not want to attach them to the PDF either!

A *TeX project should appear as a single file in the Finder, despite its many temporary and auxiliary actual files. It would either open the associated PDF for Quick Look (incl. icon), viewing and printing or the main .tex for compilation or all .tex files for editing. It would still maintain transparent file access for terminal applications. The concept is called either bundle or package in OS X.

Doing this should require only few things that a script or small app should be able to automate:

  • Append .texp or .texd to the folder name (as introduced by Jérôme Laurens for iTeXMac). This is the only change the *tex programs would face.
  • Generate and add at least one .plist file – Info.plist? –, possibly keep it up to date.
  • Adhere to and maintain a certain file and folder structure within.

Several steps would be nice to have, too:

  • Hack the Info.plist of TeXShop (or what-have-you) to claim edit support for the two aforementioned file extensions, and Preview for viewing.
  • Actually make TeXShop support bundles, i.e. no longer store metadata in comments like % !TEX encoding = UTF-8 Unicode or % !TEX TS-program = XeLaTeX or % !BIB TS-program = biber or % !TEX root = main.tex.
  • Store a local copy of all classes and packages used to compile, but only use this if asked to.
  • Revive the texwrapper project, it’s such a good idea.

A recent, closed question suggests – or at least commenters there assume – that such bundles would be used parallel to the actual development version; this is not the case!

Crissov
  • 1,866
  • 1 But I think it might be helpful if you clarify how this is distinct from the 2010 question that you linked to. If there is no distinction, then it seems likely that this will just be marked as a duplicate.
  • – Adam Liter Dec 20 '13 at 01:45
  • 2
    I think the difference is that Debilski asked how this could be done and I’m asking whether someone has already done or would do it with a script or app, even if it’s (still) not natively supported in frontends. – Crissov Dec 20 '13 at 09:43
  • One of the best features of Mac OS X is the quick preview (by pressing space-bar on a file you can preview it's content without opening it in proper application).

    Do you think if you bundle the files, you still will be able to have this feature to quick preview the pdf?

    – Pouya Dec 20 '13 at 10:53
  • Yes, absolutely. Bundles can specify a file (e.g. thumbnail) to be used for Quick Look. – Crissov Dec 21 '13 at 19:42
  • 1
    Why would the TeX programmes need to deal with the directory name? I mean, underneath, it is just a directory - that's what all OS X bundles look like to command line tools. So why would they need to accommodate any change at all? – cfr Dec 22 '13 at 19:56
  • It wouldn't be that difficult to implement most of this functionality in a (suite of) script(s). – You Dec 22 '13 at 20:02
  • Yes, cfr, only the Mac OS X front ends to latex etc. might need changes, not the compilers themselves. Nobody claimed more. – Crissov Dec 23 '13 at 09:21