Skip to content

Generated tex has a Float Lost error #17

@grosscol

Description

@grosscol

Problem

Report generation fails during .tex compilation to pdf due to "Float(s) lost" error.
The error can be observed by running the smoke tests and looking at the resulting report_v3.log in the tests directory.
This is likely a result of dependency updates when the Ubuntu instance was rebuit after the original image was deprecated.

Source

In commit f15bc31, on the quarter_range_fix branch, The error is corrected by commenting out the call to kable_styling in the table generation.

    knitr::kable(tbl82C4A3,  format.args = list(digits=3), align='c',
                 booktabs=T, format="latex") %>%
    # kable_styling(font_size = 14) %>%
    row_spec(0, bold=T) %>%
    footnote(symbol="\\\\small Other includes Depo, pills, and condoms",
             escape=F)

The difference in the generated .tex is the addition of the table environment and \begingroup surrounding the \tabular.

\begin{table}
\centering
\begingroup\fontsize{14}{16}\selectfont

\begin{tabular}{ccc}
 ...
\end{tabular}
\endgroup{}
\end{table}

Avenues of investigation

  • Do a deeper dive into the .tex and see if the table float or begingroup is a known issue inside a minipage.
  • Try different tex rendering engine. E.g. see if MikTex has the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions