This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Text

Text[expr]
displays with expr in plain text format.
Text
is a graphics primitive that displays the textual form of expr centered at the point specified by coords.
  • The text is displayed by default in StandardForm, but in a typical textual font such as Times.
  • Text can be used in both two- and three-dimensional graphics.
  • The coordinates can be specified either as or as Scaled. »
  • In two dimensions, coordinates can also be specified using Offset. »
  • Text specifies an offset for the block of text relative to the coordinates given. Giving an offset specifies that the point should lie at relative coordinates within the bounding rectangle that encloses the text. Each relative coordinate runs from to across the bounding rectangle.
  • The offsets specified need not be in the range to .
  • Sample offsets to use in two-dimensional graphics include:
{0,0}text centered at
{-1,0}left-hand end at
{1,0}right-hand end at
{0,-1}centered above
{0,1}centered below
  • Text specifies the orientation of the text and is given by the direction vector dir. Possible values of dir are:
{1,0}ordinary horizontal text
{0,1}vertical text reading from bottom to top
{0,-1}vertical text reading from top to bottom
{-1,0}horizontal upside-down text
  • Text in three-dimensional graphics is placed at a position that corresponds to the projection of the point specified. Text is drawn in front of all other objects.
  • The following options can be given:
BackgroundNonebackground color
ContentSelectableAutomaticwhether to allow selection of contents
BaseStyle{}base style specifications for the contents
FormatTypeAutomaticformat type
  • Outside of graphics, Text[expr] effectively generates a TextCell.
Display an expression in plain text format:
Display text in 2D graphics:
Display text in 3D graphics:
Display an expression in plain text format:
In[1]:=
Click for copyable input
Out[1]=
 
Display text in 2D graphics:
In[1]:=
Click for copyable input
Out[1]=
 
Display text in 3D graphics:
In[1]:=
Click for copyable input
Out[1]=
By default, Center is used for the position of the text in 2D:
Automatic is equivalent to Center:
Specify ordinary coordinates in a graphic:
Use Scaled coordinates:
ImageScaled specifies coordinates in a whole image, including padding:
Use Offset coordinates in 2D:
Symbolic positions can be specified:
By default, Center is used for the alignment position:
Automatic is equivalent to Center:
Specify an alignment position within the text, using symbolic positions:
Specify the offsets using , coordinates within the text:
Specify the orientation of text using a vector:
Specify the background color:
By default, expressions are displayed using TraditionalForm:
Display expressions using StandardForm:
The symbolic positions are relative to ImageScaled coordinates:
Text styles can be specified by using Style:
A random collage of text:
New in 1 | Last modified in 7