     # this sets the "visual state" for @_render_preview
     set_toggle_preview_state: (enabled) =>
         @local_storage(LSkey.render_preview, enabled)
-        if enabled
-            # when enabling preview (again), reset ignore to false
-            @local_storage(LSkey.ignore_invalid_latex, false)
         @_toggle_preview_button.toggleClass('active', enabled)
         @_toggle_preview_button.attr('aria-pressed', enabled)
         icon = @_toggle_preview_button.find('i')

{project_tasks} = require('./project_tasks')
{salvus_client} = require('./salvus_client')

templates = $("#salvus-editor-templates")

# this regex matches the `@_get()` content iff it is a compileable latex document
RE_FULL_LATEX_CODE = new RegExp('\\\\documentclass{[^}]*}[^]*?\\\\begin{document}[^]*?\\\\end{document}', 'g')


    update_preview: (cb, force=false) =>
        if not @_render_preview
            cb?()
            return

        # no content available, hence nothing to preview
        if not @latex_editor.syncdoc._fully_loaded
            cb?()
            return

