Module:图书排版:修订间差异
删除的内容 添加的内容
以 heti 官方规则为底补齐版式类,并把版式改为模板参数开关({{图书排版|行间注}} 等) |
以 heti 官方规则为底补齐版式类,并把版式改为模板参数开关({{图书排版|行间注}} 等) |
||
第48行:
end
-- 总是输出基础容器 tushu-body,即便没有传任何版式参数。
-- 原因:容器的字号**继承正文**(p 的 17px),所以样式表里
-- .tushu-body { max-width: 42em }
-- 的 em 就是正文字号(714px),容器内的标题与段落因而同宽对齐。
-- 反之若在 p / h1–h6 上各自写 max-width,em 会按各元素自身字号计算,
-- h1(32px) 的 42em 是 1344px,标题反而比正文宽一倍。
-- 容器不加闭合标签时会由 HTML5 解析器自动闭合到内容区末尾(因此 153 个
-- 既有页面无需补 {{图书排版/尾}});代价是页末的导航等也会一并被限宽。
local cls = { 'tushu-body' }
for _, c in ipairs(classes) do
cls[#cls + 1] = c
end
local div = string.format('<div class="%s">', table.concat(
if vertical then
div = '<div id="tushu-shu"></div><div id="tushu-heng"></div>'
| |||