diff --git a/examples/README.md b/examples/README.md index d1076a7..9d7f9ee 100644 --- a/examples/README.md +++ b/examples/README.md @@ -26,9 +26,3 @@ more than one language. This is an example of a *scoring* problem where submissions can get different scores depending on which test groups they solve. It also demonstrates how an input validator might check different constraints for different test groups. The swedish statement showcases how to use images, footnotes and tables in Markdown. - -# bplusa - -This is an example of a problem using an output validator, where there are multiple valid answers. -The output validator is written pretty generally, guarding against the most common mistakes when using -output validators. It also demonstrates using Markdown as a statement language. diff --git a/problemtools/md2html.py b/problemtools/md2html.py index 7b834d2..3d729e7 100644 --- a/problemtools/md2html.py +++ b/problemtools/md2html.py @@ -36,9 +36,9 @@ def convert(problem: str, options: argparse.Namespace) -> bool: statement_html = subprocess.run(command, capture_output=True, text=True, shell=False, check=True).stdout - templatepaths = [os.path.join(os.path.dirname(__file__), 'templates/markdown'), - os.path.join(os.path.dirname(__file__), '../templates/markdown'), - '/usr/lib/problemtools/templates/markdown'] + templatepaths = [os.path.join(os.path.dirname(__file__), 'templates/markdown_html'), + os.path.join(os.path.dirname(__file__), '../templates/markdown_html'), + '/usr/lib/problemtools/templates/markdown_html'] templatepath = next((p for p in templatepaths if os.path.isdir(p) and os.path.isfile(os.path.join(p, "default-layout.html"))), None) diff --git a/problemtools/problem2pdf.py b/problemtools/problem2pdf.py index 09ed596..62d40db 100644 --- a/problemtools/problem2pdf.py +++ b/problemtools/problem2pdf.py @@ -48,7 +48,9 @@ def md2pdf(options: argparse.Namespace) -> bool: problem_name = statement_common.get_problem_name(problem_root, options.language) + problem_id = os.path.basename(problem_root) # Add code that adds vertical and horizontal lines to all tables + statement_md = r'\centerline{\large %s}' % f"Problem id: {problem_id}" + statement_md statement_md = r'\centerline{\huge %s}' % problem_name + statement_md statement_md = table_fix + statement_md diff --git a/problemtools/templates/markdown/default-layout.html b/problemtools/templates/markdown_html/default-layout.html similarity index 100% rename from problemtools/templates/markdown/default-layout.html rename to problemtools/templates/markdown_html/default-layout.html diff --git a/problemtools/templates/markdown/problem.css b/problemtools/templates/markdown_html/problem.css similarity index 99% rename from problemtools/templates/markdown/problem.css rename to problemtools/templates/markdown_html/problem.css index ca6e72e..c38a4d9 100644 --- a/problemtools/templates/markdown/problem.css +++ b/problemtools/templates/markdown_html/problem.css @@ -85,8 +85,6 @@ td { vertical-align:top; } - - div.sampleinteractionread { border: 1px solid black; width: 60%;