-
Notifications
You must be signed in to change notification settings - Fork 331
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
echo and output options not working in manuscript companion notebooks #8680
Comments
Glad you're taking manuscripts out for a spin - thanks for taking the time to open this!
I'd be curious to hear about how you're envisioning using them and how you see controlling the cell options would be useful if you don't mind sharing a bit? |
Thanks for getting back to me so quickly! The idea of a companion that shows code and outputs makes total sense. The problem I'm running into is that sometimes things can get noisy. I'd love to be able to selectively silence the output of certain cells to quiet them down. I could see a use case for supporting block-level echo in companion notebooks too: the "production" code you use to generate results that you embed in the article table could feature uninteresting, technical throat-clearing at the beginning, like talking to an API, and you may want the companion notebook to be friendlier to readers, so you may want to hide certain things. Going further, I could see companion notebooks replacing methodology sections if they supporting toggling the code on and off: you would walk people through your analysis step by step, and people who can't read the code could follow along anyway. Another use case for code toggling might be adding an "exploratory data analysis" notebook that does further analysis that doesn't get embedded into the main report (a use case that is theoretically supported now), but you want this supplemental analysis to be consumable by people without having to read the code. |
@jpvelez Could you edit your post to share code as plain text? Screenshots cannot be read by screen readers (and you did not set a meaningful alternative text), code from screenshots cannot be copied, etc. 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 it is absolutely required to have multiple files), please share as a Git repository. ````qmd
---
title: "Reproducible Quarto Document"
format: html
engine: knitr
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
![A placeholder image](https://placehold.co/600x400.png)
The end.
```` Additionally and if not already given, please share the output of |
The behavior mentioned, that cell options are not respected in companion notebooks, can be reproduced when rendering the example from the docs with either the current stable or pre-release. But the re-rendered version looks like: Adding other options like The rendered version of the article notebook is correct, though. Other than that, it's a blast to work with quarto manuscripts, thanks for that! Additional info: (base) marius@host:~/Documents/manuscript-template-vscode$ quarto check
Quarto 1.5.16
[✓] 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.5.16
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.16 (Conda)
Path: /home/marius/micromamba/bin/python
Jupyter: 5.3.0
Kernels: python3, julia-1.9, inversion_dev.venv, julia-1.8
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /usr/lib/R
LibPaths:
- /home/marius/R/x86_64-pc-linux-gnu-library/4.3
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: (None)
rmarkdown: (None)
The knitr package is not available in this R installation.
Install with install.packages("knitr")
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown") |
It is currently going to be difficult to make per-cell options for Ideally, there would be a version of this that would have the benefit of the all code being present and transparent, but not being distracting or confusing to readers (if this isn't already enough). |
One possibility is to use |
@udurraniAtPresage For the |
Hi there,
Very excited about the new manuscript project type. I think I may have encountered a bug, however. I have a
companion.qmd
file with R code sitting alongsideindex.qmd
. When I render the project with knitr and viewindex.html
, the companion notebook is automatically displayed in the "Notebooks" section of the sidebar of my renderedindex.md
. So far, so good.The problem is that
output: false
notecho: false
incompanion.qmd
don't appear to be working, either in the YAML header or within individual code blocks. I set them to false and both the code and the code output still appear in the renderedcompanion.html
file. (Note that this file has a blue bar at the top that says "Back to Article", it isn't rendered separately.)output
andfalse
options work just fine in theindex.md
article, however. I'm using quarto version 1.4.549, using the VSCode extension (though I doubt that matters).Apologies is if this is posted in the wrong repo! Would love any help I can get.
The text was updated successfully, but these errors were encountered: