-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mac] org to pdf image absolute path not work #5517
Comments
You don't want to use For future questions, please use the pandoc-discuss mailing list instead of this issue tracker. Thanks! |
I can reproduce the problem for this syntax:
while this works as expected for me
Reopening, both variants should work. |
We currently convert a link This is not unique to org-mode. Specifying an image with schema
|
But only I guess this is the place to look: https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Class.hs#L577 |
Mauro Bieg <notifications@github.com> writes:
But only `file:///path` is a valid URL, right?
It's a valid URL, but you can't make an HTTP request
to it. I think what's happening is that pandoc is
trying to make an HTTP request since it sees it's a URL.
|
Ah, both |
Ah, both file:///path and file:/path seem to be valid, according to wikipedia.
Interesting, I didn't know. The org reader currently translates
`file:/path` into `file:///path`. It is what org does when exporting to
HTML, and the behavior is described (or hinted at) in this list here:
https://orgmode.org/manual/External-Links.html#External-Links.
|
I remove the --self-contained option, the problem is still. |
With
I wanted to play around with some function in
|
InvalidUrlException comes from Network.HTTP.Client, used by Check out this code from Text.Pandoc.Class: downloadOrRead :: PandocMonad m
=> String
-> m (B.ByteString, Maybe MimeType)
downloadOrRead s = do
sourceURL <- getsCommonState stSourceURL
case (sourceURL >>= parseURIReference' .
ensureEscaped, ensureEscaped s) of
(Just u, s') -> -- try fetching from relative path at source
case parseURIReference' s' of
Just u' -> openURL $ show $ u' `nonStrictRelativeTo` u
Nothing -> openURL s' -- will throw error If the source parses as a URI, then we use |
@peng051410 for me the following works:
|
It works for me, Thanks! and |
Reopening for the |
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
move up the pattern match to be reachable, closes jgm#5517
Move up the pattern match to be reachable, closes #5517. Previously `file:/` URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.
We need a better test that works cross-platform. Until then, removing this. Closes #5528.
when i run command
pandoc --self-contained --pdf-engine=xelatex --template=/Users/username/soft/plugin/latex/pm-template.latex -f org -t latex apollo-config-swim.org -o test.pdf
I got warn info:
[WARNING] Could not fetch resource 'file:///Users/username/github/blog/images/apollo-home-screenshot.png': PandocHttpError "file:///Users/username/github/blog/images/apollo-home-screenshot.png" (InvalidUrlException "file:///Users/username/github/blog/images/apollo-home-screenshot.png" "Invalid scheme")
org file image content:
[[file:/Users/username/github/blog/images/apollo-home-screenshot.png]]
[[/Users/username/github/blog/images/apollo-home-screenshot.png]]
these all not work!
What should i do ?
The text was updated successfully, but these errors were encountered: