10

Some time recently (possibly with the Ventura upgrade; I'm not sure) quicklook behaviour got worse.

In particular, *.tex (TeX/LaTeX) files stopped previewing entirely; instead they show a message

The extension com.apple.tips.TipsAppQuicklook-macOS does not implement file previews

which seems to be weirdly trying to assign the quicklook to something related to "Tips".

I note

  • ~/Library/Application\ Scripts/com.apple.tips.TipsAppQuicklook-macOS exists, but it is an empty folder.
  • mdls -name kMDItemContentType <path to a *.tex file> gives kMDItemContentType = "org.tug.tex"
  • I think the previews used to be handled by TextMate which also showed full syntax-highlighted previews. TextMate still has an org.tex.tug entry in its Info.plist.
  • Preview icons are still shown correctly.
  • Most other text file types seem to work, albeit without syntax highlighting, with an "Open with some app" button on the top of the preview window, pointing to TextEdit, Xcode, Textmate, or even Emacs depending on the file type. (Emacs files seem to get syntax highlighting?!)
  • org.tug.tex does not appear in qlmanage -m plugins, although org.tug.tex.bibtex and org.tug.tex.dvi do.
  • There is no ~/Library/QuickLook directory.
  • I have tried qlmanage -r, qlmanage -r cache and a restart, to no avail.

Other people have similar problems, as seen on tex.SE

Update: This Apple support forum thread seems to have some more information. It implies that Apple has deprecated old quick look generators, but I don't think that this can be the whole problem, since it seems to work -- including via TextMate -- for some types.

Update 2: not fixed in 13.1, alas.

Update 3: This app seems to work as a quicklook previewer for a wide variety of file types, including TeX and CSS. (Thanks to this answer on the related thread.)

Any ideas?

5
  • 1
    I have the same problem to see the file content without opening the TeXShop application I am using otherwise. The funny thing is, that for pdf-files or djbu-files it is working. Have you contacted the apple support? I will do this.
    – Ulrich
    Commented Nov 13, 2022 at 7:41
  • This Apple support forum thread seems to have some more information (but is confused about preview vs quicklook, I think). Commented Nov 13, 2022 at 8:59
  • 1
    I went over the discussion. There was one comment, which describes everything correctly. And more or the less, all other missed the point: pressing the space bar gives the content of the tex-file in the past. Ans it is working, if I change tex to text. But this is not the solution. So let's wait.
    – Ulrich
    Commented Nov 14, 2022 at 12:35
  • 1
    My guess is that Apple may have created a Tips filetype with extension .tex, or implemented QuickLook support for such a filetype that already existed, without realising that QuickLook support would conflict with LaTeX files. Either way I would report this to Apple as a bug that they should fix. Commented Nov 15, 2022 at 17:39
  • @RusticChevalier the strange thing is that it isn't limited to *.tex. Some other text-like files (e.g., *.css, which is much more common than *.tex) exhibit very similar behaviour, at least on my machine. Commented Nov 15, 2022 at 18:09

2 Answers 2

3

So I have a sort-of answer to my own question.

First the app at https://github.com/sbarex/SourceCodeSyntaxHighlight seems to fix it for me by explicitly providing quicklook for many types of text source files (perhaps too many!)…

However, after installing it and then uninstalling it as a test, the “TipsAppQuicklook” message seems to go away for some — but not all! — file types, but still without actually showing the preview window.

Having noticed this behaviour after deleting the syntax highlighter app, I tried some more deletions. First, I deleted TextMate. Still no preview, but the button changed from "Open with TextMate" to "Open with TeXShop". So I deleted TeXShop. And then... it worked (i.e., unhighlighted full window preview with an "Open with Bbedit" button)!

But I still wanted TextMate, so I reinstalled it (and TeXShop, although I really don't use it) and... it still worked! It still had "Open with BBedit" but I was able to change that with the "Get Info" dialog. It's not perfect: no syntax highlighting, and css files still don't show a preview, and it seems to be brittle regarding opening with BBEdit vs TextMate, which seems to sometimes cause it revert to the bad behaviour, but it might be an adequate solution (though I may actually go back to the new syntax-highlight app).

Clearly there is some dependence of all of this on the order of installation of the applications and how they register their capabilities which can result in clashes. I wonder if it's documented anywhere and if there are less sledgehammery ways to change how it works....

1
  • That's curious, I had another issue where TexShop registered itself as a handler of Markdown files. I had to use the lsregister tool to find that out, and could also use it to reset my file associations (preventing me from re-installing TexShop). Perhaps that same tool can help in finding a sledgehammery way of working. Commented Dec 14, 2022 at 14:04
0

Quicklook seems to be bound to whatever application you have set as default for that Filetype (for me in Sonoma).

After setting TextEdit as default (through Open With / Other / Always open with), Quicklook is working fine again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .