def init_module(parser, options): parms = parser.parms macros_latex = '' macros_python = [ # the following is for \end{otherlanguage} Macro(parms, '\\babel@skip@space', args='', repl=''), Macro(parms, '\\foreignlanguage', args='OAA', repl=h_foreignlanguage), Macro(parms, '\\selectlanguage', args='A', repl=h_selectlanguage), ] environments = [ Environ(parms, 'otherlanguage', args='A', repl=h_begin_otherlang, add_pars=False, end_func=h_end_otherlang), Environ(parms, 'otherlanguage*', args='A', repl=h_begin_otherlang, add_pars=False, end_func=h_end_otherlang_star), ] inject_tokens = get_language_token(parser.global_latex_options + options) return InitModule(macros_latex=macros_latex, macros_python=macros_python, environments=environments, inject_tokens=inject_tokens)
def init_module(parser, options): parms = parser.parms macros_python = [ # test_macros.py Macro(parms, '\\delim', args='*OA', repl=h_delim), ] environments = [ # test_environments.py Environ(parms, 'comment', repl='', remove=True, add_pars=False), # test_display.py EquEnv(parms, 'flalign', repl=' relation', remove=True), ] return InitModule(macros_python=macros_python, environments=environments)
def init_module(parser, options, position): parms = parser.parms macros_latex = r""" \newcommand{\ctikzset}[1]{} """ macros_python = [] environments = [ Environ(parms, 'circuitikz', remove=True, add_pars=False), ] return InitModule(macros_latex=macros_latex, macros_python=macros_python, environments=environments)
def init_module(parser, options): parms = parser.parms macros_latex = r""" \newcommand{\qedhere}{} \newcommand{\theoremstyle}[1]{} """ macros_python = [] environments = [ Environ(parms, 'proof', args='O', repl=h_proof), ] return InitModule(macros_latex=macros_latex, macros_python=macros_python, environments=environments)
def init_module(parser, options): parms = parser.parms macros_latex = r""" \newcommand{\tikzset}[1]{} \newcommand{\usetikzlibrary}[1]{} """ macros_python = [] environments = [ Environ(parms, 'tikzpicture', remove=True, add_pars=False), ] return InitModule(macros_latex=macros_latex, macros_python=macros_python, environments=environments)
def init_module(parser, options): parms = parser.parms macros_latex = r""" \newcommand{\lstinputlisting}[2][]{\par} \newcommand{\lstset}[1]{} """ macros_python = [] environments = [ Environ(parms, 'lstlisting', remove=True), ] return InitModule(macros_latex=macros_latex, macros_python=macros_python, environments=environments)