             @log.find("textarea").text("Running Latex...")
             run_latex.icon_spin(true, disable=true)
             @preview.pdflatex._run_latex @load_conf_doc().latex_command, (err, log) =>
+                @log.find("textarea").text(log)
+                # the log changed, there could be issues, render them
+                @render_error_page()
                 run_latex.icon_spin(false, disable=true)
-                @log.find("textarea").text(log)
             return false
 
         run_recompile = @element.find('a[href="#latex-recompile"]')


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


    # this sets the "visual state" for @_render_preview
    set_toggle_preview_state: (enabled) =>
        @local_storage(LSkey.render_preview, enabled)
        @_toggle_preview_button.toggleClass('active', enabled)
        @_toggle_preview_button.attr('aria-pressed', enabled)
        icon = @_toggle_preview_button.find('i')
