% 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 % % ============================================================================= \gujiSetup{ % ========================================================================== % Page Geometry (Spread - two pages side by side) % ========================================================================== 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 % ========================================================================== % Border Configuration % ========================================================================== border = false, outer-border = false, border-padding-top = 3pt, border-padding-bottom = 3pt, % ========================================================================== % Grid Configuration (25 cols × 18 chars) % ========================================================================== % Number of columns per half page (excluding Banxin center column) n-column = 12, % Number of characters per column (grid-height auto-calculated) n-char = 18, % Grid width calculation: % content-width = 1077.2 - 25.5 - 25.5 = 1026.2pt % 25 columns: grid-width = 1026.2 / 25 ≈ 41.05pt grid-width = 41.05pt, % ========================================================================== % Banxin (版心) Configuration % ========================================================================== % Jiaxu edition has a narrower banxin with distinctive proportions % Upper section for title, middle for content, lower with fish tail banxin-upper-ratio = 0.18, banxin-middle-ratio = 0.38, chapter-title-top-margin = 40pt, chapter-title-font-size = 24pt, chapter-title-cols = 1, chapter-title-grid-height = 55pt, % Jiaxu edition characteristics: No yuwei, no dividers, centered page numbers upper-yuwei = false, lower-yuwei = false, banxin-divider = false, book-name-align = top, book-name-grid-height = 38pt, banxin-padding-top = 0pt, page-number-font-size = 17pt, % ========================================================================== % Typography % ========================================================================== % Font size matches grid height for 18 chars per column font-size = 30pt, 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}, CharacterWidth=Full] % If not specified, LuaTeX will use the default font vertical-align = center, % Jiazhu (dual-column notes) alignment jiazhu-align = outward, % ========================================================================== % Side Pizhu (Side Commentary) Configuration % ========================================================================== % Jia Xu Ben style: Red ink commentary % yoffset ensures it aligns nicely with the character grid sidenode-color = red, sidenode-font-size = 19pt, sidenode-grid-height = 10pt, sidenode-yoffset = 0em, sidenode-border-padding-top = 0.5em, sidenode-border-padding-bottom = 0.5em, % 批注 (Floating commentary) pizhu-color = 1 0 0, pizhu-font-size = 18pt, pizhu-grid-width = 20pt, pizhu-grid-height = 19pt, } \endinput