MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

attrs_image does not work in jupyterbook

Open yun881201 opened this issue 3 years ago • 0 comments

Describe the bug

I am writing a report using jupyterbook. To print dataframes as tables in pdf, I am utilizing list-table and png image obtained from dataframe_image library The following is my code.

```{list-table} caption for example
:name: example
* - ![](figure/xxx.png)
```

Since small dataframes are displayed bigger than original scale in pdf, to adjust scale of , I tried to utilize attrs_image. So I added the following line in _config.yml

parse:
  myst_enable_extensions: 
    - attrs_image

and fixed the previous code like this

```{list-table} caption for example
:name: example
* - ![](figure/xxx.png){scale="50%" align=center}
```

But In the output pdf, I obtained just text {scale="50%" align=center}

|--------|
| figure |
|--------|{scale="50%" align=center}  

Reproduce the bug

  1. Add the following line in _config.yml
parse:
  myst_enable_extensions: 
    - attrs_image
  1. Write the folowing code at a markdown cell in jupyter notebook
```{list-table} caption for example
:name: example
* - ![](figure/xxx.png){scale="50%" align=center}
```
  1. Create PDF using jupyterbook

  2. Than you obtain just text {scale="50%" align=center}

|--------|
| figure |
|--------|{scale="50%" align=center}  

List your environment

No response

yun881201 avatar Dec 09 '22 04:12 yun881201