% Copyright 2026 Open-Guji (https://github.com/open-guji) % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % http://www.apache.org/licenses/LICENSE-2.0 % % Unless required by applicable law or agreed to in writing, software % distributed under the License is distributed on an "AS IS" BASIS, % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % See the License for the specific language governing permissions and % limitations under the License. % luatex-cn-guji-HongLouMengJiaXuBen.cfg % Configuration for Hong Lou Meng Jiaxu Ben (红楼梦甲戌本) % Based on the manuscript format of the Jiaxu edition % ============================================================================= % Grid Calculation (derived from page geometry) % ============================================================================= % % Page dimensions (spread): % paper-width = 19cm × 2 = 38cm = 1077.2pt % paper-height = 38cm = 1077.2pt % % Single page: 38cm (H) × 19cm (W) % % Layout from manuscript: % - 12 columns per half page (+ banxin center column = 25 total) % - 18 characters per column % - Thin borders with single-line frame % - Narrow banxin with yuwei (fish tail) % % Margins (estimated from proportions): % top margin ≈ 7cm, bottom margin ≈ 2.5cm % left/right margin ≈ 0.8cm each % % Width calculation: % content-width = 1077.2 - 22.7 - 22.7 = 1031.8pt % 25 columns: grid-width = 1031.8 / 25 ≈ 41.3pt % % ============================================================================= % ========================================================================== % Page Geometry (Spread - two pages side by side) % ========================================================================== \pageSetup{ paper-width = 1077.2pt, % 38cm (19cm × 2) paper-height = 1077.2pt, % 38cm margin-top = 226.8pt, % ~8cm margin-bottom = 113.4pt, % ~4cm margin-left = 25.5pt, % ~0.9cm margin-right = 25.5pt, % ~0.9cm } % ========================================================================== % Typography (guji-specific) % ========================================================================== \gujiSetup{ % line-spacing = 45pt, % Font settings are optional - users can load fontspec and set fonts in their document % Example in your .tex file: % \usepackage{fontspec} % \setmainfont{JiGu}[RawFeature={+vert,+vrt2}] % If not specified, LuaTeX will use the default font } % ========================================================================== % Content Configuration (Grid, Typography, and Border) % ========================================================================== \contentSetup{ % Grid Configuration (25 cols × 18 chars) % Number of columns per half page (excluding Banxin center column) n-column = 12, % Grid width is now auto-calculated based on available width and n-column % grid-width = 41.05pt, % Typography font-size = 30pt, line-spacing = 45pt, vertical-align = center, % Number of characters per column (grid-height auto-calculated) n-char-per-col = 18, border = false, outer-border = false, border-padding-top = 3pt, border-padding-bottom = 3pt, } \sidenodeSetup{ color = red, font-size = 19pt, grid-height = 20pt, yshift = 0em, border-padding-top = 0.5em, border-padding-bottom = 0.5em, } \pizhuSetup{ color = 1 0 0, font-size = 18pt, grid-width = 20pt, grid-height = 19pt, } \jiazhuSetup{ align = outward, } % ============================================================================= % Banxin (版心) Configuration % ============================================================================= % Jiaxu edition has a narrower banxin with distinctive proportions % Upper section for title, middle for content, lower with fish tail \banxinSetup{ banxin-upper-ratio = 0.18, banxin-middle-ratio = 0.38, % Jiaxu edition characteristics: No yuwei, no dividers upper-yuwei = false, lower-yuwei = false, banxin-divider = false, book-name = { align = top, grid-height = 38pt, top-padding = 0pt, }, chapter = { font-size = 24pt, grid-height = 55pt, top-margin = 40pt, cols = 1, }, page-number = { font-size = 17pt, }, } \endinput