Generate LaTeX Worksheet (Instructions → PDF)
generate-latex-worksheetFull Description
DEFAULT/PRIMARY TOOL
- Use this tool for all worksheet generation requests.
Generates a complete LaTeX worksheet from natural language instructions, compiles it to PDF, and returns a public URL.
WHAT TO SEND
- "instructions" (required): Natural language description of the worksheet you want to create.
Be specific about: • Topic/subject (e.g., "multiplication", "algebra", "fractions") • Grade level or difficulty (e.g., "5th grade", "high school", "introductory") • Number and type of questions (e.g., "10 word problems", "5 multi-step equations") • Any special requirements (e.g., "include a solutions page", "add graphs", "with answer key")
- "title" (optional): Plain text title for UI display.
- "filename" (optional): Safe filename, e.g., "algebra-practice.pdf".
WHEN USER HAS EXISTING CONTENT (IMPORTANT) If the user already has a worksheet (LaTeX or PDF) they want to improve or modify:
- DO NOT paste raw LaTeX code into the instructions (backslashes cause JSON escaping issues)
- Instead, DESCRIBE the existing content in plain English
- Then describe the changes or improvements needed
Example
- Instead of pasting LaTeX code, describe it:
"The current worksheet has 10 multiplication problems for 3rd grade with no answer space. Please create an improved version with:
- Same 10 problems but with 2cm answer space after each
- Add a header with Name/Date fields
- Include a solutions page at the end"
This approach avoids JSON escaping issues and produces better results.
EXAMPLES OF GOOD INSTRUCTIONS
1. Simple practice: "Create a worksheet with 10 basic multiplication problems for 3rd graders, focusing on times tables 1-10."
2. Multi-step problems: "Generate 5 two-step algebra equations for 8th grade. Include problems like 2x + 5 = 13 and 3(x - 4) = 9. Add space for showing work."
3. Word problems: "Create 5 word problems about fractions for 6th grade. Focus on adding and subtracting fractions with different denominators. Real-world contexts like cooking or shopping."
4. Mixed topics: "Generate a quiz with 3 sections: 5 factoring problems, 3 quadratic equation problems, and 2 graphing problems for high school algebra."
5. With solutions: "Create 8 geometry problems about triangle angles for 9th grade. Include a solutions page at the end."
6. Improving existing content: "I have a worksheet about quadratic equations with 5 problems. Recreate it with better formatting, add worked examples at the top, and include a solutions section."
WHAT YOU GET
- A professionally formatted worksheet with:
• Clear title and header (Name, Date, Class/Period, Score fields) • Well-structured questions with proper numbering • Appropriate spacing for student work • Clean, educational layout
- Compiled PDF ready for printing or digital distribution
- Public URLs for both PDF and LaTeX source
HOW IT WORKS 1. AI generates complete LaTeX code from your instructions 2. LaTeX is uploaded to storage (for reference) 3. Document is compiled to PDF using pdfLaTeX 4. PDF is uploaded and public URL is returned 5. Worksheet structure is extracted for editing (if needed)
ENGINE & PACKAGE INFO (pdfLaTeX)
- Uses standard packages: geometry, amsmath, amssymb, enumitem
- 1-inch margins by default
- 12pt article document class
- Math mode support with proper formatting
TIPS FOR BEST RESULTS
- Be specific about grade level and difficulty
- Mention the number of problems you want
- Specify any special formatting needs upfront
- Include context about the learning objectives
- Request solutions page if needed
TROUBLESHOOTING
- If the worksheet doesn't match expectations, refine your instructions with more details
- For complex diagrams or graphs, describe them clearly in the instructions
- The AI will use standard LaTeX packages only (no external images or custom fonts)
Parameters (1 required, 2 optional)
instructionsstringfilenamestringtitlestring