def tex2plain(string): """Parse string and return its plain text version.""" return detex( silent_yacc(module=LatexParser(), ).parse( string, lexer=SimpleLexer().lexer, ))
def tex2plain(string): """Parse string and return its plain text version.""" return detex( latex_yacc().parse( string, lexer=SimpleLexer().lexer, ) )
def tex2plain(string): """Parse string and return its plain text version.""" return detex( silent_yacc( module=LatexParser(), ).parse( string, lexer=SimpleLexer().lexer, ) )
def parse_song(content, filename=None): """Parse some LaTeX code, expected to be a song. Arguments: - content: the code to parse. - filename: the name of file where content was read from. Used only to display error messages. """ return detex( latex_yacc(filename).parse( content, lexer=SongLexer().lexer, ).metadata)
def parse_song(content, filename=None): """Parse some LaTeX code, expected to be a song. Arguments: - content: the code to parse. - filename: the name of file where content was read from. Used only to display error messages. """ return detex( silent_yacc(module=LatexParser(filename)).parse( content, lexer=SongLexer().lexer, ).metadata )
def tex2plain(string): """Parse string and return its plain text version.""" return detex(latex_yacc().parse( string, lexer=SimpleLexer().lexer, ))