   alterParentPath: (targetPath, originalPath) ->
     targetDir = path.dirname(targetPath)
     path.join(targetDir, path.basename(originalPath))
+
+  shouldMoveResult: -> atom.config.get('latex.moveResultToSourceDirectory')
+  shouldOpenResult: -> atom.config.get('latex.openResultAfterBuild')

_ = require 'underscore-plus'
fs = require 'fs-plus'
path = require 'path'
LatexmkBuilder = require './builders/latexmk'
MasterTexFinder = require './master-tex-finder'

ErrorIndicatorView = require './error-indicator-view'
ProgressIndicatorView = require './progress-indicator-view'

ConfigSchema = _.clone(require('./config-schema')) # Is the clone necessary?
module.exports =
  config: ConfigSchema


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

  showResult: (result) ->
    if @shouldOpenResult() and opener = @getOpener()
      {filePath, lineNumber} = @getEditorDetails()
