Citations & bibliography
Citations pair a structured bibliography source registry on the document with inline citation clusters and an auto-generated BibliographyBlock — supporting academic, legal, and technical publishing workflows.
- Pure-Dart import:
package:vyuh_document_elements/citation.dart - Flutter extension:
CitationDocumentExtension(bundled inDocumentEditorElements.defaults) - Action namespace:
CitationActions
Quick example
dart
import 'package:vyuh_document_elements/citation.dart';
// Add citation controls to your workspace action group
final referencesGroup = ActionGroup(
id: 'references',
actions: [
CitationActions.sources,
CitationActions.insertBibliography,
],
);What you can configure
BibliographyBlock
| Property | Type / Values | Purpose |
|---|---|---|
heading | String? | Title rendered above the generated reference list (for example 'References' or 'Works Cited') |
includeUncited | bool | Include all registered document sources or only sources cited inline |
sort | Sort order | Alphabetical by author/title or order of first appearance in the document |
hangingIndent | double (points) | Classic academic hanging indent on each bibliography entry |
entrySpacing | double (points) | Vertical spacing between consecutive bibliography entries |
styleId | String? | Optional named paragraph style binding |
Actions & commands
| Action ID | Effect |
|---|---|
CitationActions.sources | Open the citation sources manager |
CitationActions.cite(String sourceId) | Insert an inline citation cluster referencing sourceId |
CitationActions.style(String styleId) | Switch the document's active citation formatting style (APA, MLA, Chicago, IEEE, etc.) |
CitationActions.insertBibliography | Insert or refresh the generated bibliography block |
Restricting usage
- Remove citations: Omit
CitationDocumentExtensionfrom your controller's extension list or gateCitationActions.sourcesandCitationActions.insertBibliographyinDocumentPolicy. - Lock citation style: Set one standard style for your organization and omit
CitationActions.style(...)from editor chrome.
Format parity
| DOCX | HTML | Markdown | |
|---|---|---|---|
| OOXML bibliography & citation fields preserving formatted clusters | Exact hanging-indent bibliography and inline markers | Semantic citation spans and reference list | Formatted inline citations and reference section |