szaghi / MaTiSSe

Markdown To Impressive Scientific Slides
47 stars 11 forks source link

python3: Fix "TypeError: 'dict_keys' object is not subscriptable" #42

Closed band-a-prend closed 3 years ago

band-a-prend commented 3 years ago

I installed MaTiSSe from pypi tarball, applied last Fix issue with Python 3 patch for MaTiSSe and then execution of command $ MaTiSSe.py -i getting_started.md --toc-at-subsec-beginning 2 within getting_stated example directory results in error:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/MaTiSSe.py", line 5, in <module>
    main()
  File "/usr/lib/python3.9/site-packages/matisse/matisse.py", line 164, in main
    make_presentation(config=config, source=source, output=output)
  File "/usr/lib/python3.9/site-packages/matisse/matisse.py", line 117, in make_presentation
    presentation.parse(config=config, source=source)
  File "/usr/lib/python3.9/site-packages/matisse/presentation.py", line 366, in parse
    slide.overtheme.copy_from(other=self.theme)
  File "/usr/lib/python3.9/site-packages/matisse/theme.py", line 163, in copy_from
    append_css(my_element=self.toc_chapter_emph, other_element=other.toc_chapter_emph)
  File "/usr/lib/python3.9/site-packages/matisse/theme.py", line 151, in append_css
    if css.keys()[0] in mycss:
TypeError: 'dict_keys' object is not subscriptable

The offered patch should fix this error.

Also the --indented option is dropped from getting_stated/README.md example as this option was purged out early from MaTiSSe.

band-a-prend commented 3 years ago

With this patch the getting_stated.md presentation generation works but only MathJax offline fonts aren't presented in tarball.

At the same time I have no success to generate sample presentation (MaTiSSe.py --sample my_new_talk.md) with any style. The result page index.html page looks like (MathJax fonts problem could be ignored here):

image

szaghi commented 3 years ago

@band-a-prend

Thank you very much for your help, it is really appreciated.

I'll try to find out the reasons for the other issues.

Cheers