Skip to content

Make LaTeX export work for large spreadsheets that span multiple pages

Orestes Mas requested to merge omas/labplot:master into master

When the datasheet to export has a large number of rows the LaTeX export spans multiple pages. The export creates multiple table floats (one per page) and inserts page breaks using \newpage. However, due to LaTeX float placing mechanism, float processing are delayed until some text is found (which never occurs) and floats accumulate to a point that exceeds TeX capacity, leading to an error:

! LaTeX Error: Too many unprocessed floats.

According to https://tex.stackexchange.com/questions/46512/too-many-unprocessed-floats there are some solutions to this problem, but in labplot export context, changing \newpage to \clearpage seems to be the neatest one.

Using \clearpage instead of \newpage to insert a page break makes LaTeX flush its float cache at every page so that the number of unprocessed floats in memory never hits its limit.

Edited by Orestes Mas

Merge request reports