Lab Report Markdown Formatter
Skill for creating academic lab reports in Markdown format with automatic validation.
Core Capabilities
- Report generation from assignment specifications
- Header formatting (Typst-style:
% Title,% Date,% Author) - Line length validation (≤100 characters by default)
- Template adaptation for different lab formats
Report Structure Template
Standard lab report sections:
% Лабораторная работа № X.Y «Название работы»
% <лабораторная ещё не сдана>
% Имя Фамилия, Группа
# Цель работы
...переписываете из задания...
# Индивидуальный вариант
...краткое описание варианта...
## Лексический/синтаксический домен для защиты
...формулировка преподавателя или "определяется преподавателем"...
# Реализация
## Файл `filename.ext`
```language
...код...
Файл filename2.ext
...код...
Тестирование
Входные данные
...входные данные...
Вывод на stdout
...вывод программы...
Вывод
...чему научились...
## Adaptation Rules
When user provides custom template:
1. Preserve exact header format from template
2. Keep section structure from template
3. Apply line length limits to all content
4. Maintain code block formatting
## Line Length Validation
**Critical:** All lines must be ≤100 characters.
### Check Command
```bash
python3 .cursor/skills/lab-report-md/scripts/check_line_length.py report.md
Fix Automatically
python3 .cursor/skills/lab-report-md/scripts/check_line_length.py -f report.md
What Gets Fixed
- Long paragraphs → split by words
- Lists → wrapped items
- Descriptions → multi-line
What Stays As-Is
- Code blocks (
...) - Tables (|...|)
- Headers (#...)
- Indented code
Special Characters
Quotes
- Use
"for regular quotes - Use
`for inline code/escapes (\n, \t, etc.) - Avoid «ёлочки» — they cause LaTeX errors
Escapes in Text
When writing escape sequences like \n, \t, \":
- Wrap in backticks:
`\n`,`\t` - This prevents LaTeX interpretation errors
Workflow
- Read assignment (cond.md, TZ.md, etc.)
- Extract: goal, variant, requirements
- Create report.md with template structure
- Add implementation code sections
- Add test cases with real input/output
- Run validation: check_line_length.py
- Fix issues automatically or manually
- Verify: all lines ≤100 chars
Quality Checklist
- Header follows Typst format (3 lines starting with
%) - All lines ≤100 characters
- Code sections properly fenced
- Real test output (not fictional)
- No «ёлочки» quotes
- Escape sequences in backticks