chrisjsewell/ipypublish

Widefigure option not compiling in Latex

Closed this issue · 1 comments

Bug Report

Describe the bug

When the "widefigure" option is set to true for a figure, the generated Latex looks something like:

\begin{figure*}...\end{figure}

(note that "figure*" is ended by "figure" with no *). This leads to the error "! LaTeX Error: \begin{figure*} on input line XY ended by \end{figure}." when compiling with pdflatex or with the -pdf option.

To Reproduce

Steps to reproduce the behavior:

  1. Create a notebook with a cell containing an image and the following metadata:
{
  "ipub": {
    "figure": {
      "widefigure": true
    }
  }
}
  1. Run the command: nbpublish -pdf Notebook.ipynb.

Minimal Notebook Example

Test image and notebook.
google
Wide-Figure-Test.txt

Expected Behaviour

A PDF file is generated.

Runtime Information

  • IPyPublish: 0.9.2

  • Python: Python 3.7.2

  • OS: Arch Linux

  • Pandoc: 2.2.3.2

  • (optional for pdf issues) texlive: 3.14159265 (TeX Live 2017)

  • (optional for pdf issues) latexmk: 4.55

Logging

Wide-Figure-Test.nbpub.log

fixed by #69 thanks @katie-jones