Companion object for LatexRenderer providing utility methods and syntax extensions.
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LatexRenderer.type
Members list
Type members
Classlikes
Syntax extension that adds toLatex method to any type with a LatexRenderer instance.
Syntax extension that adds toLatex method to any type with a LatexRenderer instance.
Example usage:
import LatexRenderer._
val solution = QuadraticSolution(...)
val latex = solution.toLatex
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Value members
Concrete methods
Summoner method for accessing typeclass instances.
Summoner method for accessing typeclass instances.
Type parameters
- A
-
the type for which to retrieve the renderer
Attributes
- Returns
-
the LatexRenderer instance for type A
Helper method to create a fraction.
Helper method to create a fraction.
Value parameters
- denominator
-
the denominator
- numerator
-
the numerator
Attributes
- Returns
-
LaTeX fraction notation
Constructor for creating LatexRenderer instances from functions.
Constructor for creating LatexRenderer instances from functions.
Type parameters
- A
-
the type to render
Value parameters
- f
-
the function that converts A to LaTeX
Attributes
- Returns
-
a new LatexRenderer instance
Helper method to wrap content in LaTeX math mode delimiters.
Helper method to wrap content in LaTeX math mode delimiters.
Value parameters
- content
-
the LaTeX expression
- inline
-
if true, uses inline math mode ($...$), otherwise display mode ($$...$$)
Attributes
- Returns
-
the content wrapped in appropriate delimiters
Helper method to create an nth root.
Helper method to create an nth root.
Value parameters
- content
-
the radicand
- n
-
the root degree
Attributes
- Returns
-
LaTeX nth root notation
Helper method to format a sign (+ or -) with appropriate spacing.
Helper method to format a sign (+ or -) with appropriate spacing.
Value parameters
- isPositive
-
if true, returns "+", otherwise "-"
Attributes
- Returns
-
the formatted sign
Helper method to create a square root.
Helper method to create a square root.
Value parameters
- content
-
the radicand
Attributes
- Returns
-
LaTeX square root notation
Implicits
Implicits
Syntax extension that adds toLatex method to any type with a LatexRenderer instance.
Syntax extension that adds toLatex method to any type with a LatexRenderer instance.
Example usage:
import LatexRenderer._
val solution = QuadraticSolution(...)
val latex = solution.toLatex