code: def TeXLaTeXFunction(target = None, source= None, env=None):
      
  
      # find these paths for use in is_LaTeX to search for included files
      basedir = os.path.split(str(source[0]))[0]
      abspath = os.path.abspath(basedir)
  
      if is_LaTeX(source,env,abspath):
          result = LaTeXAuxAction(target,source,env)
          if result != 0:
              check_file_error_message(env['LATEX'])
      else:
          result = TeXAction(target,source,env)
          if result != 0:
              check_file_error_message(env['TEX'])
      return result
docs: A builder for TeX and LaTeX that scans the source file to
      decide the "flavor" of the source and then executes the appropriate
      program.