Module pyreport.report
A module to create LaTeX reports.
This module provides a class to create LaTeX reports. It is based on the LaTeX document classes 'article' and 'report'. The report is created in the 'out' folder and is compiled with 'latexmk'.
Classes
class Reporter (report_name, type='report', fontsize=12, columns='onecolumn', titlepage='notitlepage', packages=[], author='', title='', date='\\today', maketitle=True, maketoc=False, save_path='./out', export_pdf=True)-
A class to create LaTeX reports.
Constructor for Reporter.
Parameters
report_name:str- Name of report.
type:{"article", "report"}, optional- Type of report, by default "report".
fontsize:{10, 11, 12}, optional- Font size, by default 12.
columns:{"onecolumn", "twocolumn"}, optional- Number of columns, by default "onecolumn".
titlepage:{"notitlepage", "titlepage"}, optional- Title page, by default "notitlepage".
packages:list, optional- List of packages to import, by default [].
author:str, optional- Author of report, by default "".
title:str, optional- Title of report, by default "".
date:str, optional- Date of report, by default "\today".
maketitle:bool, optional- Make title, by default True.
maketoc:bool, optional- Make table of contents, by default False.
Methods
def add_to_document(self, obj)-
Adds an object to the document.
Parameters
obj:Environment, LaTeXObject- Object to add to document.
def print_structure(self)-
Prints the structure of the report.
def report(self)-
Creates and compiles the report.
Raises
ReportError- Raised when report cannot be made.