1

I know there is a way to color fonts by using HTML tag in this way: <span style='color:green'>TEST</span>

But when I do something like <span style='color:green'>## TEST</span>, the headers feature will not appear, i.e. the font size is not enlarged.

Is there a neat way to color headers in markdown in Jupyter Notebook without using lengthy css stuff? Thanks.

I have tried searched a lot on Google and Stackoverflow but I still cannot find a solution to my problem. I am expecting a solution. Thanks.

Sam Wong
  • 113
  • 4
  • Did you try using KATEX? You can use the '\color{name}' like showed in [this question](https://stackoverflow.com/a/73613687/9780713) – F4NT0 Sep 10 '22 at 02:06
  • 1
    @F4NT0 Yea, I tried LaTex(which shall be more or less the same with KaTex I guess). I just don't know adding a hashtag sign in front of the LaTex code will work. Thanks for the post though. – Sam Wong Sep 10 '22 at 03:28

1 Answers1

2

On github and gitlab you can use KATEX who can help with good codes like \color{colorname} who change the color from the text inside the $$$$ code, like below:

# $${\color{purple} \boxed{ \frak{ \color{orange}Rise \space \color{cyan}and \space \color{magenta}Rise \space \color{lime}again \space \color{violet}until \space \color{lightgray}Lambs \space \color{teal}become \space \color{red}Lions !} } }$$

On github profile:

github profile

Like jupiter use almost the same markdown, you can check if you can use LATEX or KATEX code.

More info about LATEX on jupyter here: towards data science - markdown latex on jupyter

F4NT0
  • 773
  • 7
  • 16