Footnotes are a word processing feature that allows users to insert additional information at the bottom of pages. Without interrupting the flow of the main text, these notes provide additional details or citations. This feature has been requested by many users and is a long awaited feature.

Very popular in academic writing, footnotes are used to cite specific statements or quotations. A superscript number is placed at the appropriate location in the sentence, and the corresponding note is placed at the bottom of the page. If the reference is moved to another page, the associated footnote is also moved to the new page. In this way, the reader has easy access to sources or additional information without interrupting the main flow of the text.

Legal software, one of our main industries where TX Text Control is used, is another area where footnotes are popular. Legal footnotes are especially useful for explaining complex terms or legal citations.

But let's look at the TX Text Control implementation. The following screenshot shows the early beta version 32.0 of the Document Editor for ASP.NET Core.

Ribbon Interface

The ribbon interface provides all the necessary buttons to insert, delete, and manipulate footnotes. In addition, the start number and the format can be adjusted as well.

TX Text Control provides the ability to highlight all footnotes in a document to help users find references in a long or complex document.

Formatted Text

Footnotes can include formatted text and other elements such as tables.

Footnotes can be added programmatically using the FootnoteCollection:

textControl1.Footnotes.Add(new TXTextControl.Footnote("Footnote text"), false);
view raw test.cs hosted with ❤ by GitHub

By looping through the FootnoteCollection, you can access each Footnote object to get and set its text, start number, format and other settings.

foreach (TXTextControl.Footnote footnote in tx.Footnotes) {
var number = footnote.Number;
var text = footnote.Text;
}
view raw test.cs hosted with ❤ by GitHub

The text of the footnote can be accessed through the TextPartCollection which returns FootnoteText objects to access the Selection to format the selected footnote text.

foreach (IFormattedText part in tx.TextParts) {
if (part is TXTextControl.FootnoteText footnoteText) {
footnoteText.Selection.Start = 2;
footnoteText.Selection.Length = 8;
footnoteText.Selection.Load("<strong>Test</strong>", StringStreamType.HTMLFormat);
}
}
view raw test.cs hosted with ❤ by GitHub

Stay tuned for more and keep coding!