% 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-tw-vbook-default.cfg
% Default configuration for tw-vbook (Taiwan punctuation variant)
% Same layout as cn-vbook but with Taiwan-style punctuation

% ==========================================================================
% Page Geometry (16-kai: 170mm × 240mm)
% ==========================================================================
\pageSetup{
    paper-width = 170mm,
    paper-height = 240mm,
    margin-top = 25mm,
    margin-bottom = 0mm,
    margin-left = 22mm,
    margin-right = 18mm,
    page-split-enabled = false,
    page-number-style = digits,
    page-number-font-size = 9pt,
}

% ==========================================================================
% Content Configuration (Grid, Typography, and Border)
% ==========================================================================
\contentSetup{
    % Font and grid settings
    font-size = 15pt,
    line-spacing = 15pt,
    grid-width = 20pt,
    grid-height = 15pt,
    % Top-aligned text
    vertical-align = center,
    % No column divisions
    n-column = 0,
    % Natural layout: cell height follows font size (not fixed grid)
    layout-mode = natural,
    inter-cell-gap = 2pt,
    % No border for clean modern look
    border = false,
}
\punctSetup{punct-style=taiwan}

% 开启脚注功能（段末注模式）
\脚注设置{number-style=lujiao, indent=1em, spacing=0.5em}

% ==========================================================================
% 古籍标题命令
% ==========================================================================

% \卷名{文字} - 卷名标题（大字号，适用于"史记卷十六"等）
% 使用 \行 命令，column-width 匹配字号以避免字符被裁切
\newcommand{\卷名}[1]{%
  \行[font-size=48pt, column-width=54pt]{#1}%
}

% \章节名{文字} - 章节名标题（中等字号，适用于"秦楚之際月表第四"等）
\newcommand{\章节名}[1]{%
  \行[font-size=32pt, column-width=36pt]{#1}%
}
