From 712c74fbe34fe594c4c0f7e3b3057b01d85112ba Mon Sep 17 00:00:00 2001 From: Luke Weiler Date: Sun, 9 Jan 2022 15:52:43 -0500 Subject: [PATCH] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0e08f7e..db8212d 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,12 @@ If you wish to create a worksheet, you can use the [worksheetgen](https://github from mathgenerator import mathgen from worksheetgen.wg import Worksheet -worksheet = Worksheet("Worksheet title") -worksheet.add_instruction("Instructions") -# Writes 10 problems generated with id 1, [0] at the end specifies to take problem, and not solution. -for _ in range(10): - worksheet.add_problem(mathgen.genById(1)[0]) -worksheet.write_pdf() +ws = Worksheet("Worksheet title") +with ws.section('Section 1', description='These are instructions') + # Writes 10 problems generated with id 1, [0] at the end specifies to take problem, and not solution. + for _ in range(10): + ws.add_problem(mathgen.genById(1)[0]) +ws.write_pdf() ``` This creates the pdf `ws.pdf` in your current directory