Working with Bibliography
Working with Bibliography
Word’s citation and bibliography feature stores its source data separately from the fields
that render it. Aspose.Words FOSS for .NET models that source data through the
Aspose.Words.Bibliography namespace – Source, Contributor, Person, and Corporate –
reachable from Document.Bibliography. This page covers building and reading that data; the
CITATION and BIBLIOGRAPHY fields that render it are covered in the
links and references guide.
The Bibliography Data Model
Document.Bibliography is a Bibliography instance with BibliographyStyle – the citation
style name (for example APA or MLA) that should be applied when a BIBLIOGRAPHY field is
updated – and Sources, an IList<Source> holding every source record available to the
document.
Source Records
Source is constructed with Source(tag, sourceType), where Tag is the short identifier
that FieldCitation.SourceTag and FieldBibliography.SourceTag match against, and
SourceType is an enum identifying the kind of source – values include Book,
BookSection, JournalArticle, ArticleInAPeriodical, ConferenceProceedings, Report,
Patent, Case, InternetSite, DocumentFromInternetSite, Interview, Film,
SoundRecording, Performance, Art, Electronic, and Misc. Source.Type separately
holds the source type as a plain string. Beyond Title and ShortTitle, Source exposes
dozens of category-specific fields as needed for the chosen SourceType – book fields
(BookTitle, Edition, NumberVolumes, Volume, Pages, ChapterNumber), periodical
fields (JournalName, PeriodicalTitle, PublicationTitle, Issue), web fields
(InternetSiteTitle, Url, DayAccessed, MonthAccessed, YearAccessed), legal fields
(CaseNumber, AbbreviatedCaseNumber, Court, Reporter), recording and broadcast fields
(AlbumTitle, Broadcaster, BroadcastTitle, RecordingNumber, Medium,
ProductionCompany, Distributor, Station, Theater), PatentNumber, StandardNumber,
thesis fields (ThesisType, Institution, Department), and general fields (Publisher,
City, StateOrProvince, CountryOrRegion, Year, Month, Day, Comments, Guid,
Doi, Version, RefOrder, Lcid).
Contributors
Source.Contributors is a ContributorCollection with one property per contributor role –
Author, Editor, Translator, Compiler, Composer, Conductor, Counsel, Director,
Interviewee, Interviewer, Inventor, Performer, Producer, Writer, Artist, and
BookAuthor – each typed as Contributor, the common base for the two kinds of contributor
described below.
Individual vs. Corporate Contributors
Contributor is implemented by two classes: Person (First, Middle, Last) for a single
individual, and Corporate (Name) for an organization. PersonCollection also derives from
Contributor and implements IEnumerable<Person> (Add, Remove, RemoveAt, Clear,
Contains, Count), so a contributor role that has multiple individual authors can be
assigned a PersonCollection just as readily as a role with a single author is assigned a
Person – both, along with Corporate, satisfy the same Contributor-typed role property.
Rendering Bibliography Content
Source records only supply data – they do not render citation or bibliography text
themselves. That happens through FieldCitation and FieldBibliography, which look up a
Source by matching SourceTag against Source.Tag. See the
links and references guide for those field classes.
Tips and Best Practices
- Give every
Sourcea uniqueTag– it’s the only valueFieldCitation.SourceTagandFieldBibliography.SourceTaguse to find the right record. - Populate only the
Sourcefields relevant to itsSourceType– aBooksource has no use forBroadcasterorCaseNumber, for example, but the class does not enforce this for you. - Use
Personfor a single named contributor,PersonCollectionfor multiple individuals in the same role, andCorporatewhen the contributor is an organization rather than a person – assign whichever fits to the matchingContributorCollectionrole property. Bibliography.BibliographyStylerecords which citation style name to apply; keep it consistent with how yourFieldCitationfields expect their output formatted.- Add every
SourcetoDocument.Bibliography.Sourcesbefore updatingCITATIONorBIBLIOGRAPHYfields that reference it – a missing source means the referencing field has nothing to resolve to.
Common Issues
| Issue | Cause | Fix |
|---|---|---|
CITATION or BIBLIOGRAPHY field doesn’t resolve | The Source.Tag doesn’t exactly match the field’s SourceTag | Confirm the tags match, and that the Source was added to Document.Bibliography.Sources |
| Wrong contributor type assigned to a role | A Person was assigned where multiple contributors exist, or vice versa | Use PersonCollection for multiple individuals in one role, Person for a single individual, Corporate for an organization |
| Source fields look inconsistent for its type | Fields for a different SourceType were populated (for example web fields on a Book source) | Populate only the fields relevant to the chosen SourceType |
FAQ
How do I add a book source with a single author?
Create a Source with SourceType.Book, set BookTitle, Publisher, Year, and related
fields, then assign a Person to Source.Contributors.Author.
How do I add a source with multiple authors?
Assign a PersonCollection (populated with Person instances via Add()) to the relevant
ContributorCollection role property, such as Author.
How do I cite an organization instead of an individual?
Assign a Corporate instance (constructed with the organization’s Name) to the
ContributorCollection role property instead of a Person or PersonCollection.
Where do Source records actually appear in the rendered document?
They don’t render on their own – FieldCitation and FieldBibliography fields render
content built from them, matched by SourceTag. See the
links and references guide.
API Reference Summary
| Class / Enum | Description |
|---|---|
Bibliography | Bibliography data root, via Document.Bibliography; BibliographyStyle, Sources |
Source | An individual citation source; dozens of category-specific fields plus Contributors |
SourceType | Enum of source kinds: Book, JournalArticle, InternetSite, Patent, Case, and more |
ContributorCollection | Per-role contributor properties (Author, Editor, Translator, and others) on a Source |
Contributor | Common base for Person, PersonCollection, and Corporate |
Person / PersonCollection | A single individual contributor, or a collection of them |
Corporate | An organization acting as a contributor |