From b9790a861f7812fcc13f4a83c74f7560d0c0dfef Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 22 May 2021 16:36:55 +0100 Subject: [PATCH] Fix theme argument to publish --- pweave/__init__.py | 4 +--- pweave/pweb.py | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pweave/__init__.py b/pweave/__init__.py index 5a4fb66..7f50c47 100644 --- a/pweave/__init__.py +++ b/pweave/__init__.py @@ -88,9 +88,7 @@ def publish(file, doc_format="html", theme="skeleton", latex_engine="pdflatex", return doc = Pweb(file, kernel="python3", doctype=pformat, - output=output) - - doc.theme = theme + output=output, theme=theme) doc.read() doc.run() diff --git a/pweave/pweb.py b/pweave/pweb.py index 2aed2f7..e366626 100644 --- a/pweave/pweb.py +++ b/pweave/pweb.py @@ -25,10 +25,11 @@ class Pweb(object): :param figdir: ``string`` figure directory :param mimetype: Source document's text mimetype. This is used to set cell type in Jupyter notebooks + :param theme: ``string`` html theme """ def __init__(self, source, doctype = None, *, informat = None, kernel = "python3", - output = None, figdir = 'figures', mimetype = None): + output = None, figdir = 'figures', mimetype = None, theme = "skeleton"): self.source = source name, ext = os.path.splitext(os.path.basename(source)) self.basename = name @@ -63,7 +64,7 @@ def __init__(self, source, doctype = None, *, informat = None, kernel = "python3 self.formatted = None self.reader = None self.formatter = None - self.theme = "skeleton" + self.theme = theme self.setformat(doctype) self.read(reader = informat)