quarto-dev / quarto-dev/quarto-cli

Embedded notebook cells do not show source references in book format

Offen
#8,151 7 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

books embed enhancement
Vorherrschende Sprache
JavaScript
Sterne
6k
Forks
458
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
41

Beschreibung

Bug description

The embedded notebook cell feature does not produce source links to the notebook when used in book format. I would have expected this feature to work in book format, too - at a minimum, when the book output format is HTML (though it may apply to other formats, too, as long as the notebook is included in the book somewhere).

I can see situations where the book includes code snippets along the way with the entire notebook available in the appendix, and having the ability to click through to the entire notebook would be awesome.

This does not seem to be controlled by notebook-links or notebook-view settings - changing them has no impact.

Steps to reproduce

Embed a cell from a notebook foo.ipynb into a document using shortcode:

{{< embed foo.ipynb#foo >}}

Expected behavior

The rendered page should include both the content of the notebook cell as well as a source reference to it.

Actual behavior

The rendered page only includes the content of the notebook cell.

Your environment
  • IDE: VSCode
  • Quarto version: 1.4.537
  • WSL 2 with Ubuntu
Quarto check output

Quarto 1.4.537
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.537
Path: /opt/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/aurimas/.TinyTeX/bin/x86_64-linux
Version: 2021

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.11.5 (Conda)
Path: /home/aurimas/micromamba/envs/confluence/bin/python
Jupyter: 5.3.2
Kernels: bsfinal, gp-processes, idendro, pymc3, bayes, python3, ncr, homecourt, pymc4, julia-1.9, cse6242hw4, ir, css, julia-1.6, bayesian, anaconda-real, strongarm, cse6242project, pdfparser

Traceback (most recent call last):
File "/opt/quarto/share/jupyter/jupyter.py", line 21, in
from notebook import notebook_execute, RestartKernel
File "/opt/quarto/share/jupyter/notebook.py", line 14, in
from yaml import safe_load
ModuleNotFoundError: No module named 'yaml'
[✓] Checking Jupyter engine render....OK

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Use the embed foo.ipynb#foo shortcode as the reproduction entry point and compare its behavior in an HTML book while checking whether notebook-links or notebook-view affects the result. Done means the rendered cell includes a source reference to the notebook when that notebook is included in the book.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, jupyter
Bereich
documentation
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.