con un clic
epub-alite-converter
将 EPUB 封面式页面、卷首、章首或海报页转换为项目的 A-lite 可重排全页方案,同时保留原有图文叠加构图、文字、图片和资源。
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
将 EPUB 封面式页面、卷首、章首或海报页转换为项目的 A-lite 可重排全页方案,同时保留原有图文叠加构图、文字、图片和资源。
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
用于 EPUB 出现生僻字、方块字、跨阅读器字形不一致、Kindle 字体回退失败,或需要验证嵌入字体、子集字体和候选大字库是否覆盖全书字符时。
优化中文/CJK EPUB 排版,包括正文节奏、font-family 链、嵌入字体、生僻字 fallback、标题字体、中西文混排和阅读器安全段落间距。用于文字拥挤、裁切、跨阅读器字体不一致或字体规则需要清理时。
重构和维护 EPUB CSS 分层。用于 CSS 规则重复、放错文件、层级边界不清,或新增正文、弹注、文字效果、文学结构、图片混排、竖排、A-lite 海报等样式时。
优化英文 EPUB 书籍排版,包括书籍类型判断、英语语言标记、serif 字体链、段落缩进、标题层级、插图、断字、引用/诗歌/信件、Kindle/Readest/Apple Books 大字号回归。用于英文小说、散文、非虚构或英文为主的 EPUB 需要形成可重排、可验证的排版方案时。
优化 EPUB 图片版式、figure 环绕、图注、栅格格式、封面声明与阅读器兼容性。用于图片过小、裁切、Kindle 空白、图文环绕差、缺图注,或封面/海报图片处理需要 EPUB 安全规则时。
检查 EPUB 的 Kindle/KDP 兼容风险,包括图片格式、封面 metadata、nav + NCX、MathML properties、CSS fallback、文字裁切、表格/代码溢出和转换日志 warning。用于 Kindle 交付前或 Kindle Previewer/App 与其他阅读器表现不一致时。
| name | epub-alite-converter |
| description | 将 EPUB 封面式页面、卷首、章首或海报页转换为项目的 A-lite 可重排全页方案,同时保留原有图文叠加构图、文字、图片和资源。 |
当需要把 EPUB 中已有的封面式页面、卷首、章节标题页或海报页转换成项目最终 A-lite 方案时使用这个 skill。
严格使用项目 A-lite 方案:
body.fullpage。.fullframe。min-height: 100%。font-size: 16px。overflow: hidden。page-break-before/after/inside。body.poster-bg 或其他 poster-* modifier,不属于 body.fullpage。background-size: contain,并保留 .poster-fallback 原图回退。writing-mode: vertical-rl。float: right。vh / vw。<body class="fullpage poster-bg">
<section class="fullframe" epub:type="chapter">
...
</section>
</body>
.fullframe .vcol {
writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
-epub-writing-mode: vertical-rl;
text-orientation: mixed;
-webkit-text-orientation: mixed;
-epub-text-orientation: mixed;
float: right;
text-indent: 0;
page-break-inside: avoid;
-webkit-page-break-inside: avoid;
}
% margin。% 或 em。font-size 保持 16px。serif / sans-serif 作为 generic fallback。Styles/poster.css,不要写进 base.css。fonts.css / base.css / poster.css。保留已有 nav.xhtml、toc.ncx、spine toc="ncx" 和 cover-image metadata。poster-bg-contain 或 poster-bg-volume-* modifier;使用 background-size: contain,不要使用会裁图的 cover 或会拉伸图片的 100% 100%;在 .fullframe 内保留 <img class="poster-fallback">,并只在 @supports (background-size: contain) 中隐藏它。@page { margin: 0; padding: 0; }
html {
width: 100%;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
body.fullpage {
width: 100%;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
font-size: 16px;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
box-sizing: border-box;
page-break-before: always;
page-break-after: always;
page-break-inside: avoid;
-webkit-page-break-before: always;
-webkit-page-break-after: always;
-webkit-page-break-inside: avoid;
overflow: hidden;
}
body.poster-bg {
background-image: url("../Images/poster-bg.png");
background-repeat: no-repeat;
background-position: left bottom;
background-size: 80% auto;
}
.fullframe {
width: 100%;
height: auto;
min-height: 90%;
margin: 0;
padding: 0;
box-sizing: border-box;
overflow: visible;
page-break-inside: avoid;
-webkit-page-break-inside: avoid;
}
单图卷封补充:
body.poster-bg-contain {
background-image: url("../Images/poster.png");
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
}
.poster-fallback {
display: block;
width: 100%;
max-width: 100%;
height: auto;
max-height: 100%;
}
@supports (background-size: contain) {
body.poster-bg-contain .poster-fallback {
visibility: hidden;
}
}
使用 templates/epub-style-demo/OEBPS/Text/03-vertical-alite.xhtml 作为文本叠加 A-lite 输出参考,使用 Text/03c-poster-contain.xhtml 作为单图卷封参考。转换页应满足这些不变量:
<body class="fullpage poster-bg">。body.fullpage 承载 shell 规则,body.poster-bg 承载背景规则。body.fullpage 不写页面级 color、background 或 background-color;body.poster-bg 只写背景图、位置和尺寸。.fullframe 包含叠加内容。.fullframe 保持 padding:0;叠加文字用元素 margin 定位,不给页面骨架加 padding。writing-mode: vertical-rl 和前缀 fallback。.poster-fallback,并使用 contain 防止边缘文字被裁切。本 skill 默认 dry-run。直接调用只输出预期改动 JSON;加 --commit 才真正改。
代理协议示例(注释说明代理动作,不是独立 shell 命令):
# 代理调用当前 skill,并将 dry-run JSON 写入 work/dry-run.json
# 人工审查
cat work/dry-run.json | jq
# 用户确认后,由映射 provider 写出新的 EPUB 产物
dry-run 输出格式见 docs/pipeline/cleanup-flow.md。