From 8b8f517a1bedf3a9536d1d8bba3ba9ce301d6e13 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 3 Feb 2020 12:33:49 +0000 Subject: Minor changes to css and adding debugging code --- paper2remarkable/providers/html.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paper2remarkable/providers/html.py b/paper2remarkable/providers/html.py index 03121a5..5a35b07 100644 --- a/paper2remarkable/providers/html.py +++ b/paper2remarkable/providers/html.py @@ -33,11 +33,12 @@ CSS = """ @page { size: 702px 936px; margin: 1in; } a { color: black; } img { display: block; margin: 0 auto; text-align: center; max-width: 70%; max-height: 300px; } -p { font-size: 10pt; font-family: 'EB Garamond'; hyphens: auto; text-align: justify; } +p, li { font-size: 10pt; font-family: 'EB Garamond'; hyphens: auto; text-align: justify; } h1,h2,h3 { font-family: 'Noto Serif'; } h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 14px; } +blockquote { font-style: italic; } """ @@ -108,6 +109,10 @@ class HTML(Provider): ' src="/', ' src="{base}/'.format(base=base_url) ) + if self.debug: + with open("./paper.html", "w") as fp: + fp.write(html_article) + font_config = weasyprint.fonts.FontConfiguration() html = weasyprint.HTML(string=html_article, url_fetcher=my_fetcher) css = weasyprint.CSS(string=CSS, font_config=font_config) -- cgit v1.2.3