(Yep. As I've mentioned, a Quick Look–style approach is what we'd implement or accept as a patch in Zotero itself. I suspect most non-Mac users (and, as evidenced in that thread, some Mac users as well) just aren't familiar with how it works.)
Thank you @dstillman for your clarification! I'm a big fan of the QuickLook plugin before I develop this PDF Preview plugin, and I still use Quick Look outside Zotero to preview files. As a Windows user, space-to-preview is really convenient. I'm happy to know Zotero supports the space to preview on Mac now(I don't have a Mac).
However, the QuickLook has poor performance on Windows, at least for me. That's why I tried to find another solution for previewing items in Zotero, which turned out to be this plugin later.
I think users could take advantage of both preview solutions. If you want to use the space-to-preview, there are already some solutions, for both Mac and non-Mac users, as @dstillman pointed out. And that's why I might not do the space-to-preview in this plugin, @damonturney.
I'm really happy that my spare time work could be loved by so many Zotero users~
BTW, could @dstillman please add this plugin to the official plugin page? Sorry I've requested too much recently.
For ~6 months (after Zotero 6 came out) there was no solution. It seems 1.5 months ago somebody forked Quicklook and fixed it to work in Zotero 6. I just learned about this new fix today, and link to it here: https://github.com/beaugunderson/ZoteroQuickLookNG
@damonturney That would be a solution to the space-to-preview. Nice! I have not used QuickLook since Zotero6. I found that Quicklook can’t display the annotations and inks inside Zotero, which is definitely a great shortage. The preview with annotations can only be done in Zotero.
To clarify, I wasn't saying Zotero supports space-to-preview now — I was just saying that's what we would implement or accept a patch for as a PDF-previewing solution. I wasn't aware that someone had updated the QuickLook plugin for Zotero 6 (on macOS). That's great, but as you say, that doesn't show annotations. Ideally we'd incorporate similar functionality using the built-in PDF reader rather than the system qlmanage binary (and do it in a cross-platform manner).
I have just noticed a small problem with the plugin. When there are multiple PDF files attached to an item, Zotero has some way to decide which PDF file is the "main" PDF file. It is the PDF file that will be opened when you double click on the item. In some cases, that "main" PDF file is not the first one listed as child item. It seems that the current behaviour of the plugin is to give a preview of the first PDF file listed instead of the "main" PDF file. Showing a preview of the "main" PDF file would be more consistent with the double click behaviour, if it is possible to get the information of "main" PDF file from Zotero.
Following the comments above, I just want to say that the current preview in a split-pane below the Info tab is what works best for me. For my personal workflow, the main purpose of navigating through my library is to have a quick overview of what is in each item, and the PDF files are as important as the metadata. From that perspective, I just want to see the preview always open at the same level as the metadata. For this usage, I do not want the preview to cover any other information in the main Zotero window. So having the preview in a fixed pane, which can be shown or hidden with a shortcut, is the best way to integrate the preview without covering any other information. In this way, I still keep full access to all the features in Zotero together with the preview.
For me, the main point of the preview is just to see quickly what is the content of the file attached to the item. It is really nice to always have a visual information on the item with the preview always opened. It can also be used, for example, to help me see if I only have the preprint or the final published version of an article. Or find quickly a paper in a collection, for which I have visual memory of what it looks like, but cannot remember the exact metadata to search for. For these purposes, the split-pane preview does that job perfectly. I can simply hide it when I don't need it. I just want to get the information directly in the side pane, without having to make the extra effort to open the preview in a separate window. If the preview was not integrated within the main Zotero window, it would probably be much more difficult identify some of the problems of the PDF files that can be spotted easily with the side pane preview.
On my screen, the preview in the split-pane does not cover any metadata from the Info pane. And when the empty metadata will be hidden, there will be plenty of space left for the preview. In most cases, I can already display the most important metadata in the main library pane, so I could also use the side pane tab to benefit from the larger preview if I want to focus on the PDF content.
For me, any other job that requires a larger view of the PDF file will always be specific to that file, so I prefer opening the PDF file in the Zotero PDF viewer. In these cases, the shortcuts Enter (to open in a new tab) or Shift + Enter (to open in a new window) already do the job nicely.
The preview in a separate window would still be nice I think. I would mostly use it to show the preview on another monitor to be more comfortable. It would be interesting also to learn some other workflows and practical usages for which the separate window preview would be better than the side pane preview (with shortcut). Anyway, the two different previews will probably be nice to have for different workflows. So thanks again to @hsiangyu_wong and to the Zotero team!
Hello hsiangyu, thanks for your great work. I really enjoy it!
A somehow related issue here: can markdown file be previewed (and even edited) in the sidebar? Currently single click the markdown attachment won't show anything in the sidebar.
While Zotero already allows the users to export notes as markdown files, one might want to write with her favorite markdown editor and view it in Zotero. I wonder if this could be made possible via similar techniques?
Are there any Zotero preview plugins for files that are not PDF for example, a web based article, a journal, a book or if there are plans for one to be created? The PDF preview feature is great, however without the plugin Zotero has made something similar already with the new update. files that are not solely PDF would be a great plug-in feature that I would support!!
However, the QuickLook has poor performance on Windows, at least for me. That's why I tried to find another solution for previewing items in Zotero, which turned out to be this plugin later.
I think users could take advantage of both preview solutions. If you want to use the space-to-preview, there are already some solutions, for both Mac and non-Mac users, as @dstillman pointed out. And that's why I might not do the space-to-preview in this plugin, @damonturney.
I'm really happy that my spare time work could be loved by so many Zotero users~
BTW, could @dstillman please add this plugin to the official plugin page? Sorry I've requested too much recently.
https://github.com/beaugunderson/ZoteroQuickLookNG
That would be a solution to the space-to-preview. Nice!
I have not used QuickLook since Zotero6. I found that Quicklook can’t display the annotations and inks inside Zotero, which is definitely a great shortage. The preview with annotations can only be done in Zotero.
To clarify, I wasn't saying Zotero supports space-to-preview now — I was just saying that's what we would implement or accept a patch for as a PDF-previewing solution. I wasn't aware that someone had updated the QuickLook plugin for Zotero 6 (on macOS). That's great, but as you say, that doesn't show annotations. Ideally we'd incorporate similar functionality using the built-in PDF reader rather than the system qlmanage binary (and do it in a cross-platform manner).
It seems that the current behaviour of the plugin is to give a preview of the first PDF file listed instead of the "main" PDF file. Showing a preview of the "main" PDF file would be more consistent with the double click behaviour, if it is possible to get the information of "main" PDF file from Zotero.
Following the comments above, I just want to say that the current preview in a split-pane below the Info tab is what works best for me.
For my personal workflow, the main purpose of navigating through my library is to have a quick overview of what is in each item, and the PDF files are as important as the metadata. From that perspective, I just want to see the preview always open at the same level as the metadata. For this usage, I do not want the preview to cover any other information in the main Zotero window. So having the preview in a fixed pane, which can be shown or hidden with a shortcut, is the best way to integrate the preview without covering any other information. In this way, I still keep full access to all the features in Zotero together with the preview.
For me, the main point of the preview is just to see quickly what is the content of the file attached to the item. It is really nice to always have a visual information on the item with the preview always opened. It can also be used, for example, to help me see if I only have the preprint or the final published version of an article. Or find quickly a paper in a collection, for which I have visual memory of what it looks like, but cannot remember the exact metadata to search for. For these purposes, the split-pane preview does that job perfectly. I can simply hide it when I don't need it. I just want to get the information directly in the side pane, without having to make the extra effort to open the preview in a separate window. If the preview was not integrated within the main Zotero window, it would probably be much more difficult identify some of the problems of the PDF files that can be spotted easily with the side pane preview.
On my screen, the preview in the split-pane does not cover any metadata from the Info pane. And when the empty metadata will be hidden, there will be plenty of space left for the preview. In most cases, I can already display the most important metadata in the main library pane, so I could also use the side pane tab to benefit from the larger preview if I want to focus on the PDF content.
For me, any other job that requires a larger view of the PDF file will always be specific to that file, so I prefer opening the PDF file in the Zotero PDF viewer. In these cases, the shortcuts Enter (to open in a new tab) or Shift + Enter (to open in a new window) already do the job nicely.
The preview in a separate window would still be nice I think. I would mostly use it to show the preview on another monitor to be more comfortable.
It would be interesting also to learn some other workflows and practical usages for which the separate window preview would be better than the side pane preview (with shortcut).
Anyway, the two different previews will probably be nice to have for different workflows. So thanks again to @hsiangyu_wong and to the Zotero team!
A somehow related issue here: can markdown file be previewed (and even edited) in the sidebar? Currently single click the markdown attachment won't show anything in the sidebar.
While Zotero already allows the users to export notes as markdown files, one might want to write with her favorite markdown editor and view it in Zotero. I wonder if this could be made possible via similar techniques?
@Qcloud1223 We can do that. However, I don't have much time recently. Welcome any PR!
It is working nicely now.
Enormous gratitude to its creator, @hsiangyu_wong!!!
But it won't be difficult to implement. Welcome PR!