tufte icon indicating copy to clipboard operation
tufte copied to clipboard

Parsing margin_notes with pandoc or prevent chunk paragraph

Open ekstroem opened this issue 7 years ago • 2 comments

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()?

ekstroem avatar Nov 26 '16 22:11 ekstroem

I'm afraid that is not possible for now. Sorry.

yihui avatar Dec 06 '16 04:12 yihui

No worries. Was just wondering if it would be possible to tweak it somehow. Want me to leave it open or just close it?

ekstroem avatar Dec 06 '16 09:12 ekstroem