Beispiel #1
0
def _escape(inString):
    return multiple_replace({'_':'\\_',
                             '^':'\\textasciicircum{}',
                             '{':'\\{',
                             '}':'\\}',
                             '%':'\\%',
                             '\\':'\\textbackslash{}',
                             '&':'\\&',
                             '~':'\\textasciitilde{}'},
                            inString)
Beispiel #2
0
def LatexString(char):
    latexChar = open(resource('resources','char.tex')).read()
    latexChar = multiple_replace({'PYCHARGEN_STATS_OVERVIEW':_statsString(char),
                                  'PYCHARGEN_COMMON_SKILLS_OVERVIEW':_skillOverviewString(char),
                                  'PYCHARGEN_RESISTANCES_OVERVIEW':_resistanceString(char),
                                  'PYCHARGEN_SKILL_FULLLIST':_skillFullListString(char),
                                  'PYCHARGEN_CHARACTER_NAME':char.GetMisc('Name'),
                                  'PYCHARGEN_LEVEL':str(char.GetMisc('Level')),
                                  'PYCHARGEN_PROFESSION':char.GetMisc('Profession'),
                                  },latexChar)
    return latexChar
Beispiel #3
0
def _escape(inString):
    return multiple_replace(
        {
            '_': '\\_',
            '^': '\\textasciicircum{}',
            '{': '\\{',
            '}': '\\}',
            '%': '\\%',
            '\\': '\\textbackslash{}',
            '&': '\\&',
            '~': '\\textasciitilde{}'
        }, inString)
Beispiel #4
0
def LatexString(char):
    latexChar = open(resource('resources', 'char.tex')).read()
    latexChar = multiple_replace(
        {
            'PYCHARGEN_STATS_OVERVIEW': _statsString(char),
            'PYCHARGEN_COMMON_SKILLS_OVERVIEW': _skillOverviewString(char),
            'PYCHARGEN_RESISTANCES_OVERVIEW': _resistanceString(char),
            'PYCHARGEN_SKILL_FULLLIST': _skillFullListString(char),
            'PYCHARGEN_CHARACTER_NAME': char.GetMisc('Name'),
            'PYCHARGEN_LEVEL': str(char.GetMisc('Level')),
            'PYCHARGEN_PROFESSION': char.GetMisc('Profession'),
        }, latexChar)
    return latexChar