         console.info 'LaTeX clean did not find: ' + fileToRemove
 
   sync: ->
-    unless @pdfFile?
-      console.info 'File needs to be TeXified before SyncTeX can work.' unless atom.inSpecMode()
+    {filePath, lineNumber} = @getEditorDetails()
+
+    unless outputFilePath = @resolveOutputFilePath(filePath)
+      unless atom.inSpecMode()
+        console.info 'Could not resolve path to output file associated with the current file.'
       return
 
-    {filePath, lineNumber} = @getEditorDetails()
-    opener = @getOpener()
-    opener?.open(@pdfFile, filePath, lineNumber)
+    if opener = @getOpener()
+      opener.open(outputFilePath, filePath, lineNumber)
 
   isTexFile: (filePath) ->
     # TODO: Improve; will suffice for the time being.

    return new OpenerImpl()

  moveResult: (result, filePath) ->
    sourceDir = path.dirname(filePath)
    outputFilePath = result.outputFilePath
    result.outputFilePath = path.join(sourceDir, path.basename(outputFilePath))
    fs.moveSync(outputFilePath, result.outputFilePath)
    @pdfFile = result.outputFilePath

    syncFilePath = outputFilePath.replace(/.pdf$/, '.synctex.gz')
    if fs.existsSync(syncFilePath)
      fs.moveSync(syncFilePath, path.join(sourceDir, path.basename(syncFilePath)))

  resolveRootFilePath: (path) ->
    finder = new MasterTexFinder(path)
    finder.getMasterTexPath()

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

        @showError(error)
        return false

      @moveResult(result, rootFilePath) if @shouldMoveResult()
      @showResult(result)

