-
Notifications
You must be signed in to change notification settings - Fork 10
EN:Debug
谢耳朵 edited this page Feb 20, 2026
·
3 revisions
中文版 | English Version
luatex-cn provides comprehensive debugging features to help troubleshoot layout issues.
\LtcDebugOn % or \开启调试
\LtcDebugOff % or \关闭调试Enable debugging for specific modules:
\LtcDebugModuleOn{vertical} % or \开启调试模块{vertical}
\LtcDebugModuleOff{vertical} % or \关闭调试模块{vertical}\LtcShowFrame % or \显示边框Overlay grid coordinates on the page for element positioning:
% Show grid (default unit: cm)
\LtcShowGrid % or \显示网格
% Specify unit
\LtcShowGrid[measure=cm] % or \显示网格[measure=cm]
\LtcShowGrid[measure=pt]
\LtcShowGrid[measure=mm]
% Hide grid
\LtcHideGrid % or \隐藏网格Supported units: cm (default), pt, mm
\显示坐标 is an alias for \显示网格:
\显示坐标[measure=pt]
\隐藏坐标Set different debug colors for different modules:
\LtcDebugColor{vertical}{blue}
\LtcDebugColor{banxin}{red}\documentclass[四库全书彩色]{ltc-guji}
% Enable debug mode
\LtcDebugOn
\LtcShowGrid[measure=cm]
\begin{document}
\begin{正文}
Debug content...
\end{正文}
\end{document}When debug is enabled, the compilation log outputs detailed layout information including:
- Grid position calculations
- Character positioning
- Banxin rendering process
- Plugin invocation order
📜 LuaTeX-CN | Licensed under Apache License 2.0