Loading...
Loading...
Convert text content into elegant magazine-style HTML pages with support for professional typesetting and multiple visual styles. Trigger scenarios: (1) Users want to convert text/articles into magazine-style HTML, (2) Users mention "magazine layout", "magazine design", "article typesetting", "professional typesetting", "text beautification", or "magazine layout", (3) Users need elegantly typeset HTML pages, (4) Users need to export designed content as PDF. 12 unique visual styles are supported, using Tailwind CSS.
npx skill4agent add isjiamu/jiamu-skills magazine-layout| ID | Style Name | Use Case | Visual Features |
|---|---|---|---|
| 1 | Classic Elegance | Literature, essays, memoirs | Serif fonts, warm color tones, drop cap, decorative dividers |
| 2 | Modern Minimalist | Tech blogs, modern articles | Sans-serif fonts, ample white space, clean lines |
| 3 | Tech Magazine | Programming, technical content | Gradient colors, code block styles, futuristic design |
| 4 | Nature & Lifestyle | Lifestyle, travel, food | Natural green tones, organic shapes, handwritten style accents |
| 5 | Bold Editorial | Opinions, commentaries | Oversized headings, high-contrast black and white, red accents |
| 6 | Vintage Retro | History, nostalgic content | Vintage borders, typewriter fonts, parchment texture |
| 7 | Corporate Professional | Business reports, corporate documents | Navy blue color scheme, clear hierarchy, professional and rigorous |
| 8 | Creative Art | Design, artistic creation | Asymmetric layout, color block decorations, hand-drawn style |
| 9 | Academic Journal | Academic papers, research reports | Two-column layout, abstract style, citation format |
| 10 | Fashion Luxe | Fashion, luxury content | Gold accents, elegant serifs, refined white space |
| 11 | News & Report | News, news reports | Newspaper style, multi-level headings, breaking news tags |
| 12 | Dark Mode Tech | Developer content | Dark background, fluorescent color scheme, terminal style |
drop-capblockquote<!-- Drop cap paragraph -->
<p class="drop-cap">First paragraph content...</p>
<!-- Quote/citation block -->
<blockquote>
<p>"Important quote content"</p>
<cite>— Source</cite>
</blockquote>
<!-- Chapter divider -->
<div class="elegant-divider"><span>※</span></div>
<!-- Header section -->
<header>
<h1>Main Title</h1>
<p class="subtitle">Subtitle or introduction</p>
</header>/* Print/PDF mode */
@media print {
/* Prevent page breaks after headings */
h1, h2, h3, .chapter-number, .chapter-title {
page-break-after: avoid; break-after: avoid;
}
/* Prevent page breaks inside block elements */
blockquote, .highlight-box, .stage-item, .question-item,
.code-block, .terminal, figure, img, table {
page-break-inside: avoid; break-inside: avoid;
}
/* Keep lists intact */
ul, ol, .numbered-list, .stage-list {
page-break-inside: avoid; break-inside: avoid;
}
/* Prevent page breaks after dividers */
.elegant-divider, .divider, hr {
page-break-after: avoid; break-after: avoid;
}
/* Control orphan and widow lines for paragraphs */
p { orphans: 3; widows: 3; }
}
/* Apply to non-print modes too for consistent PDF rendering */
blockquote, .highlight-box, .code-block, .terminal, figure, img, table {
page-break-inside: avoid; break-inside: avoid;
}| CSS Property | Effect | Applicable Elements |
|---|---|---|
| Prevent page breaks inside elements | Quotes, cards, lists |
| Prevent page breaks after elements | Headings, dividers |
| Keep at least 3 lines at the bottom of a page | Paragraphs |
| Keep at least 3 lines at the top of a page | Paragraphs |
scripts/html_to_pdf.py# Check available engines
python scripts/html_to_pdf.py --check
# Convert (auto-detect best engine)
python scripts/html_to_pdf.py magazine.html
# Specify output filename
python scripts/html_to_pdf.py magazine.html output.pdf
# Use specific engine
python scripts/html_to_pdf.py magazine.html --engine playwrightpip install playwright && playwright install chromiumpip install weasyprintbrew install wkhtmltopdfArticle_Page1.htmlArticle_Page2.html## Your Magazine Page
Save the following code as `Article.html`:
```html
<!DOCTYPE html>
...complete HTML code...Article.htmlpython scripts/html_to_pdf.py Article.html
## Style Customization
Users may request modifications to:
- **Colors**: Modify CSS variables or Tailwind classes
- **Fonts**: Update Google Fonts imports
- **Spacing**: Adjust padding, margin, line-height
- **Layout**: Modify page width and height dimensions
Apply modifications while maintaining overall style harmony.
## Resource Files
### scripts/
- `html_to_pdf.py` - HTML to PDF script that supports multiple rendering engines (Playwright/WeasyPrint/wkhtmltopdf)
### references/
- `styles.md` - Complete templates for all 12 styles, including color schemes, font settings, intelligent pagination CSS, and HTML template code