Skip to content

EN:Textbox

谢耳朵 edited this page Feb 1, 2026 · 5 revisions

[English Version] | 中文版

Textbox

luatex-cn provides powerful vertical text box capabilities with grid alignment.

Basic Textbox

The \TextBox (or \文本框) command creates an independent vertical text area.

Usage

\TextBox[options]{Content}

Options

Key Description Default
height Height in grid units. 0 for auto-extension. 0
n-cols Number of columns. 0
border Show border. false
background-color Background color. None
floating Enable floating mode (needs x, y). false

Features

  • Auto-Extension: If height is 0, the box extends naturally.
  • Compression (Flat Text): If height is fixed and content is too long, text is vertically compressed (v0.1.5).
  • Independent Indentation (v0.2.2+): Textbox content no longer inherits paragraph indentation from main text, ensuring layout independence (fix #37).

Fill Textbox

\FillTextBox (or \填充文本框) is a variant of \TextBox with default fill alignment.

\FillTextBox[height=10]{Content}

👉 Next: Features.

Clone this wiki locally