def create_rel_file_str(ana, entry):
 tex_root = ana.tex_root()
 file_name = entry.file_name
 (file_dir, file_base) = os.path.split(file_name)
 (root_dir, _) = os.path.split(tex_root)
 if (file_dir == root_dir):
  show_path = file_base
 else:
  show_path = os.path.relpath(file_dir, root_dir)
  show_path = os.path.join(show_path, file_base)
  if (sublime.platform() == 'windows'):
   show_path = show_path.replace('\\', '/')
 line = line_nr(ana, entry)
 return '{show_path}:{line}'.format(**locals())

def create_rel_file_str ( ana , entry ) : tex_root = ana . tex_root ( ) file_name = entry . file_name ( file_dir , file_base ) = os . path . split ( file_name ) ( root_dir , _ ) = os . path . split ( tex_root ) if ( file_dir == root_dir ) : show_path = file_base else : show_path = os . path . relpath ( file_dir , root_dir ) show_path = os . path . join ( show_path , file_base ) if ( sublime . platform ( ) == 'windows' ) : show_path = show_path . replace ( '\\' , '/' ) line = line_nr ( ana , entry ) return '{show_path}:{line}' . format ( ** locals ( ) )
create a nice string "rel_path/to/file .