def _load_latex2unicode_constants(kb_file=None):
if kb_file is None:<EOL><INDENT>kb_file = get_kb_filename()<EOL><DEDENT>try:<EOL><INDENT>data = open(kb_file)<EOL><DEDENT>except IOError:<EOL><INDENT>sys.stderr.write(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>return CFG_LATEX_UNICODE_TRANSLATION_CONST<EOL><DEDENT>latex_symbols = []<EOL>translation_table = {}<EOL>for line in data:<EOL><INDENT>line = line.decode('<STR_LIT:utf-8>')<EOL>mapping = line.split('<STR_LIT>')<EOL>translation_table[mapping[<NUM_LIT:0>].rstrip('<STR_LIT:\n>')] = mapping[<NUM_LIT:1>].rstrip('<STR_LIT:\n>')<EOL>latex_symbols.append(re.escape(mapping[<NUM_LIT:0>].rstrip('<STR_LIT:\n>')))<EOL><DEDENT>data.close()<EOL>CFG_LATEX_UNICODE_TRANSLATION_CONST[<EOL>'<STR_LIT>'] = re.compile("<STR_LIT:|>".join(latex_symbols))<EOL>CFG_LATEX_UNICODE_TRANSLATION_CONST['<STR_LIT>'] = translation_table<EOL>
Load LaTeX2Unicode translation table dictionary.

    Load LaTeX2Unicode translation table dictionary and regular
    expression object from KB to a global dictionary.

    :param kb_file: full path to file containing latex2unicode translations.
                    Defaults to CFG_ETCDIR/bibconvert/KB/latex-to-unicode.kb
    :type kb_file: string

    :return: dict of type: {'regexp_obj': regexp match object,
                            'table': dict of LaTeX -> Unicode mappings}
    :rtype: dict