Skip to content

Instantly share code, notes, and snippets.

@danmrc
Last active Mar 23, 2021
Embed
What would you like to do?
css for maths
/* For styling the rendered Markdown */
/* Dark Background:
color : #FFFFFF;
background-color : #14141f; */
/* Light background
color : #000000;
background-color : #FFFFFF;
*/
body{
font-family: "sf pro display", "Segoe UI",Helvetica,Arial,sans-serif;
font-weight : 300;
font-size : 13pt;
line-height : 1.1;
color : #FFFFFF;
background-color : #262626;
counter-reset: h1;
}
strong {
font-weight: bold;
}
/* Counter for the sections */
h1 {
counter-reset: h2 eqnum;
}
h2 {
counter-reset: h3
}
h3 {
counter-reset: h4
}
h4 {
counter-reset: h5
}
h5 {
counter-reset: h6
}
/** put counter result into headings */
h1:before {
text-transform:uppercase;
margin-left: -0.5em;
counter-increment: h1;
content: counter(h1) " "
}
h2:before {
counter-increment: h2;
content: counter(h1) "." counter(h2) " "
}
h3:before,
h3.md-focus.md-heading:before /** override the default style for focused headings */ {
counter-increment: h3;
content: counter(h1) "." counter(h2) "." counter(h3) " "
}
h4:before,
h4.md-focus.md-heading:before {
counter-increment: h4;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) " "
}
h5:before,
h5.md-focus.md-heading:before {
counter-increment: h5;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " "
}
h6:before,
h6.md-focus.md-heading:before {
counter-increment: h6;
content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " "
}
/** override the default style for focused headings */
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
color: inherit;
border: inherit;
border-radius: inherit;
position: inherit;
left:initial;
float: none;
top:initial;
font-size: inherit;
padding-left: inherit;
padding-right: inherit;
vertical-align: inherit;
font-weight: inherit;
line-height: inherit;
}
/* Extra spacing for pretty numbers*/
h1 {
font-size : 1.6em;
font-weight : 600;
text-align : left;
line-height : 1.3em;
margin-top : 0em;
padding-bottom : 0em;
margin-left: 0.5em;
border : none;
}
h2, h3, h4, h5, h6 {
font-size : 1.3em;
font-weight : bold;
text-align : left;
line-height : 1.3em;
padding-top : 1em;
padding-bottom : 0em;
}
h1, h2, h3, h4, h5, h6 {
width : 100%;
}
/*Change the colour of the links*/
a:link {
font-size : 1.0em;
font-weight : 300;
padding-top : 0;
border : none;
padding-right : 0;
padding-left : 0.3em;
line-height : 1em;
font-family : 'courier new', sans-serif;
border : none;
color : #efab67;
}
/* Table of contents Change */
.table-of-contents {
border-top: 1px solid grey;
border-bottom: 1px solid grey;
margin: 1px;
}
.table-of-contents ol {
counter-reset: list-item;
}
.table-of-contents li {
display: block; counter-increment: list-item;
}
.table-of-contents li:before {
content: counters(list-item,'.') '.\0000a0';
}
/*katex
moreee space between lines */
.katex {
/*font-size: 1.6em;*/
line-height: 35px;
}
/* hopefully adds equation numbers*/
.katex-display:before {
counter-increment: eqnum;
content: "(" counter(h1) "." counter(eqnum) ")";
float: right;
font-size: initial;
padding-top: 0.8em;
padding-left: 0.8em;
}
.resource-icon.fa-joplin {
display: none;
}
/* coloured tags */
b-gray, theo, important, lemma, def, b-pink, b-purple {
width: 90%;
display: block;
margin-left: 20px;
padding: 10px;
border: 1px solid;
border-left: 5px solid;
border-radius: 2px;
word-wrap: break-word;
box-shadow: 3px 3px 7px 0 rgba(0,0,0,0.3) ;
}
def strong{
font-weight: bold;
color : #000000;
}
theo strong{
font-weight: bold;
color : #000000;
}
important strong{
font-weight: bold;
color : #000000;
}
lemma strong{
font-weight: bold;
color : #000000;
}
b-gray {
border-color: #b1bcc2;
background-color: #e9edf0;
color : #000000;
}
theo {
border-color: #5fa04e;
background-color: #c5e5b4;
color : #000000;
}
important {
border-color: #f65354;
background-color: #fad3d4;
color : #000000;
}
lemma {
border-color: #229ade;
background-color: #bbe5fb;
color : #000000;
}
def {
border-color: #cf7506;
background-color: #faf3d3;
color : #000000;
}
b-purple {
border-color: #af74e8;
background-color: #ead9fb;
color : #000000;
}
b-pink {
border-color: #ed5393;
background-color: #fad3e5;
color : #000000;
}
theo:before{
font-weight: bold;
content: "Theorem:"
}
lemma:before{
font-weight: bold;
content: "Lemma:"
}
def:before{
font-weight: bold;
content: "Definition:"
}
/* Light Background for when exporting */
.exported-note {
color : #000000;
background-color : #FFFFFF;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment