Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Previous section-----Next section

2.11.10 Text and Font Options

option typical default value
PageWidth WindowWidth how wide to assume the page to be
TextAlignment Left how to align successive lines of text
TextJustification 0 how much to allow lines of text to be stretched to make them fit
Hyphenation True whether to allow hyphenation
ParagraphIndent 0 how many printer's points to indent the first line in each paragraph

General options for text formatting.

If you have a large block of text containing no explicit Return characters, then Mathematica will automatically break your text into a sequence of lines. The option PageWidth specifies how long each line should be allowed to be.

WindowWidth the width of the window on the screen
PaperWidth the width of the page as it would be printed
Infinity an infinite width (no linebreaking)
n explicit width given in printer's points

Settings for the PageWidth option in cells and notebooks.

The option TextAlignment allows you to specify how you want successive lines of text to be aligned. Since Mathematica normally breaks text only at space or punctuation characters, it is common to end up with lines of different lengths. Normally the variation in lengths will give your text a ragged boundary. But Mathematica allows you to adjust the spaces in successive lines of text so as to make the lines more nearly equal in length. The setting for TextJustification gives the fraction of extra space which Mathematica is allowed to add. TextJustification->1 leads to "full justification" in which all complete lines of text are adjusted to be exactly the same length.

Left aligned on the left
Right aligned on the right
Center centered
x aligned at a position x running from -1 to +1 across the page

Settings for the TextAlignment option.
Here is text with TextAlignment->Left and TextJustification->0.
With TextAlignment->Center the text is centered.
TextJustification->1 adjusts word spacing so that both the left and right edges line up.
TextJustification->0.5 reduces the degree of raggedness, but does not force the left and right edges to be precisely lined up.

When you enter a block of text in a Mathematica notebook, Mathematica will treat any explicit Return characters that you type as paragraph breaks. The option ParagraphIndent allows you to specify how much you want to indent the first line in each paragraph. By giving a negative setting for ParagraphIndent, you can make the first line stick out to the left relative to subsequent lines.

LineSpacing->{c, 0} leave space so that the total height of each line is c times the height of its contents
LineSpacing->{0, n} make the total height of each line exactly n printer's points
LineSpacing->{c, n} make the total height c times the height of the contents plus n printer's points
ParagraphSpacing->{c, 0} leave an extra space of c times the height of the font before the beginning of each paragraph
ParagraphSpacing->{0, n} leave an extra space of exactly n printer's points before the beginning of each paragraph
ParagraphSpacing->{c, n} leave an extra space of c times the height of the font plus n printer's points

Options for spacing between lines of text.
Here is some text with the default setting LineSpacing->{1, 1}, which inserts just 1 printer's point of extra space between successive lines.
With LineSpacing->{1, 5} the text is "looser".
LineSpacing->{2, 0} makes the text double-spaced.
With LineSpacing->{1, -2} the text is tight.

option typical default value
FontFamily "Courier" the family of font to use
FontSubstitutions { } a list of substitutions to try for font family names
FontSize 12 the maximum height of characters in printer's points
FontWeight "Bold" the weight of characters to use
FontSlant "Plain" the slant of characters to use
FontTracking "Plain" the horizontal compression or expansion of characters
FontColor GrayLevel[0] the color of characters
Background GrayLevel[1] the color of the background for each character

Options for fonts.

"Courier" text like this
"Times" text like this
"Helvetica" text like this

Some typical font family names.

FontWeight->"Plain" text like this
FontWeight->"Bold" text like this
FontWeight->"ExtraBold" text like this
FontSlant->"Oblique" text like this

Some settings of font options.

Mathematica allows you to specify the font that you want to use in considerable detail. Sometimes, however, the particular combination of font families and variations that you request may not be available on your computer system. In such cases, Mathematica will try to find the closest approximation it can. There are various additional options, such as FontPostScriptName, that you can set to help Mathematica find an appropriate font. In addition, you can set FontSubstitutions to be a list of rules that give replacements to try for font family names.

There are a great many fonts available for ordinary text. But for special technical characters, and even for Greek letters, far fewer fonts are available. The Mathematica system includes fonts that were built to support all of the various special characters that are used by Mathematica. There are three versions of these fonts: ordinary (like Times), monospaced (like Courier), and sans serif (like Helvetica).

For a given text font, Mathematica tries to choose the special character font that matches it best. You can help Mathematica to make this choice by giving rules for "FontSerifed" and "FontMonospaced" in the setting for the FontProperties option. You can also give rules for "FontEncoding" to specify explicitly from what font each character is to be taken.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: