BRational

The goal of BRational is to format certain rational functions in SageMath to enable users to think entirely about their own work and interests and not about formatting.

Install

The simplest way to install BRational is to run the following

  • in a terminal:
$ sage --pip install brational
  • or in SageMath:
sage: %pip install brational

Alternatively, one can download the latest release and unzip it into a directory that SageMath can find for importing.

Update

To update an older version of BRational to the latest version, run the following

  • in a terminal:
$ sage --pip install brational --upgrade 
  • or in SageMath:
sage: %pip install brational --upgrade 

BRational has no external dependencies and is compatible with SageMath 9.6 and later. It may work just fine with earlier versions of SageMath, but these have not been tested.

Uninstall

Assuming you installed BRational by using pip (see Install), then you can run one of the following

  • in a terminal:
$ sage --pip uninstall brational
  • or in SageMath:
sage: %pip uninstall brational

Importing

Import BRational during your SageMath run with the following

import brational as br

Throughout this documentation, we use br for the reference name of brational.

Citing

If you have used BRational and would like to cite us, please adapt the following to your style.

  • Joshua Maglione, BRational: Beautiful formatting of rational functions, version 2.0.1, 2025, https://github.com/joshmaglione/BRational.

BibTeX format:

@misc{BRational,
  author       = {Joshua Maglione},
  title        = {{BR}ational: {B}eautiful formatting of rational functions, version 2.0.1},
  note         = {\url{https://github.com/joshmaglione/BRational}},
  year         = {2025},
}