/usr/share/doc/pyxplot/html/sect0268.html is in pyxplot-doc 0.9.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>PyXPlot Users' Guide: The typesetting of text</title>
<link href="sect0269.html" title="Complex numbers" rel="next" />
<link href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot" rel="prev" />
<link href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot"><img alt="Previous: Summary of differences between Pyxplot and gnuplot" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot"><img alt="Up: Summary of differences between Pyxplot and gnuplot" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0269.html" title="Complex numbers"><img alt="Next: Complex numbers" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<div class="breadcrumbs">
<span>
<span>
<a href="index.html">PyXPlot Users' Guide</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0260.html">Appendices</a> <b>:</b>
</span>
</span><span>
<span>
<a href="ch-gnuplot_diffs.html">Summary of differences between Pyxplot and gnuplot</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">The typesetting of text</b>
</span>
</span>
<hr />
</div>
<div><h1 id="a0000000269">B.1 The typesetting of text</h1>
<p>Pyxplot renders all text labels automatically in the latex typesetting environment. This brings many advantages: it produces neater labels than the default typesetting engine used by gnuplot, makes it straightforward to label graphs with mathematical expressions, and moreover makes it straightforward when importing graphs into latex documents to match the fonts used in figures with those used in the main text of the document. It does, however, also necessarily introduce some incompatibility with gnuplot. Some strings which are valid in gnuplot are not valid in Pyxplot (see Section <a href="sec-latex_incompatibility.html">3.6</a> for more details). For example,<a name="a0000001787" id="a0000001787"></a> </p><p><table cellspacing="0" class="tabular">
<tr>
<td style="text-align:left"><p><img src="images/img-0039.png" alt="\includegraphics{cross}" style="width:20px; height:24px" />
</p></td>
<td style="text-align:left"><p><div style="width:0.0pt" class="minipage"><tt class="tt"> set xlabel ’x<img src="images/img-0037.png" alt="\^{}" style="vertical-align:9px; width:5px; height:4px" class="accent gen" />2’ </tt></div></p></td>
</tr>
</table> </p><p>is a valid label in gnuplot, but is not valid input for latex and therefore fails in Pyxplot. In Pyxplot, it needs to be written in latex mathmode as: </p><p><table cellspacing="0" class="tabular">
<tr>
<td style="text-align:left"><p><img src="images/img-0040.png" alt="\includegraphics{tick}" style="width:19px; height:17px" />
</p></td>
<td style="text-align:left"><p><div style="width:0.0pt" class="minipage"><tt class="tt"> set xlabel ’$x<img src="images/img-0037.png" alt="\^{}" style="vertical-align:9px; width:5px; height:4px" class="accent gen" />2$’ </tt></div></p></td>
</tr>
</table> </p><p>A useful introduction to latex’s syntax can be found in Tobias Oetiker’s<a name="a0000001788" id="a0000001788"></a> excellent free tutorial, <i class="it">The Not So Short Guide to latex <img src="images/img-0024.png" alt="$2\epsilon $" style="vertical-align:0px;
width:15px;
height:12px" class="math gen" /></i><a name="a0000001789" id="a0000001789"></a>, which is available for free download from: </p><p>http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf </p><p>Two built-in functions provide some assistance in generating latex labels. The <tt class="tt">texify()</tt><a name="a0000001790" id="a0000001790"></a> takes as its argument a string containing a mathematical expression, and returns a latex representation of it. The <tt class="tt">texifyText()</tt><a name="a0000001791" id="a0000001791"></a> takes as its argument a text string, and returns a latex representation of it, with any necessary escape characters added. For example: </p><p> <tt class="ttfamily">pyxplot> <b class="bfseries">print texify("sqrt(x**2+1)")</b></tt><br /><tt class="ttfamily">$<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />displaystyle <img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />sqrt{x<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,*<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />kern-1.5pt *<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,2+1}<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />mathrm{}$</tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">a=50</b></tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">print texifyText("A %d%% increase"%a)</b></tt><br /><tt class="ttfamily">A 50<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />% increase</tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">set ylabel texify("cos(x**2)")</b></tt> Two built-in functions provide some assistance in generating latex labels. The <tt class="tt">texify()</tt><a name="a0000001792" id="a0000001792"></a> takes as its argument a string containing a mathematical expression, and returns a latex representation of it. The <tt class="tt">texifyText()</tt><a name="a0000001793" id="a0000001793"></a> takes as its argument a text string, and returns a latex representation of it, with any necessary escape characters added. For example: </p><p> <tt class="ttfamily">pyxplot> <b class="bfseries">print texify("sqrt(x**2+1)")</b></tt><br /><tt class="ttfamily">$<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />displaystyle <img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />sqrt{x<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,*<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />kern-1.5pt *<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />,2+1}<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />mathrm{}$</tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">a=50</b></tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">print texifyText("A %d%% increase"%a)</b></tt><br /><tt class="ttfamily">A 50<img src="images/img-0038.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />% increase</tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">set ylabel texify("cos(x**2)")</b></tt> </p></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot"><img alt="Previous: Summary of differences between Pyxplot and gnuplot" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="ch-gnuplot_diffs.html" title="Summary of differences between Pyxplot and gnuplot"><img alt="Up: Summary of differences between Pyxplot and gnuplot" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0269.html" title="Complex numbers"><img alt="Next: Complex numbers" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>
</body>
</html>
|