Friday, November 16, 2012

LaTeX import

Problem: You need to break up a large LaTeX document into smaller files (eg. chapters) each in its own folder with figures. LaTeX `include` requires you to specify the path of the figures with respect to the main tex document, rather than the subdocument  which is illogical.

Solution: Use the import package and instead of \include{dir/file}, use \import{dir/}{file} which will handle subdirectories.

Monday, November 12, 2012

Less well known Python libraries

(Based on this thread from Hacker news)

  1. docopt - does the job of argparse but lets you specify the options in the doc string
  2. fuzzywuzzy - fuzzy string matching