mathmaker
0.4(alpha)
|
00001 # -*- coding: utf-8 -*- 00002 00003 # Mathmaker creates automatically maths exercises sheets 00004 # with their answers 00005 # Copyright 2006-2014 Nicolas Hainaux <nico_h@users.sourceforge.net> 00006 00007 # This file is part of Mathmaker. 00008 00009 # Mathmaker is free software; you can redistribute it and/or modify 00010 # it under the terms of the GNU General Public License as published by 00011 # the Free Software Foundation; either version 3 of the License, or 00012 # any later version. 00013 00014 # Mathmaker is distributed in the hope that it will be useful, 00015 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 # GNU General Public License for more details. 00018 00019 # You should have received a copy of the GNU General Public License 00020 # along with Mathmaker; if not, write to the Free Software 00021 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00022 00023 00024 FORMAT = 'LATEX' 00025 FORMAT_NAME_PRINT = 'LaTeX' 00026 00027 # ENCODING 00028 DEFAULT_ENCODING = 'utf8' 00029 UTF8 = 'utf8' 00030 UCS_UTF8X = 'ucs-utf8x' 00031 UTF8X = 'utf8x' 00032 LATIN1 = 'latin1' 00033 ANSINEW = 'ansinew' 00034 00035 # VARIOUS 00036 SPRING_HARDNESS = '4' 00037 00038 # LANGUAGE PACKAGES 00039 FRANCAIS = 'frenchb' 00040 ENGLISH = 'english' 00041 00042 # MATCHES BETWEEN LANGUAGE CODE ('fr', 'en' etc.) 00043 # AND RELATED LATEX PACKAGE NAMES : 00044 LANGUAGE_PACKAGE_NAME = {'fr' : FRANCAIS, 00045 'fr_FR' : FRANCAIS, 00046 'en' : ENGLISH 00047 } 00048 00049 LANGUAGE_CODE_NAMES = {FRANCAIS : 'fr', 00050 ENGLISH : 'en' 00051 } 00052 00053 # TEXT SIZES 00054 TEXT_SIZES = ['\\tiny', '\\scriptsize', '\\footnotesize', '\\small', 00055 '\\normalsize', '\large', '\Large', '\LARGE', '\\huge', '\\HUGE'] 00056 00057 # LATEX MARKUPS' DICTIONNARY 00058 MARKUP = {'LaTeX' : "\LaTeX", 00059 'one' : "1", 00060 'zero' : "0", 00061 'space' : " ", 00062 'small_space' : "\\smallskip", 00063 'med_space' : "\\medskip", 00064 'big_space' : "\\bigskip", 00065 'opening_bracket' : "(", 00066 'closing_bracket' : ")", 00067 'opening_exponent' : "^{", 00068 'closing_exponent' : "}", 00069 'opening_out_striked' : "\\bcancel{", 00070 'closing_out_striked' : "}", 00071 'plus' : "+", 00072 'minus' : "-", 00073 'times' : "\\times ", 00074 'divide' : "\div ", 00075 'equal' : "=", 00076 'not_equal' : "\\neq ", 00077 'opening_fraction' : "\\frac{", 00078 'fraction_vinculum' : "}{", 00079 'closing_fraction' : "}", 00080 'opening_subscript' : "_{", 00081 'closing_subscript' : "}", 00082 'colon' : ":", 00083 'newline' : "\\newline ", 00084 'opening_math_style2' : "$", 00085 'closing_math_style2' : "$", 00086 'opening_math_style1' : "\[", 00087 'closing_math_style1' : "\]", 00088 'simeq' : "\\simeq", 00089 'opening_sqrt' : "\\sqrt{", 00090 'closing_sqrt' : "}", 00091 'open_text_in_maths' : "\\text{", 00092 'close_text_in_maths' : "}", 00093 'open_underline' : "\uline{", 00094 'close_underline' : "}", 00095 'opening_widehat' : "\widehat{", 00096 'closing_widehat' : "}", 00097 'opening_square_bracket' : "\[", 00098 'closing_square_bracket' : "\]", 00099 'text_degree' : "\\textdegree", 00100 'fct_cos' : "\cos" 00101 } 00102 00103 00104 00105 00106