UBC-DSCI / introduction-to-datascience-python

Open Source Textbook for DSCI100: Introduction to Data Science in Python
https://python.datasciencebook.ca
Other
13 stars 9 forks source link

Code fence boxes for data should have `code` tag #58

Closed trevorcampbell closed 1 year ago

trevorcampbell commented 1 year ago

In certain places in the text, we load dataframes and typeset them in code fences. But if we just use ``` as the first fence, the box will get code-like syntax highlighting (which isn't desirable for data frames). We need to look through the book and make sure code fences for data frames start like ```code (which, unintuitively, typesets without syntax highlighting). I am fixing this in Ch 1 and 2 as part of #48 and #49 but we should do a global pass after polish round is done.

joelostblom commented 1 year ago

I think we can also use text instead of code if we want it to be more semantically intuitive (but not difference in output I believe)

trevorcampbell commented 1 year ago

I tried text (that was the obvious choice) and it didn't work! Still weird syntax highlighting. If text indeed works, I would prefer it.

(maybe this was in a flurry of activity and I wasn't paying enough attention to the build though...)

trevorcampbell commented 1 year ago

As a side note, jupyterbook spits out a warning that it doesn't understand code tag -- which is why you don't get any syntax highlighting in that case ;) I imagine text should work, but needs investigation and we can punt it for later.

trevorcampbell commented 1 year ago

resolved in #189