-
Notifications
You must be signed in to change notification settings - Fork 339
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
Quarto figures documentation doesn't include include_graphics() #12041
Comments
Why would Quarto demonstrate this? And why are you referencing a thread older than quarto itself? There is no need for What is your issue exactly? Footnotes
|
To show how to use variable images paths. I am trying to create a report that has a variable image. I want to assign the image path to a variable rather than use a hard coded image. |
You need to understand what the function does and emits, and how paths work. Quarto uses:
So if you generate the markdown for the images (which is what the function does), you need to emits the right paths. |
Ahhh, that is producing the correct markdown, so title: "Untitled"
|
I can't help you without a reproducible example of your setup. Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.
Additionally and if not already given, please share the output of |
I have created a repository here: https://github.com/nspyrison/quarto_test quarto check: C:\Users\spyri\Documents\R\quarto_test>quarto check
A new release of Deno is available: 1.28.2 → 2.1.9 Run `deno upgrade` to install it.
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450
Path: C:\Program Files\RStudio\resources\app\bin\quarto\bin
CodePage: 1252
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.9.12 (Conda)
Path: C:/Users/spyri/anaconda3/python.exe
Jupyter: 4.9.2
Kernels: python3
(\) Checking Jupyter engine render....Traceback (most recent call last):
File "C:\Users\spyri\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\spyri\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\spyri\anaconda3\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\spyri\anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 22, in <module>
from IPython.core.application import (
File "C:\Users\spyri\anaconda3\lib\site-packages\IPython\__init__.py", line 52, in <module>
from .terminal.embed import embed
File "C:\Users\spyri\anaconda3\lib\site-packages\IPython\terminal\embed.py", line 15, in <module>
from IPython.core.interactiveshell import DummyMod, InteractiveShell
File "C:\Users\spyri\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 73, in <module>
from IPython.core.history import HistoryManager
File "C:\Users\spyri\anaconda3\lib\site-packages\IPython\core\history.py", line 11, in <module>
import sqlite3
File "C:\Users\spyri\anaconda3\lib\sqlite3\__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "C:\Users\spyri\anaconda3\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.
Kernel died before replying to kernel_info
[>] Checking Jupyter engine render....OK |
Paths need to be relative to the document. See my previous comment #12041 (comment) |
Thanks for the example repo. By default, So the intermediate md file contains the following from cell output {width=126} Which is correct relative path for your document. This will be rendered in HTML to
which is expected output. However, you are working on a single document render. No And this
Now without re-running I hope this clarifies. To summarize, you are trying to use project structure with relative path pointing to parent directory. So you should leverage Quarto project. Just adding project:
type: default will make Hope this helps understand the situation. |
What would you like to do?
Report an issue on quarto.org
Description
https://quarto.org/docs/authoring/figures.html does not demonstrate knitr::include_graphics().
Please add a working example.
knitr::include_graphics() isn't rendering causing an unexpected amount of trouble, including:
https://stackoverflow.com/questions/47155042/knitrinclude-graphics-in-bookdown-is-not-rendering-the-image
#3245
The text was updated successfully, but these errors were encountered: