PaperForge.Scientific (PaperForge v1.4.3)

Copy Markdown View Source

Stateful builder for numbered equations, citations, bibliographies, and page-aware scientific cross-references.

Summary

Functions

Adds the numbered bibliography section.

Registers a bibliography entry and returns its stable citation number.

Adds an automatically numbered equation and named destination.

Adds a page-aware reference such as Equation 3, page 8.

Returns the resulting Layout IR.

Types

t()

@type t() :: %PaperForge.Scientific{
  citation_order: [binary()],
  citations: map(),
  equation_count: non_neg_integer(),
  flow: PaperForge.Flow.t()
}

Functions

bibliography(scientific, options \\ [])

@spec bibliography(
  t(),
  keyword()
) :: t()

Adds the numbered bibliography section.

cite(scientific, key, entry)

@spec cite(t(), binary(), map() | keyword()) :: {t(), pos_integer()}

Registers a bibliography entry and returns its stable citation number.

equation(scientific, ast, options \\ [])

@spec equation(t(), PaperForge.Math.ast(), keyword()) :: t()

Adds an automatically numbered equation and named destination.

equation_reference(scientific, number, options \\ [])

@spec equation_reference(t(), pos_integer(), keyword()) :: t()

Adds a page-aware reference such as Equation 3, page 8.

new(flow \\ Flow.new())

@spec new(PaperForge.Flow.t()) :: t()

to_flow(scientific)

@spec to_flow(t()) :: PaperForge.Flow.t()

Returns the resulting Layout IR.