Commit 80bcf340 authored by Jérôme Ortais's avatar Jérôme Ortais
Browse files

Ajout d'un exercice sur la construction d'angles de mesure donnée en sixième

parent 1b1f3e3b
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 824bdf405d68d7a668798609bcc3cb39
tags: fbb0d17656682115ca4d033fb2f83ba1
config: 95271c4ee4dd770a40d7c38725ac9705
tags: 645f666f9bcd5a90fca523b33c5a78b7
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vue d&#39;ensemble : code du module &mdash; Documentation de Pyromaths 14.06</title>
<title>Vue d&#39;ensemble : code du module &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,11 +28,11 @@
<script type="text/javascript" src="../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>Vue d&#39;ensemble : code du module</span></h2>
</div>
<div class="topnav">
......@@ -67,8 +66,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.classes.Fractions &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.classes.Fractions &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.classes.Fractions</span></h2>
</div>
<div class="topnav">
......@@ -761,8 +760,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.classes.PolynomesCollege &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.classes.PolynomesCollege &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.classes.PolynomesCollege</span></h2>
</div>
<div class="topnav">
......@@ -598,9 +597,13 @@
<span class="n">produit</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">j</span><span class="p">))</span>
<span class="k">return</span> <span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">produit</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lother</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">details</span> <span class="o">==</span> <span class="mi">3</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">ordonne</span><span class="p">:</span>
<span class="k">return</span> <span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">repr</span><span class="p">(</span><span class="n">coeff</span><span class="p">)</span> <span class="k">for</span> <span class="n">coeff</span> <span class="ow">in</span> <span class="n">lcoeff</span><span class="p">])</span> <span class="o">+</span> <span class="s">&quot;*&quot;</span> <span class="o">+</span> \
<span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="s">&quot;Polynome([[1, </span><span class="si">%s</span><span class="s">]], &#39;</span><span class="si">%s</span><span class="s">&#39;, </span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">exp</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">var</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">details</span><span class="p">)</span> <span class="k">for</span> <span class="n">exp</span> <span class="ow">in</span> <span class="n">lexp</span><span class="p">])</span> <span class="o">+</span> \
<span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">repr</span><span class="p">(</span><span class="n">other</span><span class="o">.</span><span class="n">nreduction</span><span class="p">())</span> <span class="k">for</span> <span class="n">other</span> <span class="ow">in</span> <span class="n">lother</span><span class="p">[</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">:]])</span>
<span class="n">coeff</span> <span class="o">=</span> <span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">repr</span><span class="p">(</span><span class="n">coeff</span><span class="p">)</span> <span class="k">for</span> <span class="n">coeff</span> <span class="ow">in</span> <span class="n">lcoeff</span><span class="p">])</span>
<span class="k">if</span> <span class="n">coeff</span><span class="p">:</span> <span class="n">sol</span> <span class="o">=</span> <span class="p">[</span><span class="n">coeff</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span> <span class="n">sol</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">exp</span> <span class="o">=</span> <span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="s">&quot;Polynome([[1, </span><span class="si">%s</span><span class="s">]], &#39;</span><span class="si">%s</span><span class="s">&#39;, </span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">exp</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">var</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">details</span><span class="p">)</span> <span class="k">for</span> <span class="n">exp</span> <span class="ow">in</span> <span class="n">lexp</span><span class="p">])</span>
<span class="k">if</span> <span class="n">exp</span><span class="p">:</span> <span class="n">sol</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">exp</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lother</span><span class="p">[</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">:]:</span> <span class="n">sol</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">repr</span><span class="p">(</span><span class="n">other</span><span class="o">.</span><span class="n">nreduction</span><span class="p">())</span> <span class="k">for</span> <span class="n">other</span> <span class="ow">in</span> <span class="n">lother</span><span class="p">[</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">:]]))</span>
<span class="k">return</span> <span class="s">&quot;*&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">sol</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lcoeff</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">lexp</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
......@@ -1293,8 +1296,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Affichage &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.outils.Affichage &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Affichage</span></h2>
</div>
<div class="topnav">
......@@ -242,8 +241,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Arithmetique &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.outils.Arithmetique &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Arithmetique</span></h2>
</div>
<div class="topnav">
......@@ -403,8 +402,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Conversions &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.outils.Conversions &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Conversions</span></h2>
</div>
<div class="topnav">
......@@ -117,8 +116,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......@@ -8,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Priorites3 &mdash; Documentation de Pyromaths 14.06</title>
<title>pyromaths.outils.Priorites3 &mdash; Documentation de Pyromaths 14.06.2</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -17,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06',
VERSION: '14.06.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -29,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06</span></a></h1>
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Priorites3</span></h2>
</div>
<div class="topnav">
......@@ -715,6 +714,7 @@
<span class="k">while</span> <span class="nb">len</span><span class="p">(</span><span class="n">calcul</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">effectue_calcul</span><span class="p">(</span><span class="n">calcul</span><span class="p">)</span>
<span class="k">if</span> <span class="n">s</span><span class="p">:</span>
<span class="k">if</span> <span class="n">s</span> <span class="o">==</span> <span class="n">calcul</span><span class="p">:</span> <span class="k">print</span> <span class="n">s</span><span class="p">,</span> <span class="n">solution</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">solution</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
<span class="n">calcul</span> <span class="o">=</span> <span class="p">[</span><span class="n">k</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">s</span><span class="p">]</span> <span class="c"># dissocie calcul et s</span>
<span class="k">if</span> <span class="s">&#39;Polynome(&#39;</span> <span class="ow">in</span> <span class="n">calcul</span><span class="p">[</span><span class="mi">0</span><span class="p">][:</span><span class="mi">9</span><span class="p">]:</span>
......@@ -930,8 +930,8 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 11 juin 2014.
Créé avec <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
Mis à jour le 14 juin 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
\ No newline at end of file
......@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......@@ -89,6 +89,7 @@ div.sphinxsidebar #searchbox input[type="submit"] {
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
......@@ -401,10 +402,6 @@ dl.glossary dt {
margin: 0;
}
.refcount {
color: #060;
}
.optional {
font-size: 1.3em;
}
......
......@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......@@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
}
};
/**
* small helper function to urlencode strings
......@@ -61,18 +61,6 @@ jQuery.getQueryParameters = function(s) {
return result;
};
/**
* small function to check if an array contains
* a given item.
*/
jQuery.contains = function(arr, item) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] == item)
return true;
}
return false;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
......@@ -180,6 +168,9 @@ var Documentation = {
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
......
......@@ -4,38 +4,11 @@
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurance, the
* latter for highlighting it.
*/
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
/**
* Porter Stemmer
......@@ -220,6 +193,38 @@ var Stemmer = function() {
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
/**
* Search Module
*/
......@@ -273,19 +278,20 @@ var Search = {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (var i = 0; i < Search._pulse_status; i++)
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
};
}
pulse();
},
/**
* perform a search for something
* perform a search for something (or wait until index is loaded)
*/
performSearch : function(query) {
// create the required interface elements
......@@ -305,41 +311,46 @@ var Search = {
this.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// Stem the searchterms and add them to the correct list
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var objectterms = [];
for (var i = 0; i < tmp.length; i++) {
if (tmp[i] != "") {
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] == "") {
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase();
var word = stemmer.stemWord(tmp[i].toLowerCase());
var toAppend;
// select the correct list
if (word[0] == '-') {
var toAppend = excluded;