statisticsLab icon indicating copy to clipboard operation
statisticsLab copied to clipboard

Cool margin notes

Open stephengv opened this issue 7 years ago • 3 comments

What is the markdown syntax for those nifty margin notes you do Matt? I haven't found them on any of the cheat sheets I've been using.

stephengv avatar Aug 02 '18 23:08 stephengv

Aaa, that is actually not markdown, probably why you can't find it.

here's the syntax:

  <div class="marginnote">
  Anything you put in here goes into the margin note
  </div>

This will work when your markdown is in the .rmd files for the bookdown book. What's going on is that I added a .css style file (tufte.css). This recognizes the marginnote class, and set's the page up to render the margin note.

If you just put in the above without having the tufte.css, then it won't work.

If you have forked this repo, and are building your chapters by compiling the book on your end with bookdown, then it should work.

Haven't tried this, but you should be able download the tufte.css from this repo, then load it up in the yaml of your rmarkdown, and that might work. But, I'm not sure how it plays with all the other css styling for the rest of the book.

CrumpLab avatar Aug 02 '18 23:08 CrumpLab

the syntax didn't come through on this comment. I'm not seeing anything between "syntax:" and "Anything you put in here"

I have been writing is standalone rmds, and I've spent WAY to much time down the rabbit hole of learning both markdown and latex mathy stuff, so I am not going to try to get the margin notes working on my end (for now), but I will mark them as easily searchable "MARGIN NOTES" so we can go in later when everything is integrated. Markdown is fun.

stephengv avatar Aug 02 '18 23:08 stephengv

The syntax was in an html div object I guess github tried to render it as html. I put in a code block to the original comment, should be able to see it now.

Sent with GitHawk

CrumpLab avatar Aug 03 '18 01:08 CrumpLab