comet.CCrossRef

class comet.CCrossRef

See also

Module hyperlink

Methods

CCrossRef.getName()

Get the name of the cross reference destination.

Returns

The reference name

Return type

str

Raises

CometError – On internal error

Available

CScript

link::crossref::name

CCrossRef.getDocumentName()

Get the document name of the cross reference destination.

Returns

The document name

Return type

str

Raises

CometError – On internal error

Available

CScript

link::crossref::document

CCrossRef.getDocumentPath()

Get the full path to the document of the cross reference destination.

Returns

The document path

Return type

str

Raises

CometError – On internal error

Available

CScript

link::crossref::document

CCrossRef.getPageIndex(fromBook=True)

Get the page indef of the cross reference destination.

Parameters

fromBook (bool) –

Get the index from the book or document

  • True: Index from book

  • False: Index from document

Returns

The page index

Return type

int

Raises
Available

CScript

link::crossref::page

CCrossRef.getPageName(fromBook=True)

Get the page name of the cross reference destination.

Parameters

fromBook (bool) –

Get the name from the book or document.

  • True: Page name from book

  • False: Page name from document

Returns

The page name

Return type

str

Raises
Available

CScript

link::crossref::pagename

CCrossRef.getDestination()

Get the Comet ID of the cross reference destination.

The result may have a number appended when multiple crossrefs with the same ID exist.

Returns

The comet ID as a string

Return type

str

Raises

CometError – On internal error

Available

CScript

link::crossref::destination

CCrossRef.getPosition()

Get the coordinates of the cross reference destination’s text position.

The coordinates are relative to the containing frame.

This function only yields valid values when the coordinates were calculated during hyperlink.findCrossRefs()

Returns

The coordinates of the text position

Return type

tuple[float, float]

Raises

CometError – On internal error

Available

CScript
CCrossRef.getFrameBBox()

Get the frame bounding box of the cross reference destination’s text frame.

Returns

The frame bounding box of the cross reference destination’s text frame

Return type

CRect

Raises

CometError – On internal error

Available

CScript
CCrossRef.getIndex()

Get the text anchor index of the cross reference destination.

Returns

The text anchor index

Return type

int

Raises

CometError – On internal error

Available

CScript

link::crossref::pos

CCrossRef.getFrame()

Get the frame of the cross reference destination.

Returns

The frame containing the destination

Return type

CFrame

Raises

CometError – On internal error

Available

CScript

link::crossref::frame