Skip to content
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

Problem with remote images when converting to latex/pdf (works with pandoc but not with quarto) #4443

Closed
4 tasks done
gdurif opened this issue Feb 21, 2023 · 5 comments
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@gdurif
Copy link

gdurif commented Feb 21, 2023

Bug description

Problem:

When including a remote image (from a web URL) inside a (q)md file, the rendering to latex/pdf with quarto fails, but works just fine when directly using pandoc.

Minimum working example:

File issue_remote_image.qmd:

---
title: Test using a remote image in a markdown file
author: John Doe
format:
  pdf
---

Here is the image:

![](https://quarto.org/quarto.png)

Rendering to pdf with pandoc works just fine (and the pdf contains the remote image):

$ pandoc --from=markdown --to=pdf -o issue_remote_image.pdf issue_remote_image.qmd

but rendering with quarto fails:

$ quarto render issue_remote_image.qmd                                            
pandoc 
  to: latex
  output-file: issue_remote_image.tex
  standalone: true
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf
  
metadata
  documentclass: scrartcl
  classoption:
    - DIV=11
    - numbers=noendperiod
  papersize: letter
  header-includes:
    - '\KOMAoption{captions}{tableheading}'
  block-headings: true
  title: Test using a remote image in a markdown file
  author: John Doe
  
running xelatex - 1
  This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022/Arch Linux) (preloaded format=xelatex)
   restricted \write18 enabled.
  entering extended mode
  

compilation failed- missing packages (automatic installed disabled)
Unable to load picture or PDF file 'https://quarto.org/quarto.png'.
<to be read again> 
                   }
l.156 ...degraphics{https://quarto.org/quarto.png}
                                                   

see issue_remote_image.log for more information.

The problematic line in the generated issue_remote_image.tex is the following:

\includegraphics{https://quarto.org/quarto.png}

And I face a similar problem when forcing to use lualatex as pdf engine with the yml directive pdf-engine: lualatex.

Config:

OS: ArchLinux 6.1.11-arch1-1

$ quarto -V
1.2.335
$ quarto pandoc --version
pandoc 2.19.2
Compiled with pandoc-types 1.22.2.1, texmath 0.12.5.2, skylighting 0.13,
citeproc 0.8.0.1, ipynb 0.2, hslua 2.2.1
Scripting engine: Lua 5.4
$ pandoc --version
pandoc 3.0.1
Features: +server +lua
Scripting engine: Lua 5.4

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
@gdurif
Copy link
Author

gdurif commented Feb 21, 2023

Note: issue is fixed with nightly build v1.3.211

@dragonstyle
Copy link
Collaborator

Ah this is good to know- I was just testing and couldn't reproduce it locally. This is expected behavior as prior to Quarto 1.3 we didn't support remote images in PDFs, but we introduced this support starting in Quarto 1.3.

@gdurif
Copy link
Author

gdurif commented Feb 21, 2023

Thanks @dragonstyle

Do you know when is planned v1.3+ release ?

@dragonstyle
Copy link
Collaborator

We are starting the stabilization process for it soon, but I'd say it is still a couple months until it is fully released.

@gdurif
Copy link
Author

gdurif commented Feb 22, 2023

Ok, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants