pylatex.labelref

This module implements the label command and reference.

class Marker(name, prefix='', del_invalid_char=True)[source]

Bases: pylatex.base_classes.latex_object.LatexObject

A class that represents a marker (label/ref parameter).

Parameters:
  • name (str) – Name of the marker.
  • prefix (str) – Prefix to add before the name (prefix:name).
  • del_invalid_char (bool) – If True invalid and dangerous characters will be removed from the marker
class RefLabelBase(marker)[source]

Bases: pylatex.base_classes.command.CommandBase

A class used as base for command that take a marker only.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Label(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represents a label.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Ref(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represents a reference.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Pageref(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represents a page reference.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Eqref(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represent a ref to a formulae.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Cref(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represent a cref (not a Cref).

Parameters:marker (Marker) – The marker to use with the label/ref.
class CrefUp(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represent a Cref.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Autoref(marker)[source]

Bases: pylatex.labelref.RefLabelBase

A class that represent an autoref.

Parameters:marker (Marker) – The marker to use with the label/ref.
class Hyperref(marker, text)[source]

Bases: pylatex.base_classes.command.CommandBase

A class that represents an hyperlink to a label.

Parameters:
  • marker (Marker) – The marker to use with the label/ref.
  • text (str) – The text that will be shown as a link to the label of the same marker.