diff --git a/README.md b/README.md index 8615038..3077091 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ The format is mostly markdown, except for these modifications: - multi-line content allowed. - the prefix `@=latex=` will display its content in pdf only. There is no html-prefix equivalent. -- Use `####` to create paragraph like sections. These sections are displayed in the margin. Like an index for quick reference. In mobile html they are normal `h4` headings. - - Of course `#`, `##`, and `###` are translated to `h1` to `h3` headings +- Use `####` to create paragraphs and `#####` for paragraph-like sections. The latter are displayed in the margin. Like an index for quick reference. In mobile html they are normal `h5` headings. + - Of course `#`, `##`, and `###` translate to `h1` to `h3` headings. - You can add a reference-id to a title by adding `{#label}` after the title, e.g., `## Title {#title}` - other than that, all titles have implicit labels where spaces are replaced with dashes `My Title` becomes `my-title` diff --git a/bin/custom.css b/bin/custom.css index 9b9bbe6..d94267b 100755 --- a/bin/custom.css +++ b/bin/custom.css @@ -1,6 +1,7 @@ @font-face { font-family: 'Roboto'; src: url(fonts/Roboto-Regular.otf); } /* only h1-6, thus no italic */ @font-face { font-family: 'Piazzolla'; src: url(fonts/Piazzolla.ttf); } @font-face { font-family: 'Piazzolla'; font-style: italic; src: url(fonts/Piazzolla-Italic.ttf); } +@font-face { font-family: 'Iosevka'; src: url(fonts/iosevka-ss04-regular.ttf); } body { font-family: Piazzolla, Helvetica Neue, sans-serif; @@ -10,6 +11,11 @@ b,strong { font-weight: 600; } h1,h2,h3,h4,h5,h6,.topnav { font-family: Roboto, Helvetica Neue, sans-serif; } +pre, pre > code { + margin-left: 0.1em; + font-family: Iosevka, Menlo, Consolas, Courier, monospace; + font-size: 1rem; +} #subtitle { margin-top: inherit; } @media (prefers-color-scheme: dark) { body { background: #17110E; color: #DDD; font-weight: 500; } @@ -68,23 +74,28 @@ div.topnav { } /* Margin-Sections */ -p + .h4-spacer { +p + .h5-spacer { margin-top: 2.2rem; } -h4 { - display: none; +h4,h5 { font-size: 1.4em; margin-bottom: 1rem; } -h4 + p { margin-top: 0; } +h4 + p, h5 + p { margin-top: 0; } +h5 { display: none; } @media (max-width: 760px) { - .h4-spacer { display: none; } - h4 { display: inherit; } - h4 + p>.marginnote, h4 + p>.sidenote { + .h5-spacer { display: none; } + h5 { display: inherit; } + h5 + p>.marginnote, h5 + p>.sidenote { display: none; } } +/* Support for Checkbox-Lists */ +input[type='checkbox'] { width: 1.4em; height: 1.4em; margin: 0 .5em 0 0; } +li.checkbox { text-indent: -1.4em; } +li.checkbox::marker { content: ''; } + /* Override original Tufte CSS */ p { diff --git a/src/common-preamble.tex b/src/common-preamble.tex index 8a20b5f..bb68e39 100755 --- a/src/common-preamble.tex +++ b/src/common-preamble.tex @@ -15,6 +15,7 @@ \usepackage{url} \usepackage{graphicx} \usepackage{microtype} +\usepackage{mathabx} \setmainfont[ Path = fonts/, @@ -31,6 +32,7 @@ ]{Roboto-Regular} \setmonofont[ Path = fonts/, + Scale = 0.8, BoldFont = {iosevka-ss04-bold}, ItalicFont = {iosevka-ss04-italic}, BoldItalicFont = {iosevka-ss04-bolditalic} @@ -61,6 +63,8 @@ \renewcommand\allcapsspacing[1]{{\addfontfeature{LetterSpace=15}#1}} \renewcommand\smallcapsspacing[1]{{\addfontfeature{LetterSpace=10}#1}} +\renewcommand\subsubsection\paragraph + \newcommand{\marginsection}[1]{ \if@noskipsec\leavevmode\fi \par \paragraph{} diff --git a/src/rules-html-post.sed b/src/rules-html-post.sed index c9d7a85..53ce0ce 100755 --- a/src/rules-html-post.sed +++ b/src/rules-html-post.sed @@ -1,3 +1,7 @@ # Sectioning s?