LaTeX 标记错误:在“页面”中发现无限收缩。仅使用 tex4ht 时

LaTeX 标记错误:在“页面”中发现无限收缩。仅使用 tex4ht 时

ps. 我无法将整个 MWE 粘贴到这里,因为我收到错误,Body is limited to 30000 characters; you entered 501493这是使用我可以制作的最小尺寸的表格,但会产生错误。


我有一个由程序生成的表格,它有点大。但用 lualatex 编译它没有问题。当我使用 tex4ht 使用我经常使用的相同命令时,它现在给出了这个我从未见过的错误

make4ht -ulm default -a debug -c ./nma_mathjax.cfg main.tex "mathjax,htm,fn-in"
....

(/usr/local/texlive/2022/texmf-dist/tex/generic/tex4ht/html5.4ht)) (./main.aux)
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd))19    nil
 [1] [2]
(/usr/local/texlive/2022/texmf-dist/tex/latex/lm/t1lmtt.fd)Unsupported font pzdr

Overfull \vbox (32240.63214pt too high) detected at line 1125

Overfull \vbox (32240.63214pt too high) has occurred while \output is active

! LaTeX mark Error: Infinite shrinkage found in 'page'.

For immediate help type H <return>.
 ...                                              
                                                  
l.1125 \end{table}
                
? H

This is a coding error.

The mark region 'page' contains some infinite negative glue allowing it to
shrink to an arbitrary size. This makes it impossible to split the region
apart to get at its marks. They are lost.

? 

由于 .tex 文件很大,而且我的nma_mathjax.cfg也很大又需要,所以我把这两个文件放在了最下面链接的文件夹中。我还把lualatex编译出来的.pdf放进去了,没问题。

这些文件是独立的,并且具有重现问题所需的最少包。

只需将.tex 和 .cfg 文件下载到一个文件夹并发出上述命令即可查看问题。

我在 Linux 上使用 TL 2022

>which make4ht
/usr/local/texlive/2022/bin/x86_64-linux/make4ht

这是 .tex 文件预览

\documentclass[12pt]{book}    
\usepackage{amsmath} 
\usepackage{breqn}
\usepackage{graphicx}
\usepackage{caption} %added 2/18/16  for making caption in figure same size as image
\usepackage{multirow} %added 2/21/16. To allow table with columns that span rows
\usepackage{longtable} %2/24/16  does not work in two columns
\usepackage{xcolor}
\usepackage{hyperref}

%added OCT 28, 2018
\ifdefined\HCode 
\newcommand{\cprotect}{}
\else 
\usepackage{cprotect} %only needed to latex
\fi
    
\usepackage{pifont} %http : // ctan.org/pkg/pifont
\newcommand{\cmark}{\textcolor{blue}{\Large \ding{51}}}
\newcommand{\xmark}{\textcolor{red}{\Large \ding{55}}}
\newcommand{\notsure}{\ding{103}} %

%this adds support to fixed width tables.
\newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{tabular}{#1}}{\end{tabular}}
%
\newcommand{\eslowast}{}
\begin{document}        
Number of problems in this table is 1066

Column notations: A is ODE degree. B is Program Number of solutions generated. C is CAS Number of solutions generated.
\ifdefined\HCode
\begin{table}
\caption{isobaric}
\begin{fixedtabular}{|p{1in}|p{5in}|p{0.6in}|p{0.6in}|p{.6in}|p{2in}|p{2in}|p{.75in}|p{.75in}|p{0.75in}|}{1100px}\hline
...... very long table here
\ifdefined\HCode\HCode{<a href="chapters/differential_equations_by_shepley_L_ross_third_edition/indexsubsection66.htm">10619</a>}\else\hyperref[10619]{10619}\fi&\begin{minipage}{\linewidth}\begin{dmath*}{}2 x^{2}+2 x y+y^{2}+\left(x^{2}+2 x y\right) y^{\prime} = 0 \end{dmath*}\end{minipage}&1&\textcolor{red}{1}&2&{isobaric}&[[\_homogeneous, class A], \_exact, \_rational, [\_Abel, 2nd type, class B]]&\textcolor{blue}{\Large \cmark}&\textcolor{blue}{\Large \cmark}&91.892\\ \hline
\ifdefined\HCode
\end{fixedtabular}
\end{table}
\else
\end{longtable}
\fi
\normalsize

\end{document}

如果有人知道这个问题的原因是什么以及如何解决它,我将不胜感激,因为它现在停止了我的构建。过去几个月我没有对 tex4ht 或我的设置进行任何更改,这是我第一次看到这个错误。可能是因为表大小变大了?但这不应该造成问题。

文件位于此文件夹.(安全链接,我自己的页面)

链接到tex4ht 跟踪错误报告

答案1

问题是您创建的表太大(链接的完整 TeX 示例生成了大约 150 页),但您使用tabularTeX4ht。似乎它导致了这个问题。您可以更改代码以longtable在两种情况下使用:

\documentclass[12pt]{book}    
\usepackage{amsmath} 
\usepackage{breqn}
\usepackage{graphicx}
\usepackage{caption} %added 2/18/16  for making caption in figure same size as image
\usepackage{multirow} %added 2/21/16. To allow table with columns that span rows
\usepackage{longtable} %2/24/16  does not work in two columns
\usepackage{xcolor}
\usepackage{hyperref}

%added OCT 28, 2018
\ifdefined\HCode 
\newcommand{\cprotect}{}
\else 
\usepackage{cprotect} %only needed to latex
\fi
    
\usepackage{pifont} %http : // ctan.org/pkg/pifont
\newcommand{\cmark}{\textcolor{blue}{\Large \ding{51}}}
\newcommand{\xmark}{\textcolor{red}{\Large \ding{55}}}
\newcommand{\notsure}{\ding{103}} %

%this adds support to fixed width tables.
\newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{longtable}{#1}}{\end{longtable}}
%
\newcommand{\eslowast}{}
\begin{document}        
Number of problems in this table is 1066

Column notations: A is ODE degree. B is Program Number of solutions generated. C is CAS Number of solutions generated.
\begin{table}
\caption{isobaric}
\begin{fixedtabular}{|p{1in}|p{5in}|p{0.6in}|p{0.6in}|p{.6in}|p{2in}|p{2in}|p{.75in}|p{.75in}|p{0.75in}|}{1100px}\hline
\ifdefined\HCode\HCode{<a href="chapters/differential_equations_by_shepley_L_ross_third_edition/indexsubsection66.htm">10619</a>}\else\hyperref[10619]{10619}\fi&\begin{minipage}{\linewidth}\begin{dmath*}{}2 x^{2}+2 x y+y^{2}+\left(x^{2}+2 x y\right) y^{\prime} = 0 \end{dmath*}\end{minipage}&1&\textcolor{red}{1}&2&{isobaric}&[[\_homogeneous, class A], \_exact, \_rational, [\_Abel, 2nd type, class B]]&\textcolor{blue}{\Large \cmark}&\textcolor{blue}{\Large \cmark}&91.892\\ \hline
\end{fixedtabular}
\end{table}
\normalsize

\end{document}

改变如下:

\newenvironment{fixedtabular}[2]{\gdef\tablewidth{#2}\begin{longtable}{#1}}{\end{longtable}}

然后,您还可以删除表格周围不必要的条件。

结果如下:

在此处输入图片描述

相关内容