Exam Shuffler Helper
A VS Code extension that provides comprehensive support for LaTeX exam templates with special markup tags for exam shuffling and randomization.
This extension is designed to work with the Exam Shuffler web application - a professional exam generation tool that creates multiple randomized versions of exams.
Complete Workflow:
📝 Write - Use this VS Code extension to create your LaTeX exam file
- Get syntax highlighting for all markup tags
- Use snippets for rapid question creation (
exammc5, examfull, etc.)
- Real-time validation ensures your markup is correct
- Auto-completion for exam settings
⬆️ Upload - Upload your .tex file to the Exam Shuffler web application
- The web app reads the same
%{#q} markup format
- No conversion needed - files are directly compatible
✨ Generate - Web app creates randomized exam versions
- Questions and options are shuffled based on your markup tags
- Multiple versions generated with automatic answer keys
- Download complete LaTeX document ready for compilation in Overleaf or local LaTeX
Format Compatibility: Both tools use identical markup (%{#q}, %{#o}, %{#fixed}, etc.), ensuring seamless integration.
Features
🎨 Syntax Highlighting
Beautiful syntax highlighting for all exam markup tags:
- Settings block (
%{#setting}...%{/setting})
- Question blocks (
%{#q}...%{/q})
- Option blocks (
%{#o}...%{/o})
- Instructions block (
%{#instructions}...%{/instructions})
- Preamble block (
%{#preamble}...%{/preamble})
- Special tags (
%{#fixed}, %{#fixed-options:X}, %{#separate-page})
⚡ Code Snippets
Powerful snippets to speed up exam creation:
| Prefix |
Description |
examfull |
Complete exam template with all structure |
examsetting |
Exam settings block |
examinstructions |
Instructions block |
exampreamble |
Preamble block for custom packages |
exammc |
Multiple choice question (4 options) |
exammc5 |
Multiple choice question (5 options) |
examfixed |
Fixed position question |
examfixedopt |
Question with fixed option order |
examseparate |
Question on separate page |
examimg |
Question with image layout |
examq |
Question block |
examo |
Option block |
✅ Real-time Validation
Comprehensive validation to catch errors before uploading to the web app:
Tag Matching
- Validates matching opening/closing tags for questions, options, and settings
- Detects unclosed tags and closing tags without opening tags
- Shows precise error locations
Content Validation
- Warns about empty question content
- Warns about empty option content
- Info messages for empty instructions or preamble blocks
Conflict Detection
- Error: Detects conflicting
%{#fixed} + %{#fixed-options} tags on same question
- Shows both tag locations with related information links
- Prevents invalid tag combinations
Fixed-Options Validation
- Validates that answer letter corresponds to an actual option
- Example:
%{#fixed-options:D} with only 3 options shows warning
🔍 Auto-completion & Hover Documentation
Smart features to speed up your workflow:
Tag Completion - Type %{# and get instant suggestions:
- Block tags:
setting, instructions, preamble, q, o (automatically adds closing tags)
- Special tags:
fixed, fixed-options:A, separate-page
- Each with helpful descriptions and examples
Settings Completion - Inside %{#setting} blocks, type % to get:
- university, department, term, coursecode
- examname, examdate, timeallowed
- numberofvestions, groups, examtype
- code_name, code_numbering, includeCoverPage
- paper_size, seed
Hover Documentation - Hover over any tag to see detailed information:
- Block tags show purpose and usage examples
%{#fixed} vs %{#fixed-options:A} explains the difference
- Closing tags show which opening tag they match
- Quick reference without leaving your code
📊 Status Bar
Real-time statistics displayed in the bottom status bar:
- Question count (e.g., "📝 10 questions")
- Option count (e.g., "☑ 45 options")
- Updates automatically as you type
- At-a-glance progress tracking
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Exam Shuffler Helper"
- Click Install
From VSIX File
- Download the
.vsix file from Releases
- In VS Code: Extensions → ... → Install from VSIX
- Select the downloaded
.vsix file
Usage
Quick Start
- Create a new
.tex file
- Type
examfull and press Tab
- Fill in your exam details
- Add questions using snippets like
exammc5
Example: Creating a Question
Type exammc5 and press Tab to get:
% ============================================================
% question 1
%=============================================================
\item
%{#q}
Question text
%{/q}
\begin{enumerate}
\item
%{#o}
Correct answer
%{/o}
\item
%{#o}
Wrong answer
%{/o}
\item
%{#o}
Wrong answer
%{/o}
\item
%{#o}
Wrong answer
%{/o}
\item
%{#o}
Wrong answer
%{/o}
\end{enumerate}
\questionseparator
Tag Reference
Settings Block
%{#setting}
% university=Your University Name
% department=Department Name
% coursecode=MATH 101
% examname=Midterm Exam
% numberofvestions=10
%{/setting}
Question Block
%{#q}
What is the derivative of f(x) = x^2?
%{/q}
Option Block
%{#o}
f'(x) = 2x
%{/o}
Fixed Position Question
\item
%{#fixed}
%{#q}
Write your student ID
%{/q}
Fixed Options (Answer = C)
\item
%{#fixed-options:C}
%{#q}
Which is correct?
%{/q}
Separate Page Question
\item
%{#separate-page}
%{#q}
Complex problem requiring lots of space
%{/q}
Next Steps
Once you've created your exam file:
- Save your
.tex file - Your exam template is ready
- Upload to Exam Shuffler - Go to the Exam Shuffler web application
- Generate versions - The web app will create multiple randomized exam versions
- Download & compile - Get your shuffled exams ready for printing
The markup format you create with this extension is fully compatible with the Exam Shuffler web application - no manual conversion needed!
Configuration
Access settings via: File → Preferences → Settings → Search "Exam Shuffler"
- Validate Tags: Enable/disable tag matching validation (default:
true)
- Validate Fixed Options: Enable/disable fixed-options letter validation (default:
true)
Requirements
- VS Code 1.80.0 or higher
- LaTeX workshop or similar LaTeX extension (recommended for full LaTeX support)
Known Issues
- Validation is file-scoped (doesn't check across multiple files)
- Large files (>10,000 lines) may experience slight performance delays
Release Notes
0.1.0 - Initial Release
- Syntax highlighting for all exam markup tags
- 11 code snippets for rapid exam creation
- Real-time tag validation
- Fixed-options letter validation
- Auto-completion for settings parameters
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have suggestions, please open an issue on GitHub.
Author
Mohammed - Mathematics Professor at KFUPM
Acknowledgments
- Built for educators creating randomized exams
- Perfect for maintaining academic integrity
- Designed for mathematics and STEM courses
- Works seamlessly with the Exam Shuffler web application for complete exam randomization workflow
Enjoy creating better exams! 🎓
This extension is part of the Exam Shuffler ecosystem - helping educators maintain academic integrity through intelligent exam randomization.