tufte
tufte copied to clipboard
Parsing margin_notes with pandoc or prevent chunk paragraph
According to the documentation non-simple marginnotes should be set as a marginfigure
chunk since markdown will parse the chunk content correctly. Thus if I have a piece of code that - in "default Tufte" - would read something like this
yada yada yada yada. `r margin_note("For example root mean squared error $\sqrt{\frac1n \sum_{i=1}^n (\hat y_i - y_i)^2}$")` yada yada yada yada
then I replace it with
yada yada yada yada.
```{marginfigure}
For example root mean squared error $\sqrt{\frac1n \sum_{i=1}^n (\hat y_i - y_i)^2}$
```
yada yada yada yada
However, a new paragraph is inadvertently introduced when the marginfigure
chunk is used in the middle of the paragraph. I would like the text to run continunously
yada yada yada yada yada yada yada yada
with the math in the right-hand column. Is that at all possible? Or can I allow pandoc to parse the content of margin_note()
?
I'm afraid that is not possible for now. Sorry.
No worries. Was just wondering if it would be possible to tweak it somehow. Want me to leave it open or just close it?