1

Topic

Hey, i would like to use my Jupyter Notebooks for my Thesis. Therefore it would be nice to format the text within the markdown cells as justified text.

Settings

I created the {yourUser}/.jupyter/custom/custom.cssfile with the follwoing settings:
(more examples)

.text_cell_render { /* Customize text cells */
    font-family: "Arial";
    font-size: 15pt;
    line-height: 145%;
    text-align: justify;
    word-wrap: break-word;
}

.CodeMirror pre { /* Customize code cells */
    font-size: 14pt;
}

My Problem now is, that every setting of my css applies to my notebook except for the text-align: justify; and this also just in some parts.

Example

Now my test Notebook shows the strange behavior, that there is no justified text if i insert normal text just like that, but if i somehow format the text within an order the justification applies.

How can i make this work? Cheers!

Kay
  • 173
  • 1
  • 1
  • 9

1 Answers1

0

The following seems to work:

.text_cell_render p { text-align: justify; text-justify: inter-word; }

Apparently there is a rule in the notebook's CSS for .rendered_html p that overrides the settings for .text_cell_render. The additional "p" tag makes the new rule specific enough to override the default. See this github thread.

David Ketcheson
  • 4,035
  • 2
  • 30
  • 25