File: Use-of-the-interpreter-Property.html

package info (click to toggle)
octave 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 124,192 kB
  • sloc: cpp: 322,665; ansic: 68,088; fortran: 20,980; objc: 8,121; sh: 7,719; yacc: 4,266; lex: 4,123; perl: 1,530; java: 1,366; awk: 1,257; makefile: 424; xml: 147
file content (185 lines) | stat: -rw-r--r-- 12,027 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Use of the interpreter Property (GNU Octave (version 6.2.0))</title>

<meta name="description" content="Use of the interpreter Property (GNU Octave (version 6.2.0))">
<meta name="keywords" content="Use of the interpreter Property (GNU Octave (version 6.2.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="High_002dLevel-Plotting.html" rel="up" title="High-Level Plotting">
<link href="Printing-and-Saving-Plots.html" rel="next" title="Printing and Saving Plots">
<link href="Manipulation-of-Plot-Windows.html" rel="prev" title="Manipulation of Plot Windows">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<span id="Use-of-the-interpreter-Property"></span><div class="header">
<p>
Next: <a href="Printing-and-Saving-Plots.html" accesskey="n" rel="next">Printing and Saving Plots</a>, Previous: <a href="Manipulation-of-Plot-Windows.html" accesskey="p" rel="prev">Manipulation of Plot Windows</a>, Up: <a href="High_002dLevel-Plotting.html" accesskey="u" rel="up">High-Level Plotting</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<span id="Use-of-the-interpreter-Property-1"></span><h4 class="subsection">15.2.8 Use of the <code>interpreter</code> Property</h4>
<span id="XREFinterpreterusage"></span>
<p>All text objects&mdash;such as titles, labels, legends, and text&mdash;include
the property <code>&quot;interpreter&quot;</code> that determines the manner in
which special control sequences in the text are rendered.
</p>
<p>The interpreter property can take three values: <code>&quot;none&quot;</code>, <code>&quot;tex&quot;</code>,
<code>&quot;latex&quot;</code>.  If the interpreter is set to <code>&quot;none&quot;</code> then no special
rendering occurs&mdash;the displayed text is a verbatim copy of the specified text.
Currently, the <code>&quot;latex&quot;</code> interpreter is not implemented for on-screen
display and is equivalent to <code>&quot;none&quot;</code>.  Note that Octave does not parse
or validate the text strings when in <code>&quot;latex&quot;</code> mode&mdash;it is the
responsibility of the programmer to generate valid strings which may include
wrapping sections that should appear in Math mode with <code>'$'</code> characters.
</p>
<p>The <code>&quot;tex&quot;</code> option implements a subset of TeX functionality when
rendering text.  This allows the insertion of special glyphs such as Greek
characters or mathematical symbols.  Special characters are inserted by using
a backslash (\) character followed by a code, as shown in <a href="#tab_003aextended">Table 15.1</a>.
</p>
<p>Besides special glyphs, the formatting of the text can be changed within the
string by using the codes
</p>
<table>
<tr><td width="20%"></td><td width="20%">\bf</td><td width="60%">Bold font</td><td width="20%"></td></tr>
<tr><td width="20%"></td><td width="20%">\it</td><td width="60%">Italic font</td><td width="20%"></td></tr>
<tr><td width="20%"></td><td width="20%">\sl</td><td width="60%">Oblique Font</td><td width="20%"></td></tr>
<tr><td width="20%"></td><td width="20%">\rm</td><td width="60%">Normal font</td><td width="20%"></td></tr>
</table>

<p>These codes may be used in conjunction with the { and } characters to limit
the change to a part of the string.  For example,
</p>
<div class="example">
<pre class="example">xlabel ('{\bf H} = a {\bf V}')
</pre></div>

<p>where the character <code>'a'</code> will not appear in bold font.  Note that to
avoid having Octave interpret the backslash character in the strings,
the strings themselves should be in single quotes.
</p>
<p>It is also possible to change the fontname and size within the text
</p>
<table>
<tr><td width="10%"></td><td width="40%">\fontname{<var>fontname</var>}</td><td width="60%">Specify the font to use</td><td width="10%"></td></tr>
<tr><td width="10%"></td><td width="40%">\fontsize{<var>size</var>}</td><td width="60%">Specify the size of the font to
use</td><td width="10%"></td></tr>
</table>

