Make constant tables in both markdown & latex format
Description
This is an alternative to !1034 (closed). Converting markdown tables to rst (to latex to pdf) is going wrong, so we want a workaround.
This uses Jupyter's machinery to produce both formats simultaneously, and store both in the notebook file. In the live notebook, markdown has higher priority (being based on HTML), so the Latex output is hidden. When converting to rst for the PDF report, the Latex format is preferred.
I've drafted this with the calcat_interface2 module, but we could extend it to anywhere we're generating tables.
How Has This Been Tested?
For now, just in a small test notebook. End to end tests still to be done.
Relevant Documents (optional)
Output snippet from nbconvert --to rst
.. code:: ipython3
agipd_cd.summary_table()
.. math::
\begin{tabular}{rll}
\hline
Modules & Offset & SlopesFF \\
\hline
0 & \href{https://in.xfel.eu/calibration/calibration_constant_versions/141880}{2022-09-02 07:42} & \href{https://in.xfel.eu/calibration/calibration_constant_versions/118111}{2022-02-05 13:07} \\
1 & \href{https://in.xfel.eu/calibration/calibration_constant_versions/141821}{2022-09-02 07:42} & \href{https://in.xfel.eu/calibration/calibration_constant_versions/118138}{2022-02-05 13:07} \\
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- My code follows the code style of this project.