quarto-roughnotation icon indicating copy to clipboard operation
quarto-roughnotation copied to clipboard

Highlighting code

Open kcarnold opened this issue 2 years ago • 0 comments

Has anyone gotten this working for marking up parts of code on slides somehow?

It's tricky because you can't easily add CSS spans to code blocks.

Maybe someone has figured out a way to use existing tooling to do this. But if not, here are some ideas I've had, none of them fleshed out enough:

Special comment for line below

# rn: print(...)
print("Hello")

Special comment for current line

print("Hello") # rn:"Hello"

or # rn:\"H.*o\" (regex)

cell option

```{.python .rn="\"Hello\""}

or

```{python}
#| rn: "Hello"
print("Hello"
```

kcarnold avatar Sep 30 '23 15:09 kcarnold