   destroyErrorIndicator: ->
     @errorIndicator?.destroy()
     @errorIndicator = null
+
+  isTexFile: (filePath) ->
+    # TODO: Improve; will suffice for the time being.
+    return filePath?.search(/\.(tex|lhs)$/) > 0
+
+  getEditorDetails: ->
+    editor = atom.workspace.getActiveTextEditor()
+    return unless editor?
+
+    editorDetails =
+      filePath: editor.getPath()
+      lineNumber: editor.getCursorScreenPosition().row + 1
+
+  alterParentPath: (targetPath, originalPath) ->
+    targetDir = path.dirname(targetPath)
+    path.join(targetDir, path.basename(originalPath))

    outputFilePath = @alterParentPath(rootFilePath, outputFilePath) if @shouldMoveResult()
    outputFilePath

  alterParentPath: (targetPath, originalPath) ->
    targetDir = path.dirname(targetPath)
    path.join(targetDir, path.basename(originalPath))

  shouldMoveResult: ->
    atom.config.get('latex.moveResultToSourceDirectory')


        console.info 'LaTeX clean removed: ' + fileToRemove
      else
        console.info 'LaTeX clean did not find: ' + fileToRemove

  getBuilder: ->
    new LatexmkBuilder()
