Template:Primes in edo/doc: Difference between revisions

Sintel (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><hr><small>Documentation transcluded from [[/doc]]</small></includeonly>
{{dochead}}
=== Usage ===
=== Usage ===
==== Simple ====
==== Simple ====
Normally, it's sufficient to place one line in the article, and set the EDO number accordingly:
Normally, it's sufficient to place one line in the article, and set the EDO number accordingly:


<syntaxhighlight lang="text">
<pre>
{{primes in edo|<EDO number>}}
{{primes in edo|<EDO number>}}
</syntaxhighlight>
</pre>


==== Advanced ====
==== Advanced ====
Under certain circumstances, the values for precision (<code>prec</code>) or column count (<code>columns</code>) don't fit in the given context. The template takes up to 5 arguments:
Under certain circumstances, the values for precision (<code>prec</code>) or column count (<code>columns</code>) don't fit in the given context. The template takes up to 5 arguments:


<syntaxhighlight lang="text">
<pre>
{{primes in edo
{{primes in edo
| edo = <EDO number>
| edo = <EDO number>
Line 22: Line 19:
| title = <your title>
| title = <your title>
}}
}}
</syntaxhighlight>
</pre>


; edo: (this parameter can also be given without the parameter name)
; edo: (this parameter can also be given without the parameter name)
Line 31: Line 28:


=== Examples ===
=== Examples ===
Although the template does also work without any arguments, one argument should be seen as mandatory: the EDO number.
Although the template does also work without any arguments, one argument should be seen as mandatory: the EDO number.


==== Basic ====
==== Basic ====
In most cases it will be sufficient to input just the EDO and nothing else.
In most cases it will be sufficient to input just the EDO and nothing else.


<syntaxhighlight lang="text">
<pre>
{{primes in edo|17}}
{{primes in edo|17}}
</syntaxhighlight>
</pre>
{{primes in edo|17}}
{{primes in edo|17}}


==== Advanced ====
==== Advanced ====
Sometimes you want to see more or skip some lower columns and have to adjust the title
Sometimes you want to see more or skip some lower columns and have to adjust the title


<syntaxhighlight lang="text">
<pre>
{{primes in edo|19|columns=11|start=2|title=Primes in [[19edo]]}}
{{primes in edo|19|columns=11|start=2|title=Primes in [[19edo]]}}
</syntaxhighlight>
</pre>
{{primes in edo|19|columns=11|start=2|title=Primes in [[19edo]]}}
{{primes in edo|19|columns=11|start=2|title=Primes in [[19edo]]}}


For large EDOs ([[318edo]] in this example) the absolute error gets very small, so stick to the fixed format, we have to add digits after the decimal point. The default precision gets calculated automatically, but if we want to increase it further, we can set <code>prec</code> to a higher value.
For large EDOs ([[318edo]] in this example) the absolute error gets very small, so stick to the fixed format, we have to add digits after the decimal point. The default precision gets calculated automatically, but if we want to increase it further, we can set <code>prec</code> to a higher value.


<syntaxhighlight lang="text">
<pre>
{{primes in edo|318|columns=9|start=2}}
{{primes in edo|318|columns=9|start=2}}
{{primes in edo|318|columns=9|start=2|prec=4|title=Same with prec=4}}
{{primes in edo|318|columns=9|start=2|prec=4|title=Same with prec=4}}
</syntaxhighlight>
</pre>
{{primes in edo|318|columns=9|start=2}}
{{primes in edo|318|columns=9|start=2}}
{{primes in edo|318|columns=9|start=2|prec=4|title=Same with prec=4}}
{{primes in edo|318|columns=9|start=2|prec=4|title=Same with prec=4}}
<noinclude>[[Category:Template documentation]]</noinclude>