                 @forward_search(active:true)
 
     render_error_message: (mesg) =>
-
         if not mesg.line
             r = mesg.raw
             i = r.lastIndexOf('[')

        else
            try
                res = parseInt(res)
                if res < 150
                    res = 150
                else if res > 600
                    res = 600
                @preview.opts.resolution = res
                @preview.update()
            catch e
                alert_message(type:"error", message:"Invalid resolution #{res}")

    get_resolution: () =>
        return @preview.opts.resolution

    # This function isn't called on save button click since

        n = @filename.length

        # The pdf preview.
        @preview = new editor.PDF_Preview(@project_id, @filename, undefined, {resolution:@get_resolution()})
        @element.find(".salvus-editor-latex-png-preview").append(@preview.element)
        @_pages['png-preview'] = @preview
        @preview.on 'shift-click', (opts) => @_inverse_search(opts)
