def escape_latex(string):
    """
    Get string, where reserved LaTeX charachters are escaped.

    For more info regarding LaTeX reserved charachters read this:
    https://en.wikibooks.org/wiki/LaTeX/Basics#Reserved_Characters
    """
    string = string.replace('\\', '\\\\')
    string = string.replace('&', '\\&')
    string = string.replace('%', '\\%')
    string = string.replace('$', '\\$')
    string = string.replace('#', '\\#')
    string = string.replace('_', '\\_')
    string = string.replace('{', '\\{')
    string = string.replace('}', '\\}')
    string = string.replace('~', '\\textasciitilde ')
    string = string.replace('^', '\\textasciicircum ')
    return string
