Closed yitzchak closed 6 years ago
Ohhhh, this sounds really neat -- thanks for adding this, @yitzchak, I'd be happy to add this to the package! I'll take a look over the weekend 👍
Just tested this a bit and it worked great -- thanks again, @yitzchak! :bow: :zap:
@izuzak Provided I can avoid #200 in a new PR are you still willing to entertain this?
@yitzchak Of course -- sorry for not clarifying that! Definitely interested in getting that merged into the package :+1:
This PR adds basic URI handling for the atom scheme which was added in v1.23. The main purpose is to handle SyncTeX forward requests from outside Atom and to support some of the Adobe PDF style URL parameters.
Currently supported is
source
- path to TeX source file (or knitr source if patchSynctex was used).line
- line number in source filepage
- page number in PDF filenameddest
- named bookmark in PDF file.Query parameters are allowed to exist in the hash in addition to the query portion since this is the Adobe PDF usage. A hash with no parameters is assumed to be a named destination. For example
atom://pdf-view/foo/bar.pdf
opens/foo/bar.pdf
atom://pdf-view/foo/bar.pdf?source=quux.tex&line=23
opens then syncs to line 23 ofquux.tex
atom://pdf-view/foo/bar.pdf?page=2
oratom://pdf-view/foo/bar.pdf#page=2
opens page 2atom://pdf-view/foo/bar.pdf#wibble
oratom://pdf-view/foo/bar.pdf?nameddest=wibble
opens to the wibble bookmark.atom://pdf-view?path=c:\foo\bar.pdf
should also work for those that don't wan't encode file system paths like drives or UNC paths.There are more parameters listed here. I can add more if you are interested. I just added the ones that seem to me to be the most pertinent.