tmq-markdown2anything
Skill8 starsChanged 13 months agoMITView on GitHub
Convert markdown files to visually appealing PDF, Word, or HTML documents with Slovak diacritics support, professional themes (professional, minimalist, technical, basic), and advanced table formatting. Use when converting markdown documentation to presentation-ready documents, creating professional web pages from markdown, reports from markdown notes, or batch-converting markdown files to styled PDF/DOCX/HTML formats.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-docs-generatorSkill
- changelog-newsletterSkill
- agent-skill-creatorSkill
- meeting-notes-to-action-itemsSkill
- terraform-docsSkill
- tomique-linkedin-copywriterSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 19 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Self-Contained HTML: No external dependencies, works offline
- Very specific: line 227
Output: All markdown files in project-docs/ converted to professional PDFs in project-docs/output/.
- Distinctive: line 237
Self-Contained: All CSS embedded, no external files
- Distinctive: line 305
Verify input file is UTF-8 encoded
- Distinctive: line 306
Check Liberation fonts are available
- Very specific: line 312
Verify markdown table syntax (proper pipes |)
- Very specific: line 313
Ensure header separator line: |---|---|---|
- Distinctive: line 314
Check theme supports table colors
- Very specific: line 319
Verify directory contains .md files
- Distinctive: line 321
Ensure output directory is writable
- Distinctive: line 328
Check file encoding is UTF-8
- Distinctive: line 329
Verify no browser extensions blocking styles
- Distinctive: line 337
Verify document-skills plugin is available
- Distinctive: line 345
All text respects page margins strictly
- Distinctive: line 348
No horizontal overflow in any text elements
- Distinctive: line 389
Always use UTF-8 encoding for markdown files
- Distinctive: line 390
Test with standard phrase: "Príliš žltý kôň úpel ďábelské ódy"
- Distinctive: line 396
Use consistent naming for output organization
- Distinctive: line 402
Use for web publishing or online documentation
- Distinctive: line 409
Use tmq-markdown2anything when you need to:
- Distinctive: line 411
Create visually appealing PDFs from markdown notes
- Distinctive: line 415
Ensure proper Slovak diacritics rendering
- Distinctive: line 417
Create print-ready or web-ready output
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Markdown to PDF/Word/HTML Converter
Overview
Convert markdown files into professionally styled documents with full Slovak diacritics support. This skill transforms plain markdown into visually appealing PDF, Word (DOCX), or HTML documents using one of four professional themes.
Key Features:
- 3 Output Formats: PDF, DOCX, HTML
- 4 Professional Themes: Professional, Minimalist, Technical, Basic
- Slovak Diacritics: Full UTF-8 support for all Slovak characters
- Advanced Tables: Theme-specific styling with colors and borders
- Batch Processing: Convert entire directories at once
- Self-Contained HTML: No external dependencies, works offline
Quick Start
Single File Examples
# Convert to PDF with professional theme
python3 scripts/convert_markdown.py document.md --format pdf --theme professional
# Convert to HTML with minimalist theme
python3 scripts/convert_markdown.py notes.md --format html --theme minimalist
# Convert to Word with technical theme
python3 scripts/convert_markdown.py api-docs.md --format docx --theme technicalBatch Conversion
# Convert all markdown files in a directory to HTML
python3 scripts/convert_markdown.py docs/ --format html --theme professional --batchInstallation
# Install Python dependencies
cd tmq-markdown2anything
pip3 install -r scripts/requirements.txtFeatures
Slovak Diacritics Support
Full support for all Slovak characters with proper UTF-8 encoding:
- Lowercase: á ä č ď é í ĺ ľ ň ó ô ŕ š ť ú ý ž
- Uppercase: Á Ä Č Ď É Í Ĺ Ľ Ň Ó Ô Ŕ Š Ť Ú Ý Ž
- Test: Príliš žltý kôň úpel ďábelské ódy
Output Formats
PDF:
- High-quality print-ready documents
- Embedded fonts for portability
- Professional typography
- Requires: document-skills:pdf
DOCX:
- Editable Microsoft Word documents
- Style preservation
- Compatible with Word/LibreOffice
- Requires: document-skills:docx
HTML:
- Self-contained single file
- Responsive design (mobile-friendly)
- Embedded CSS (no external files)
- Works offline
- Native Python generation (fast)
Themes
1. Professional
Use Case: Business reports, formal documents, client deliverables
- Fonts: Liberation Serif, 11pt body, 24pt/18pt/14pt headings
- Colors: Deep blue (#1a237e) headings, formal styling
- Tables: Blue header, alternating rows
- Best For: Corporate documents, formal presentations
2. Minimalist
Use Case: Modern portfolios, clean presentations, design docs
- Fonts: Liberation Sans, 10pt body, 22pt/16pt/13pt headings
- Colors: Black/gray, minimal accent
- Tables: Light gray header, clean design
- Best For: Contemporary documents, creative work
3. Technical
Use Case: API docs, technical specs, developer guides
- Fonts: Liberation Sans/Mono, code-optimized
- Colors: Dark slate (#263238), teal accents
- Tables: Dark header, code-friendly
- Best For: Technical documentation, code samples
4. Basic
Use Case: Quick conversions, print-ready, maximum compatibility
- Fonts: Liberation Serif, simple sizing
- Colors: Pure black on white only
- Tables: Black borders, no colors
- Best For: Drafts, simple notes, B&W printing
Detailed Usage
Command Line Interface
python3 scripts/convert_markdown.py [OPTIONS] INPUT
Arguments:
INPUT Input markdown file or directory
Options:
--format, -f Output format: pdf, docx, html (default: pdf)
--theme, -t Theme: professional, minimalist, technical, basic (default: basic)
--batch, -b Batch process directory
--output, -o Custom output path (optional)Single File Conversion
Convert one markdown file to the specified format:
# PDF with professional theme
python3 scripts/convert_markdown.py report.md --format pdf --theme professional
# HTML with technical theme
python3 scripts/convert_markdown.py api.md --format html --theme technical --output api-docs.html
# DOCX with minimalist theme
python3 scripts/convert_markdown.py notes.md --format docx --theme minimalistDefault Behavior:
- Output file created in same directory as input
- Output name:
<input-name>.<format> - Example:
document.md→document.pdf
Batch Conversion
Convert all .md files in a directory:
# Basic usage - output to 'output/' subdirectory
python3 scripts/convert_markdown.py markdown-files/ --format html --theme professional --batch
# Custom output directory
python3 scripts/convert_markdown.py src/docs/ --format pdf --theme minimalist --batch --output build/pdfs/Batch Behavior:
- Processes all
.mdfiles in directory - Creates output directory if needed
- Preserves original filenames
- Shows progress for each file
- Summary report at end
Slovak Content Example
# Technická Dokumentácia
## Úvod
Príliš žltý kôň úpel ďábelské ódy.
| Názov | Popis | Hodnota |
|-------|-------|---------|
| Prvý | Slovenský text | 100 |
| Druhý | S diakritikou | 200 |This markdown will correctly render all Slovak diacritics in PDF, DOCX, and HTML output.
Examples
Example 1: Business Report (PDF)
python3 scripts/convert_markdown.py quarterly-report.md --format pdf --theme professionalOutput: Professional PDF with deep blue headings, formal tables, business-ready formatting.
Example 2: Portfolio Website (HTML)
python3 scripts/convert_markdown.py portfolio.md --format html --theme minimalistOutput: Clean, modern HTML page with responsive design, perfect for hosting online.
Example 3: API Documentation (HTML)
python3 scripts/convert_markdown.py api-reference.md --format html --theme technicalOutput: Developer-friendly HTML with syntax highlighting, monospace code blocks, dark slate styling.
Example 4: Meeting Notes (DOCX)
python3 scripts/convert_markdown.py meeting-notes.md --format docx --theme basicOutput: Simple, editable Word document with black and white styling.
Example 5: Batch Documentation
python3 scripts/convert_markdown.py project-docs/ --format pdf --theme professional --batchOutput: All markdown files in project-docs/ converted to professional PDFs in project-docs/output/.
Advanced Usage
HTML Output Features
HTML output includes:
- Responsive Design: Adapts to screen size (max-width: 900px)
- Mobile Optimized: Touch-friendly, readable on phones
- Print-Friendly: CSS optimized for printing
- Self-Contained: All CSS embedded, no external files
- Offline Ready: Works without internet connection
Table Formatting
Tables are automatically styled based on theme:
Professional Theme:
- Blue header background (#1a237e)
- White header text
- Alternating row colors (light gray/white)
Minimalist Theme:
- Light gray header (#f0f0f0)
- Thin borders
- No row alternation
Technical Theme:
- Dark slate header (#263238)
- Code-friendly spacing
- Alternating rows for readability
Basic Theme:
- Black borders only
- Bold headers
- No colors
Code Blocks
Code blocks are preserved with proper formatting:
```python
def hello_slovak():
print("Príliš žltý kôň")
return True
```- Technical Theme: Optimized for code with syntax highlighting
- All Themes: Monospace font (Liberation Mono)
- HTML: Horizontal scroll for long lines
Templates Reference
Detailed theme specifications:
- Professional Theme - Business and formal
- Minimalist Theme - Clean and modern
- Technical Theme - Developer-focused
- Basic Theme - Simple and universal
HTML examples:
- Professional HTML
- Minimalist HTML
- Technical HTML
- Basic HTML
Scripts Reference
- convert_markdown.py - Main conversion tool
- html_generator.py - HTML generation engine
- style_config.py - Theme definitions
Troubleshooting
Issue: Slovak Diacritics Not Rendering
Solution:
- Verify input file is UTF-8 encoded
- Check Liberation fonts are available
- Test with:
echo "Príliš žltý kôň" | python3 scripts/convert_markdown.py
Issue: Tables Not Formatting Correctly
Solution:
- Verify markdown table syntax (proper pipes
|) - Ensure header separator line:
|---|---|---| - Check theme supports table colors
Issue: Batch Conversion Fails
Solution:
- Verify directory contains
.mdfiles - Check directory permissions
- Ensure output directory is writable
- Try single file first to test setup
Issue: HTML Not Displaying Properly
Solution:
- Open in modern browser (Chrome, Firefox, Safari)
- Check file encoding is UTF-8
- Verify no browser extensions blocking styles
Issue: PDF/DOCX Not Generating
Solution:
- HTML: Generated directly by Python script
- PDF/DOCX: Requires Claude to invoke document-skills
- Script prints instructions for Claude to execute
- Verify document-skills plugin is available
Issue: Text Overflows Page Boundaries in PDF
Problem: Prompts in code blocks or long lines overflow outside defined page margins in PDF output (HTML works correctly).
Solution: The skill now includes automatic text wrapping for PDF output:
- All text respects page margins strictly
- Code blocks and prompts wrap long lines automatically
- Table cells wrap content with word-wrap: break-word
- No horizontal overflow in any text elements
- Long URLs and words break if necessary
Technical Details:
The fix is implemented in scripts/style_config.py in the get_styling_instructions() method:
CODE BLOCKS AND PROMPTSsection enables white-space: pre-wrapTEXT FORMATTINGsection enables word-wrap: break-word for all elementsPAGE LAYOUTsection enforces strict margin respect- Maximum width set to 100% of content area (respects margins)
This ensures all content, including long prompts and code blocks, stays within the defined page boundaries when document-skills:pdf generates the final PDF.
Workflow Integration
For PDF/DOCX
- User runs conversion script
- Script reads markdown (UTF-8)
- Script generates instruction for Claude
- Claude invokes document-skills:pdf or document-skills:docx
- Final document created
For HTML
- User runs conversion script
- Script reads markdown (UTF-8)
- Script generates HTML with embedded CSS
- HTML file saved directly (no Claude interaction needed)
- Self-contained HTML ready to use
Best Practices
Choosing a Theme
- Professional: Client-facing documents, formal reports
- Minimalist: Modern, design-focused content
- Technical: Code documentation, API references
- Basic: Quick drafts, maximum compatibility
Slovak Content
- Always use UTF-8 encoding for markdown files
- Test with standard phrase: "Príliš žltý kôň úpel ďábelské ódy"
- Liberation fonts support all Slovak characters
Batch Processing
- Organize markdown files in dedicated directory
- Use consistent naming for output organization
- Choose appropriate theme for document set
- Review one file before batch processing all
HTML Output
- Use for web publishing or online documentation
- Theme choice affects website aesthetic
- Responsive design works on all devices
- Can be edited with any text editor
When to Use This Skill
Use tmq-markdown2anything when you need to:
- Convert markdown documentation to professional documents
- Create visually appealing PDFs from markdown notes
- Generate Word documents with Slovak text
- Build single-file HTML pages from markdown
- Batch process multiple markdown files
- Ensure proper Slovak diacritics rendering
- Apply consistent styling across documents
- Create print-ready or web-ready output
Technical Requirements
- Python 3.6+
- markdown library (see requirements.txt)
- UTF-8 file encoding
- For PDF/DOCX: Claude with document-skills plugin
- For HTML: No additional requirements
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

