תבנית:Equation: הבדלים בין גרסאות בדף

מתוך Math-Wiki
(דף חדש: <noinclude> ==Usage== Used to add new rows of aligned math text.'''{|''' needs to be called first. You can add a new general row in the following manner: <pre><nowiki> {{equation |l= |…)
 
אין תקציר עריכה
שורה 1: שורה 1:
<noinclude>
<noinclude>
==Usage==
==Usage==
Used to add new rows of aligned math text.'''{|''' needs to be called first. You can add a new general row in the following manner:
Used to add new rows of aligned math text.<nowiki>{{begin-equation}}</nowiki> needs to be called first. You can add a new general row in the following manner:


<pre><nowiki>
<pre><nowiki>
שורה 16: שורה 16:
# cc - Extra comment (used only when needed).
# cc - Extra comment (used only when needed).


Once the full equation is completed, '''|}''' must be called.
Once the full equation is completed, <nowiki>{{end-equation}}</nowiki> must be called.
==Example==
==Example==
<pre><nowiki>
<pre><nowiki>
{|
{|
{{equation|l=<math>42</math>|r=<math>21\cdot2</math>}}
{{equation| l=<math>42</math> |r=<math>21\cdot2</math>}}
{{equation|o=<math>\leq</math>|r=<math>12345</math>|c=since <math>21\cdot2=42\leq12345</math>}}
{{equation| o=<math>\leq</math>|r=<math>12345</math>|c=since <math>21\cdot2=42\leq12345</math>}}
|}
|}
</nowiki></pre>
</nowiki></pre>
gives:
gives:
{|
{|
{{equation|l=<math>42</math>|r=<math>21\cdot2</math>}}
{{equation| l=<math>42</math> |r=<math>21\cdot2</math>}}
{{equation|o=<math>\leq</math>|r=<math>12345</math>|c=כי <math>21\cdot2=42\leq12345</math>}}
{{equation| o=<math>\leq</math>|r=<math>12345</math>|c=since <math>21\cdot2=42\leq12345</math>}}
|}
|}


שורה 37: שורה 37:
| align="left"  | {{ #if: {{{r|}}}|{{{r}}}|}}
| align="left"  | {{ #if: {{{r|}}}|{{{r}}}|}}
| align="left"  | {{ #if: {{{rr|}}}|{{{rr}}}|}}
| align="left"  | {{ #if: {{{rr|}}}|{{{rr}}}|}}
| align="right" | {{ #if: {{{c|}}}|{{{c}}}|}}
| align="left"   |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ #if: {{{c|}}}|{{{c}}}|}}
| align="right" | {{ #if: {{{cc|}}}|{{{cc}}}|}}</includeonly>
| align="left"   |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ #if: {{{cc|}}}|{{{cc}}}|}}</includeonly>

גרסה מ־10:29, 12 באוגוסט 2010

Usage

Used to add new rows of aligned math text.{{begin-equation}} needs to be called first. You can add a new general row in the following manner:

{{equation |l= |r= }}

The different possible variables that can be used are:

  1. ll - Furthest left column (used only when needed).
  2. l - General left column.
  3. o - Operator, defaults to [math]\displaystyle{ = }[/math]
  4. r - General right column.
  5. rr - Furthest right column (used only when needed).
  6. c - Comment
  7. cc - Extra comment (used only when needed).

Once the full equation is completed, {{end-equation}} must be called.

Example

{|
{{equation| l=<math>42</math> |r=<math>21\cdot2</math>}}
{{equation| o=<math>\leq</math>|r=<math>12345</math>|c=since <math>21\cdot2=42\leq12345</math>}}
|}

gives:

{{ #if: |{{{ll}}}|}} {{#if: [math]\displaystyle{ 42 }[/math]|[math]\displaystyle{ 42 }[/math]|}} {{#if: |{{{o}}}|[math]\displaystyle{ = }[/math]}} {{ #if: [math]\displaystyle{ 21\cdot2 }[/math]|[math]\displaystyle{ 21\cdot2 }[/math]|}} {{ #if: |{{{rr}}}|}}          {{ #if: |{{{c}}}|}}          {{ #if: |{{{cc}}}|}}
{{ #if: |{{{ll}}}|}} {{#if: |{{{l}}}|}} {{#if: [math]\displaystyle{ \leq }[/math]|[math]\displaystyle{ \leq }[/math]|[math]\displaystyle{ = }[/math]}} {{ #if: [math]\displaystyle{ 12345 }[/math]|[math]\displaystyle{ 12345 }[/math]|}} {{ #if: |{{{rr}}}|}}          {{ #if: since [math]\displaystyle{ 21\cdot2=42\leq12345 }[/math]|since [math]\displaystyle{ 21\cdot2=42\leq12345 }[/math]|}}          {{ #if: |{{{cc}}}|}}