diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 489498d90c..62949b5fef 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -54,6 +54,8 @@ class KeyMapper(object): endp = 0 if size < base else 36 diff = (abs(base - size) * 3) + ((36 - size) / 100) logb = abs(base - endp) + if logb == 0: + logb = 1e-6 result = sign * math.log(diff, logb) return result diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index bda194f35e..379b45c52d 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: calibre 0.8.41\n" -"POT-Creation-Date: 2012-02-24 17:47+IST\n" -"PO-Revision-Date: 2012-02-24 17:47+IST\n" +"POT-Creation-Date: 2012-02-24 19:05+IST\n" +"PO-Revision-Date: 2012-02-24 19:05+IST\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" @@ -17317,7 +17317,7 @@ msgid "Control order of categories in the tag browser" msgstr "" #: /home/kovid/work/calibre/resources/default_tweaks.py:131 -msgid "Change the following dict to change the order that categories are displayed in\nthe tag browser. Items are named using their lookup name, and will be sorted\nusing the number supplied. The lookup name '*' stands for all names that\notherwise do not appear. Two names with the same value will be sorted\naccording to the default order; the one used when the dict is empty.\nExample: tag_browser_category_order = {'series':1, 'tags':2, '*':3}\nresulting in the order series, tags, then everything else in default order." +msgid "Change the following dict to change the order that categories are displayed in\nthe tag browser. Items are named using their lookup name, and will be sorted\nusing the number supplied. The lookup name '*' stands for all names that\notherwise do not appear. Two names with the same value will be sorted\nusing the default order; the one used when the dict is empty.\nExample: tag_browser_category_order = {'series':1, 'tags':2, '*':3}\nresulting in the order series, tags, then everything else in default order." msgstr "" #: /home/kovid/work/calibre/resources/default_tweaks.py:141