File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
docs/manuscripts/authoring Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -208,15 +208,29 @@ avg_years_between_eruptions
208208```
209209:::
210210
211- ::: {.content-visible unless -meta="tool.is_rstudio "}
211+ ::: {.content-visible when -meta="tool.is_jupyterlab "}
212212You can also use computed values directly in your article text by using inline code. Read more in [ Inline Code] ( /docs/computations/inline-code.qmd ) .
213213:::
214214
215215::: {.content-visible when-meta="tool.is_rstudio"}
216- You can use computed values directly in your article text using the syntax `` `r expr` `` . For example, consider this line in ` index.qmd ` :
216+ You can use computed values directly in your article text using the syntax `` `{{r}} expr` `` . For example, consider this line in ` index.qmd ` :
217+
218+ ``` markdown
219+ Based on data up to and including 1971, eruptions on La Palma happen every `{{r}} round(avg_years_between_eruptions, 1)` years on average.
220+ ```
221+
222+ When rendered, it displays as:
223+
224+ > Based on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.
225+
226+ You can read more about using code inline at [ Inline Code] ( /docs/computations/execution-options.qmd#inline-code ) .
227+ :::
228+
229+ ::: {.content-visible when-meta="tool.is_vscode"}
230+ You can use computed values directly in your article text using the syntax `` `{{python}} expr` `` . For example, consider this line in ` index.qmd ` :
217231
218232``` markdown
219- Based on data up to and including 1971, eruptions on La Palma happen every `r round( avg_years_between_eruptions, 1) ` years on average.
233+ Based on data up to and including 1971, eruptions on La Palma happen every `{{python}} f"{ avg_years_between_eruptions:.1f}" ` years on average.
220234```
221235
222236When rendered, it displays as:
You can’t perform that action at this time.
0 commit comments