PgBiel / typst-tablex

More powerful and customizable tables in Typst
MIT License
371 stars 13 forks source link

A table wrapped in a breakable figure block does not repeat headers on a page break. #72

Open Remillard opened 11 months ago

Remillard commented 11 months ago

Per discussion on Discord, it appears as if a sufficiently long table, wrapped in a #figure in order to apply captioning, and with the block set to breakable, does not correctly discover the table has been broken across page boundaries and does not then repeat the header.

Example code:

#import "@preview/tablex:0.0.6": *

= Definitions and Acronyms
#show figure: set block(breakable: true)
#figure(
    tablex(
        columns: (1fr, 4fr),
        header-rows: 1,
        repeat-header: true,
        fill: (col, _) => if col==0 {luma(225)} else {white},

        [*Acronym*],  [*Description*],
        hlinex(stroke: 2pt),
        [*ADC*],        [Analog to Digital Converter],
        [*AM*],     [Amplitude Modulation],
        [*BMS*],        [Business Management System],
        [*BPSK*],       [Binary Phase Shift Keying],
        [*CSS*],        [Configuration Sub System],
        [*D&I*],        [Design and Implementation],
        [*DAC*],        [Digital to Analog Converter],
        [*EMAC*],       [Ethernet Media Access Control],
        [*FAB*],        [Factory Application Board],
        [*FM*],     [Frequency Modulation],
        [*FPGA*],       [Field Programmable Gate Array],
        [*FSK*],        [Frequency Shift Keying],
        [*G-S*],        [Glide Slope],
        [*HPS*],        [Hard Processor System],
        [*HW*],     [Hardware],
        [*JTAG*],       [Joint Task Action Group],
        [*LOC*],        [Localizer],
        [*MAC*],        [Media Access Control],
        [*MRD*],        [Marketing Requirements Document],
        [*NAND*],       [Not AND (in the logic sense and the memory type sense)],
        [*NSE*],      [Network and Service Enablement],
        [*OOK*],        [On-Off Keying],
        [*PAM*],        [Pulse Amplitude Modulation],
        [*PDP*],        [Product Development Process],
        [*PLM*],        [Product Line Management (often referred to as “Marketing”)],
        [*QSPI*],       [Quad Serial Peripheral Interface],
        [*R&D*],        [Research and Development],
        [*RAM*],        [Random Access Memory],
        [*RGMII*],    [Reduced Gigabit Media Instruction Interface],
        [*RMII*],       [Reduced Media Instruction Interface],
        [*ROM*],        [Read-only Memory],
        [*RTCA*],       [Radio Technical Commission for Aeronautics],
        [*RTL*],        [Register-Transfer Level],
        [*SD/MMC*],   [Secure Digital/MultiMedia Card],
        [*SELCAL*],   [Selective Calling],
        [*SPI*],        [Serial Peripheral Interface],
        [*SW*],     [Software],
        [*SoC*],        [System on Chip],
        [*USB*],        [Upper Side Band],
        [*VCS*],        [Version Control System],
        [*VHDL*],       [VHSIC Hardware Description Language],
        [*VHSIC*],    [Very High Speed Integrated Circuit],
        [*VOR*],        [VHF Omnidirectional Range],
        [*XPDR*],       [Transponder],
    ),
    caption: [This is a caption.],
)
PgBiel commented 10 months ago

Related: #67 , #2