当我使用 longtblr 处理长表时,当到达第 140 行时,pdf 文件可以正常生成,但是从第 140 行开始出现错误:“错误的寄存器代码 (32768)”。我认为这是因为内存溢出。
请帮我解释一下这个代码吗?
P/s:我只能用表格中的 4 行来说明,因为 stackexchange 的限制不允许文本超过 30000 个字符。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T5]{fontenc}
\usepackage{parskip}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage[fontsize=14pt]{scrextend}
\usepackage[paperheight=21cm,paperwidth=29.7cm,right=1cm,left=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{mathptmx}
\usepackage{ulem}
\renewcommand{\ULdepth}{6pt}
\renewcommand{\ULthickness}{1pt}
\usepackage{tabularx}
\usepackage{tabularray}
\usepackage{pdflscape}
\usepackage{array}
\usepackage{indentfirst}
\setlength{\parindent}{1.27cm}
\renewcommand{\baselinestretch}{1}
\usepackage{ragged2e}
\justifying
\setlength{\parskip}{6pt}
\thispagestyle{empty}
\pagenumbering{gobble}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\begin{document}
\DefTblrTemplate{contfoot-text}{default}{}
\DefTblrTemplate{conthead-text}{default}{}
\DefTblrTemplate{caption}{default}{}
\DefTblrTemplate{conthead}{default}{}
\DefTblrTemplate{capcont}{default}{}
\SetTblrInner{rowsep=0pt}
\noindent
\begin{longtblr}{width=1\linewidth,rowhead=1,rowhead=2, rowhead=3, hlines,vlines,
colspec={X[0.5,c] X[1.7,c] X[1.7,c] X[1.7,c] X[1,c] X[2,c] X[1.3,c] X[1.3,c] X[1.3,c] X[1.3,c]X[1.3,c]},
colsep=6pt,
rowsep=3pt,
rows={font=\small,m},
row{1,2,3}={c,font=\small\bfseries}}
\SetCell[r= 2]{c} STT & \SetCell[r= 2]{c} Tên cơ sở bán lẻ & \SetCell[r= 2]{c} Người chịu trách nhiệm chuyên môn & \SetCell[r= 2]{c} CMT người chịu trách nhiệm chuyên môn & \SetCell[r= 2]{c} Trình độ chuyên môn & \SetCell[r= 2]{c} Địa chỉ & \SetCell[c= 2]{c} {GCN đủ điều kiện \\kinh doanh dược} & & \SetCell[c= 3]{c} {GCN đạt \\Thực hành tốt cơ sở bán lẻ thuốc} & & \\
& & & & & & Số & Ngày cấp & Số & Ngày cấp & Ngày hết hạn \\
(1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) \\
% *****************************************?
1 & Nhà thuốc Yến Nhi & Nguyễn Thị Huyền Tâm & 135 558 971 & Dược sỹ đại học & 289 đường Lê Duẩn, Liên Bảo, Vĩnh Yên, Vĩnh Phúc & {00189/ \\ĐKKDD-VP}&10/12/2019&00189/GPP&10/12/2019&10/12/2022\\
2 & Nhà thuốc Nguyễn Văn Mừng & Nguyễn Văn Mừng & 135 825 977 & Dược sỹ đại học & Khuôn viên BV 109, Tô Hiến Thành, Đồng Tâm, Vĩnh Yên, Vĩnh Phúc & {00188/ \\ĐKKDD-VP}&10/12/2019&00188/GPP&10/12/2019&10/12/2022\\
3 & Quầy thuốc số 57 Nguyễn Công Sang & Nguyễn Công Sang & 0260 8500 2968 & Dược sỹ trung cấp & Phú Nông, Kim Xá, Vĩnh Tường, Vĩnh Phúc & {0756/ \\ĐKKDD-VP}&30/12/2019&0756/GPP&30/12/2019&30/12/2022\\
4 & Quầy thuốc số 12 Nguyễn Thị Xuân & Nguyễn Thị Xuân & 135 741 211 & Dược sỹ trung cấp & Khu 7, Vũ Di, Vĩnh Tường, Vĩnh Phúc & {0755/ \\ĐKKDD-VP}&30/12/2019&0755/GPP&30/12/2019&30/12/2022\\
\end{longtblr}
\end{document}
答案1
tabularray
用于l3regex
分割正文。l3regex
无法处理长度超过 32732 个标记的文本(使用 lualatex 会更多,但仍然是有限的数字)。这是一个硬性限制,这意味着可以处理的表格大小tabularray
受到限制。要么分割表格,要么改用longtable
。