Formatting PropertiesUse a wide variety of formatting properties to program the look of the content in your document. Together with the revision mechanism, you can create named styles and combine them with your data to create beautiful, accurate documents. View on YouTube
RevisionsRevisions are used to alter the typesetting of any Span or Paragraph. FormatPar = Span { TextFamily: TextFamilies.TimesNewRoman; "The following text is: ";};ShowRevision = Block { FormatPar {Span {TextHeight: 120%; "Large"}}; FormatPar {Span {Bold; "Bold"}}; FormatPar {Span {Italic; "Italic"}}; FormatPar {Span {TextHeight: 120%; Bold; Italic; "Large, Bold, Italic"}};};The following text is: LargeThe following text is: BoldThe following text is: ItalicThe following text is: Large, Bold, Italic
Text ColorIf you want to change color of the text in a Span, use the TextColor property.ShowTextColor = Paragraph { "The following item is "; Span { TextColor: Colors.Red; "important"; }; " to note. ";};The following item is important to note.
Text BackgroundThe background color of text can be set with the TextBackground property.ShowTextBackground = Paragraph { "The following item is "; Span { TextBackground: Colors.Yellow; "marked"; }; " with a highlighter. ";};The following item is marked with a highlighter.
Italic TextMake the font italic by setting the TextItalic property to true.ShowItalic = Paragraph { "Make "; Span { TextItalic: true; "sure"; }; " to read the instructions. ";};Make sure to read the instructions.
Italic shortcutApply the special Italic revision directly to a string for a more concise expression.ShowItalic2 = Paragraph { "Make "; Italic "sure"; " to read the instructions. ";};Make sure to read the instructions.
Bold TextMake the font bold by setting the TextWeight property to Bold.ShowBold = Paragraph { "Use "; Span { TextWeight: Bold; "extreme"; }; " caution. ";};Use extreme caution.
Bold shortcutApply the special Bold revision directly to a string for a more concise expression.ShowBold2 = Paragraph { "Use "; Bold "extreme"; " caution. ";};Use extreme caution.
Font FaceUse the TextFace property to change the font face to one of the built-in styles. ShowFace = Block { "Normal Text"; Span { TextFace: TextFaces.Mono; "Monospaced Text"; };};Normal TextMonospaced Text
Font FamilyUse the TextFamily property to change the font family to a specific installed family. ShowFamily = Paragraph { TextFamily: TextFamilies.LibertinusSerif; "Classic font for journal articles";};Classic font for journal articles
Underlining TextUse the TextUnderline property to underline text in a variety of styles. ShowUnderline = Paragraph { Separator: Space*3; foreach (var u in TextUnderlines) { Span { TextUnderline: u; u.Name; }; }};None Single Words Dotted Dashed DotDash DotDotDash Thick Double Wave WavyDouble
Striking-out TextUse the TextStrike property to strike-out sections of text. StrikeText = Paragraph { Separator: Space*3; foreach (var s in TextStrikes) { Span { TextStrike: s; s.Name; }; }};None Single Double
Text CasingYou can control the mixture of uppercase and lowercase letters with the TextCase property.ShowTextCase = Table(null, PadLR(3), [Column.Fit(50%)]) { foreach (var tc in TextCases) { Row { tc.Name; Span { TextCase: tc; "hello Hello HELLO!"; }; }; }};Nonehello Hello HELLO!AllUpperHELLO HELLO HELLO!AllLowerhello hello hello!WordUpperHello Hello Hello!FirstUpperHello Hello HELLO!FirstLowerhello Hello HELLO!SmallCapshello Hello HELLO!
Letter SpacingChange how much space is allocated between letters with the TextLetterSpace property.ShowTextLetterSpace = Block { foreach (var space in 1..5) { Paragraph(null, [5%]) { space; Tab; Span { TextLetterSpace: space; "The quick brown fox"; }; Span { TextColor: Colors.Green; " jumped over the lazy dog." }; }; }};1The quick brown fox jumped over the lazy dog.2The quick brown fox jumped over the lazy dog.3The quick brown fox jumped over the lazy dog.4The quick brown fox jumped over the lazy dog.5The quick brown fox jumped over the lazy dog.
Letter StretchingText can be compressed or stretched with the TextStretch property.ShowLetterScale = Block { foreach (var stretch in [50%, 75%, 100%, 150%, 200%]) { Paragraph(null, [8%]) { stretch; Tab; Span { TextStretch: stretch; "Stretch"; }; Span { TextColor: Colors.Green; " -> goal." }; } }};50%Stretch -> goal.75%Stretch -> goal.100%Stretch -> goal.150%Stretch -> goal.200%Stretch -> goal.
SeparatorsInsert content between elements with the Separator property.ShowSeparator = Paragraph { Separator: ", "; 1..5 step 1;};1, 2, 3, 4, 5
Last SeparatorChange the final separator in the revision with the LastSeparator property.ShowLastSeparator = Paragraph { Separator: ", "; LastSeparator: " and "; 1..5 step 1;};1, 2, 3, 4 and 5
Pair SeparatorTo handle lists that have exactly two items, use the PairSeparator property.OxfordList = Span { Separator: ", "; LastSeparator: ", and "; // Oxford comma PairSeparator: " and ";};ShowLists = Block { OxfordList {1}; OxfordList {1; 2}; OxfordList {1; 2; 3};};11 and 21, 2, and 3