<p>The color of the text may also be changed inline using either a string (e.g.,
&quot;red&quot;) or numerically with a Red-Green-Blue (RGB) specification (e.g.,
[1 0 0], also red).
</p>
<table>
<tr><td width="10%"></td><td width="40%">\color{<var>color</var>}</td><td width="60%">Specify the color as a string</td><td width="10%"></td></tr>
<tr><td width="10%"></td><td width="40%">\color[rgb]{<var>R</var> <var>G</var> <var>B</var>}</td><td width="60%">Specify the color
numerically</td><td width="10%"></td></tr>
</table>

<p>Finally, superscripting and subscripting can be controlled with the <code>'^'</code>
and <code>'_'</code> characters.  If the <code>'^'</code> or <code>'_'</code> is followed by a
{ character, then all of the block surrounded by the {&nbsp;}<!-- /@w --> pair is
superscripted or subscripted.  Without the {&nbsp;}<!-- /@w --> pair, only the character
immediately following the <code>'^'</code> or <code>'_'</code> is changed.
</p>
<div class="float"><span id="tab_003aextended"></span>
<table>
<tr><td width="25%">Greek Lowercase Letters</td></tr>
<tr><td width="25%"></td><td width="25%">\alpha</td><td width="25%">\beta</td><td width="25%">\gamma</td></tr>
<tr><td width="25%"></td><td width="25%">\delta</td><td width="25%">\epsilon</td><td width="25%">\zeta</td></tr>
<tr><td width="25%"></td><td width="25%">\eta</td><td width="25%">\theta</td><td width="25%">\vartheta</td></tr>
<tr><td width="25%"></td><td width="25%">\iota</td><td width="25%">\kappa</td><td width="25%">\lambda</td></tr>
<tr><td width="25%"></td><td width="25%">\mu</td><td width="25%">\nu</td><td width="25%">\xi</td></tr>
<tr><td width="25%"></td><td width="25%">\o</td><td width="25%">\pi</td><td width="25%">\varpi</td></tr>
<tr><td width="25%"></td><td width="25%">\rho</td><td width="25%">\sigma</td><td width="25%">\varsigma</td></tr>
<tr><td width="25%"></td><td width="25%">\tau</td><td width="25%">\upsilon</td><td width="25%">\phi</td></tr>
<tr><td width="25%"></td><td width="25%">\chi</td><td width="25%">\psi</td><td width="25%">\omega</td></tr>
<tr><td width="25%">Greek Uppercase Letters</td></tr>
<tr><td width="25%"></td><td width="25%">\Gamma</td><td width="25%">\Delta</td><td width="25%">\Theta</td></tr>
<tr><td width="25%"></td><td width="25%">\Lambda</td><td width="25%">\Xi</td><td width="25%">\Pi</td></tr>
<tr><td width="25%"></td><td width="25%">\Sigma</td><td width="25%">\Upsilon</td><td width="25%">\Phi</td></tr>
<tr><td width="25%"></td><td width="25%">\Psi</td><td width="25%">\Omega</td><td width="25%"></td></tr>
<tr><td width="25%">Misc Symbols Type Ord</td></tr>
<tr><td width="25%"></td><td width="25%">\aleph</td><td width="25%">\wp</td><td width="25%">\Re</td></tr>
<tr><td width="25%"></td><td width="25%">\Im</td><td width="25%">\partial</td><td width="25%">\infty</td></tr>
<tr><td width="25%"></td><td width="25%">\prime</td><td width="25%">\nabla</td><td width="25%">\surd</td></tr>
<tr><td width="25%"></td><td width="25%">\angle</td><td width="25%">\forall</td><td width="25%">\exists</td></tr>
<tr><td width="25%"></td><td width="25%">\neg</td><td width="25%">\clubsuit</td><td width="25%">\diamondsuit</td></tr>
<tr><td width="25%"></td><td width="25%">\heartsuit</td><td width="25%">\spadesuit</td><td width="25%"></td></tr>
<tr><td width="25%">&ldquo;Large&rdquo; Operators</td></tr>
<tr><td width="25%"></td><td width="25%">\int</td></tr>
<tr><td width="25%">Binary Operators</td></tr>
<tr><td width="25%"></td><td width="25%">\pm</td><td width="25%">\cdot</td><td width="25%">\times</td></tr>
<tr><td width="25%"></td><td width="25%">\ast</td><td width="25%">\circ</td><td width="25%">\bullet</td></tr>
<tr><td width="25%"></td><td width="25%">\div</td><td width="25%">\cap</td><td width="25%">\cup</td></tr>
<tr><td width="25%"></td><td width="25%">\vee</td><td width="25%">\wedge</td><td width="25%">\oplus</td></tr>
<tr><td width="25%"></td><td width="25%">\otimes</td><td width="25%">\oslash</td><td width="25%"></td></tr>
<tr><td width="25%">Relations</td></tr>
<tr><td width="25%"></td><td width="25%">\leq</td><td width="25%">\subset</td><td width="25%">\subseteq</td></tr>
<tr><td width="25%"></td><td width="25%">\in</td><td width="25%">\geq</td><td width="25%">\supset</td></tr>
<tr><td width="25%"></td><td width="25%">\supseteq</td><td width="25%">\ni</td><td width="25%">\mid</td></tr>
<tr><td width="25%"></td><td width="25%">\equiv</td><td width="25%">\sim</td><td width="25%">\approx</td></tr>
<tr><td width="25%"></td><td width="25%">\cong</td><td width="25%">\propto</td><td width="25%">\perp</td></tr>
<tr><td width="25%">Arrows</td></tr>
<tr><td width="25%"></td><td width="25%">\leftarrow</td><td width="25%">\Leftarrow</td><td width="25%">\rightarrow</td></tr>
<tr><td width="25%"></td><td width="25%">\Rightarrow</td><td width="25%">\leftrightarrow</td><td width="25%">\uparrow</td></tr>
<tr><td width="25%"></td><td width="25%">\downarrow</td><td width="25%"></td><td width="25%"></td></tr>
<tr><td width="25%">Openings and Closings</td></tr>
<tr><td width="25%"></td><td width="25%">\lfloor</td><td width="25%">\langle</td><td width="25%">\lceil</td></tr>
<tr><td width="25%"></td><td width="25%">\rfloor</td><td width="25%">\rangle</td><td width="25%">\rceil</td></tr>
<tr><td width="25%">Alternate Names</td></tr>
<tr><td width="25%"></td><td width="25%">\neq</td></tr>
<tr><td width="25%">Other</td></tr>
<tr><td width="25%"></td><td width="25%">\ldots</td><td width="25%">\0</td><td width="25%">\copyright</td></tr>
<tr><td width="25%"></td><td width="25%">\deg</td></tr>
</table>

<div class="float-caption"><p><strong>Table 15.1: </strong>Available special characters in TeX mode</p></div></div><div class="float">
</div>
<span id="Degree-Symbol"></span><h4 class="subsubsection">15.2.8.1 Degree Symbol</h4>
<span id="index-Degree-Symbol"></span>

<p>Conformance to both TeX and <small>MATLAB</small> with respect to the <code>\circ</code>
symbol is impossible.  While TeX translates this symbol to Unicode&nbsp;2218<!-- /@w -->
(U+2218), <small>MATLAB</small> maps this to Unicode&nbsp;00B0<!-- /@w --> (U+00B0) instead.  Octave
has chosen to follow the TeX specification, but has added the additional
symbol <code>\deg</code> which maps to the degree symbol (U+00B0).
</p>
<hr>
<div class="header">
<p>
Next: <a href="Printing-and-Saving-Plots.html" accesskey="n" rel="next">Printing and Saving Plots</a>, Previous: <a href="Manipulation-of-Plot-Windows.html" accesskey="p" rel="prev">Manipulation of Plot Windows</a>, Up: <a href="High_002dLevel-Plotting.html" accesskey="u" rel="up">High-Level Plotting</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>