Small fix for article class in plasTeX

I recently found a small error in plasTeX, the program I like to use to convert latex to html. Unfortunately, it looks like it is not being actively developed anymore, but since it is open-source, and it is written in python, which I know, I was able to figure out the issue in not too long. When running plasTeX, I was getting this error:

I started googling around, and found
this post helpful. Basically it complains about not getting a proper stacktrace in the Base/LaTeX/Packages.py module. Indeed, I commented out the try/except clause in the PackageLoader class, and found that the problem was going all the way back to the Packages/article.py script.
I eventually figured out that article was importing stuff from report, which was importing stuff from book. I am not exactly sure why this wasn’t working, but importing directly from book, instead of vis-a-vis report seemed to do the trick.


diff Packages/article.py Packages/article.py.orig
3c3
< from book import * --- > from report import *
7,8c7,8
< import book < book.ProcessOptions(options, document) --- > import report
> report.ProcessOptions(options, document)

I haven’t encountered this issue before. I wonder if it has something to do with python 2.6 versus 2.7. I only use plasTeX about once a year to write my annual report, and I think I might have been on python 2.6 a year ago.

Join 164 other subscribers

Archives

  • 2024 (4)
  • 2023 (8)
  • 2022 (15)
  • 2021 (19)
  • 2020 (1)
  • 2019 (1)
  • 2018 (2)
  • 2017 (1)
  • 2016 (2)
  • 2015 (5)
  • 2014 (5)
  • 2013 (2)
  • 2011 (7)
  • 2010 (10)
  • 2009 (50)
  • 2008 (28)
  • 2007 (31)
  • 2006 (8)

Category