lsstprojectmeta/tex/normalizer.py
def _sub_line(match):
        """Function to be used with re.sub to inline files for each match."""
        fname = match.group('filename')
        if not fname.endswith('.tex'):
            full_fname = ".".join((fname, 'tex'))
        else:
            full_fname = fname
        full_path = os.path.abspath(os.path.join(root_dir, full_fname))

        try:
            included_source = read_tex_file(full_path, root_dir=root_dir)
        except IOError:
            logger.error("Cannot open {0} for inclusion".format(full_path))
            raise
        else:
            return included_source
Function to be used with re.sub to inline files for each match.
Function to be used with re.sub to inline files for each match.
Function to be used with re . sub to inline files for each match .
def _sub_line(match):
        fname = match.group('filename')
        if not fname.endswith('.tex'):
            full_fname = ".".join((fname, 'tex'))
        else:
            full_fname = fname
        full_path = os.path.abspath(os.path.join(root_dir, full_fname))
        try:
            included_source = read_tex_file(full_path, root_dir=root_dir)
        except IOError:
            logger.error("Cannot open {0} for inclusion".format(full_path))
            raise
        else:
            return included_source
def _sub_line ( match ) : fname = match . group ( 'filename' ) if not fname . endswith ( '.tex' ) : full_fname = "." . join ( ( fname , 'tex' ) ) else : full_fname = fname full_path = os . path . abspath ( os . path . join ( root_dir , full_fname ) ) try : included_source = read_tex_file ( full_path , root_dir = root_dir ) except IOError : logger . error ( "Cannot open {0} for inclusion" . format ( full_path ) ) raise else : return included_source
Function to be used with re.sub to inline files for each match.
Function to be used with re . sub to inline files for each match .
"""Function to be used with re.sub to inline files for each match."""
match