Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption placed above and below cell #130

Open
Benfeitas opened this issue Feb 5, 2020 · 2 comments
Open

Caption placed above and below cell #130

Benfeitas opened this issue Feb 5, 2020 · 2 comments
Labels

Comments

@Benfeitas
Copy link

Benfeitas commented Feb 5, 2020

I am specifying captions as suggested in the docs: In a markdown cell I write down the caption, and edit its medata to show

{
  "ipub": {
    "caption": "fig:mylabel"
  }
}

Then I specify the metadata of the figure cell as

{
  "ipub": {
    "figure": {
      "width": 0.6,
      "widefigure": false,
      "caption": "",
      "label": "fig:mylabel",
      "placement": "H",
      "height": 0.4
    }
  }
}

I then convert the nb to html through:

nbpublish -lb -f html_ipypublish_main mynb.ipynb --pdf-debug --clear-files

however the caption appears above and below the figure once rendered to html. Any way to solve this?
edit: interestingly, this only seems to happen with figures and not with tables.
edit2: specifying the caption only in the metadata of the figure cell still shows caption both above and below the cell.

@Benfeitas Benfeitas added the bug label Feb 5, 2020
@chrisjsewell
Copy link
Owner

Hey @Benfeitas thanks for the feedback. I'm pretty busy at the moment 😦 so I might not be able to get round to looking at this super quick. Have you tried not putting the "caption" key in the metadata of the figure cell (just the markdown one)?

@Benfeitas
Copy link
Author

Hi @chrisjsewell , thanks for coming back to me. Yes, so removing the "caption" key from the figure cell, and having it only in the markdown cell, unfortunately doesn't change anything. Actually, it seems to be linked only with the metadata of the figure cell, and removing the "caption" key from the figure cell simply removes any labeling of the figure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants