zyedidia / Literate

A literate programming tool for any language
https://zyedidia.github.io/literate/
Other
662 stars 45 forks source link

Proposal: Tufte CSS #5

Open BorisKourt opened 8 years ago

BorisKourt commented 8 years ago

What do you think about using this project: Tufte CSS as the base CSS setup? (Their Demo.)

I edited together a super rough view of what it would look like for Literate: on codepen. Just without syntax highlighting.

I can give a stab at adjusting the current HTML and CSS setup.

I think the main pro would be the clean margin notes that can hold some of the metadata that is currently below the code blocks. As well as a refined responsive design and print view.

I've also adapted their setup before for a basic static site generator, so I know my way around the markup (although it is minimal.)

Alternatively I can make an attempt at opening up the way markup is generated by Literate to allow for broader formatting changes?

zyedidia commented 8 years ago

This looks like it could be nice. I am a bit concerned about the external fonts that it uses. I want to be able to only generate one file when weaving (the html file) and have that file work online and offline. It would be best if somehow we could include the fonts inside the html file.

I think the margin notes could be really useful for the metadata around codeblocks as you mentioned. One of the complaints about Literate that I've heard is that there is too much overhead there. Tufte also gives much more of a book feeling, which I think is good.

If you want to look at changing the way markdown is compiled to html in Literate, this is the repository for the markdown compiler.

BorisKourt commented 8 years ago

I will take a look at the MD compiler. And agree about the fonts.

It doesn't look bad without them, so including them could be left as an option for the end user?

zyedidia commented 8 years ago

It also seems to not print to pdf so well (the font seems too big). It might be best to use Tufte as inspiration for some css changes, but not completely rely on it for the css. We could remove the rectangles around codeblocks, change the fonts, and use an off white background (and also change the colorscheme css to fit that better).

BorisKourt commented 8 years ago

I am going to see if I can propose a few adjustments to their print styles, I am sure that they would be receptive. It can be useful to be able to rely on their future updates (although there may be few) as there is already a lot of work in there.

But I do a agree that we can just make some adjustments to the current Literate stylesheet based on their work.