Wednesday 15 September 2010

css - Styling individual Markdown cells in ipython notebooks -



css - Styling individual Markdown cells in ipython notebooks -

how can prepare size of cell contains markdown? tried next ipython 2.3:

<div style="max-height: 500px; overflow: auto;"> [markdown] </div>

both style directives ignored , markdown interpreted text. know div tag beingness read because can see effects when add together background: yellow; mix. why other 2 directives ignored -- how can style markdown cells?

there seems (at least) issue tables in div containers. not attributed ipython rather marked (the applied markdown engine).

i'm not sure if problem if create markdown cell next content

<div style="max-height: 50px; overflow: auto;"> | 13ddsf | ree | |------|-----| | 33 | 45 | </div>

i expext see table, cropped @ bottom scrollbar @ side. however, like

so don't see table , don't see styling. actually, styling not visible because max-height keyword has no effect here. if alter style "height: 50px;" see styling (note increased height):

now, unusual thing rendering problem of table. without additional div container table renders fine, problem somehow related container. after playing around discovered - reason ever - necessary add together white space around table. if alter markdown like:

<div style="max-height: 50px; overflow: auto;"> | 13ddsf | ree | |------|-----| | 33 | 45 | </div >

it renders as: note there blank line before table and white space character after final div! actually, works if white space character after div skipped , text added outside final div. way works expected, ie. rendering , styling. nevertheless, i'll write bug study marked, imho not obvious.

update:

this seem related this issue, explains why initial code not working. block-level markdown not allowed within block-level inline html. marked needs 2 line feeds after block correctly find it. preventing marked identify block-level html (e.g. adding white space) possible desired result, although in somehow hackish way. note, hack won't work forever, block level parsing might modified.

btw. utilize current ipython master (commit_hash: '13e42d6'), ubuntu , firefox 33.

css markdown ipython-notebook

No comments:

Post a Comment