Skip to content

HooksAndVariables

lvjr edited this page Feb 10, 2023 · 11 revisions

The public hooks and variables described here are experimental: they may be modified or removed in the future if necessary!

Public tabularray hooks

The latest tabularray package provides some hooks with hook library, for tagpdf, tex4ht, lwarp and other packages.

  • tabularray/trial/before and tabularray/trial/after: can be used to disable somethings in trial typesetting.
  • tabularray/table/before and tabularray/table/after: can be used to add <table> and </table> tags.
  • tabularray/row/before and tabularray/row/after: can be used to add <tr> and </tr> tags.
  • tabularray/cell/before and tabularray/cell/after: can be used to add <td> and </td> tags.

You need to write \UseTblrLibrary{hook} to use these hooks.

Public tabularray variables

This variable is always available throughout the whole typesetting process of tabularray:

  • \lTblrMeasuringBool: if tabularray is doing trial typesetting.

These variables are updated by default before building every cell:

  • \lTblrCellRowSpanTl: how many rows are spanned by current cell.
  • \lTblrCellColSpanTl: how many columns are spanned by current cell.
  • \lTblrCellOmittedBool: if current cell is spanned by another cell.
  • \lTblrCellBackgroundTl: background color of current cell.

These variables are updated by html library before building every cell (you need to write \UseTblrLibrary{html} first):

  • \lTblrCellAboveBorderStyleTl
  • \lTblrCellAboveBorderWidthTl
  • \lTblrCellAboveBorderColorTl
  • \lTblrCellBelowBorderStyleTl
  • \lTblrCellBelowBorderWidthTl
  • \lTblrCellBelowBorderColorTl
  • \lTblrCellLeftBorderStyleTl
  • \lTblrCellLeftBorderWidthTl
  • \lTblrCellLeftBorderColorTl
  • \lTblrCellRightBorderStyleTl
  • \lTblrCellRightBorderWidthTl
  • \lTblrCellRihgtBorderColorTl

In the above variables, BorderStyle, BorderWidth, BorderColor are similar to border-style, border-width, border-color in HTML/CSS, respectively.

Clone this wiki locally