Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/docs/consistency-checks/observable-ref.qmd
3562 views
---
title: "Quarto OJS Cell Attribute Implementation Reference"
format:
  html:
    keep-md: true
    code-background: true
---

I thought `output: false` would suppress the output, but no? `echo: false` does it.

```{ojs}
//| echo: false

import {text} from '@jashkenas/inputs'

viewof name = text({
  title: "what's your name?",
  value: ''
})
```

## `label`

```{ojs}
//| label: python-label-1
name
```

**(Python Bug?) This appears to break with long labels:**

```{ojs}
//| label: python label 2
name
```

### `fig-cap`

```{ojs}
//| label: fig-caption-test
//| fig-cap: A caption for the figure
name
```

**(Styling Bug?) Centering of images appears inconsistent depending on whether they have captions?**

### `fig-subcap`

```{ojs}
//| label: fig-subcap-test
//| fig-cap: Big caption
//| fig-subcap: 
//|   - Caption 1
//|   - Caption 2
name + " 1"
name + " 2"
```

**(Python Bug?) Sub-captions don't show up unless `fig-cap` is also there:**

```{ojs}
//| fig-subcap: 
//|   - Caption 1
//|   - Caption 2
name + " 1"
name + " 2"
```

### `code-fold` and `code-summary`

**(Inconsistency?) The R engine sets fold and summary for both the outer and inner div; The Python engine only forwards it to the inner div.**

Fold:

```{ojs}
//| code-fold: true
name
```

Summary:

```{ojs}
//| code-summary: "some text"
name
```