Skip to content

Main content

Citation Anchor Character Offset Tool

Calculate citation anchor character offset from explicit caller-supplied inputs.

Loading tool…

Description

Return a quote's signed offset relative to an anchor.

Digital editions connect textual witnesses, anchors, page images and source-specific labels. Literal identifier agreement and numerical offsets preserve a supplied convention without proving textual authority, complete coverage or correct editorial interpretation.

Return a quote's signed offset relative to an anchor.

When to use this tool

Use Citation Anchor Character Offset when checking supplied edition identifiers, ordering or coordinate conventions.

How to use the tool and how it works

  1. Enter anchorOffset, quoteOffset. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read relativeOffset. Use the output convention below.

Return a quote's signed offset relative to an anchor. Require nonnegative whole anchorOffset and quoteOffset; relativeOffset = quoteOffset-anchorOffset.1

Input fieldMeaning and unitsAccepted input
anchorOffsetAnchor OffsetRequired. Safe integer; minimum 0.
quoteOffsetQuote OffsetRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
relativeOffsetquoteOffset-anchorOffset, in the caller-selected common character, byte or code-unit convention.Required. Safe integer.
json
{
  "input": {
    "anchorOffset": 100,
    "quoteOffset": 125
  },
  "output": {
    "relativeOffset": 25
  }
}

Limitations and assumptions

  • The caller supplies a common character/byte/code-unit convention; no text is measured or citation resolved.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Inspect the original edition and its encoding model before treating local record agreement as meaningful textual or historical evidence.

References

  1. Calculation and input contract: digital-humanities/citation-anchor-character-offset — tool.io

Similar or alternative tools