Closed cakebake closed 8 years ago
That's a neat idea, but it's something that would need to be implemented in https://github.com/cakebake/markdown-themeable-pdf, not here. For example, there's a package which compiles PDFs from latex documents, and supports opening those PDFs with this package: https://github.com/thomasjo/atom-latex.
Let me know if I misunderstood your suggestion. :)
My reasoning was, that my package creates PDF's and your package displays them. I do not think, that markdown-themeable-pdf should display them, that was not the aim and the focus would be lost.
As I said, it was just an idea. ;) If there would be a command like atomPdfView.show(path);
, it would be easy to trigger it from another package.
If there would be a command like atomPdfView.show(path);, it would be easy to trigger it from another package.
There already is such a command, but not in pdf-view -- it's a general command for all files:
atom.workspace.open("path/to/file.pdf")
Atom then opens the file with the correct "opener" for that file type. If you have pdf-view installed and a the file ends with .pdf
, then pdf-view's opener is triggered.
Does that explain things?
Yeah, well ... that's very awesome: D Why simple when it can be so complicated.^^
I will implement this in next version :) Thanks for the hint!!
Do you know how I can determine if an opener is registered? I could not find a suitable option ...
I don't think that's possible. Here's how that other package I mentioned is doing this:
Thank you for your help and the package pdf-view :)
I just had the idea, to open/update a PDF-file which was generated by the package cakebake/markdown-themeable-pdf with your package - if it is installed.
What do you think about?
Is there an easy way I can appeal in your code? Open from path, update view, ... :)