chrisjsewell / ipypublish

A workflow for creating and editing publication ready scientific reports and presentations, from one or more Jupyter Notebooks, without leaving the browser!
http://ipypublish.readthedocs.io
BSD 3-Clause "New" or "Revised" License
224 stars 37 forks source link

Doubt: Is it possible to add a Short and a Long Caption for a jupyter notebook cell metadata? Is it possible to convert to latex instead of pdf? #149

Open DTKx opened 2 years ago

DTKx commented 2 years ago

Hello,

I was testing the library to see if I could add:

Initially I tested the following metadata:

{
  "ipub": {
    "figure": {
      "caption": "[Short Caption](Looooooooooooong Caption. Source \cite{Jankaukas2019})",
      "label": "fig:label1",
      "placement": "H",
      "height": 0.4,
      "widefigure": false
    }
  }
}

Then it prompted:WARNING: Could not save invalid JSON. So I have tried escaping the caption:

      "caption": "\[Short Caption\]\(Looooooooooooong Caption. Source \\cite\{Jankaukas2019\}\)",

Still no success, is there any other alternative?

Thanks :)

DTKx commented 2 years ago

Additionally, I have checked the documentation is it possible to convert it to latex instead of PDF? I have checked the documentation and found here that it can be outputted as latex, however I cannot find an example. Could you please advise how to call nbpublish to convert to latex, I have tested:

nbpublish -latex -lb -f latex_ipypublish_nocode Reproducao_Artigo.ipynb

However this error appears error: unrecognized arguments: -latex Thanks