Difference between revisions of "Template:USAMO box"

(a lot easier than i expected)
m (edited wrong page ... !)
Line 1: Line 1:
 
{| class="wikitable" style="clear:both; margin:0.5em auto; font-size:95%; border:1px solid black;"
 
{| class="wikitable" style="clear:both; margin:0.5em auto; font-size:95%; border:1px solid black;"
| style="background:#ccf;text-align:center;" colspan="3" | '''[[{{{year}}} IMO]]''' ('''[[{{{year}}} IMO Problems|Problems]]''')
+
| style="background:#ccf;text-align:center;" colspan="3" | '''[[{{{year}}} USAMO]]''' ('''[[{{{year}}} USAMO Problems|Problems]]''')
 
|-
 
|-
|width="33%" align="center" |{{{beforetext|Preceded&nbsp;by<br/>}}}'''{{{before|[[{{{year}}} IMO Problems/Problem {{{num-b}}}|Problem {{{num-b}}}]]}}}'''
+
|width="33%" align="center" |{{{beforetext|Preceded&nbsp;by<br/>}}}'''{{{before|[[{{{year}}} USAMO Problems/Problem {{{num-b}}}|Problem {{{num-b}}}]]}}}'''
|width="34%" style="text-align:center;" | [[{{{year}}} IMO Problems/Problem 1|1]] '''•''' [[{{{year}}} IMO Problems/Problem 2|2]] '''•''' [[{{{year}}} IMO Problems/Problem 3|3]] '''•''' [[{{{year}}} IMO Problems/Problem 4|4]] '''•''' [[{{{year}}} IMO Problems/Problem 5|5]] '''•'''
+
|width="34%" style="text-align:center;" | [[{{{year}}} USAMO Problems/Problem 1|1]] '''•''' [[{{{year}}} USAMO Problems/Problem 2|2]] '''•''' [[{{{year}}} USAMO Problems/Problem 3|3]] '''•''' [[{{{year}}} USAMO Problems/Problem 4|4]] '''•''' [[{{{year}}} USAMO Problems/Problem 5|5]]
[[{{{year}}} IMO Problems/Problem 6|6]]
+
|width="33%" align="center" rowspan="{{{rowsf|1}}}" | {{{aftertext|Followed&nbsp;by<br/>}}}'''{{{after|[[{{{year}}} USAMO Problems/Problem {{{num-a}}}|Problem {{{num-a}}}]]}}}'''
|width="33%" align="center" rowspan="{{{rowsf|1}}}" | {{{aftertext|Followed&nbsp;by<br/>}}}'''{{{after|[[{{{year}}} IMO Problems/Problem {{{num-a}}}|Problem {{{num-a}}}]]}}}'''
+
|}<includeonly>[[Category:USAMO Problems]]</includeonly><noinclude>
|}<includeonly>[[Category:IMO Problems]]</includeonly><noinclude>
 
 
To use this template, type in:
 
To use this template, type in:
  
 
<pre>
 
<pre>
{{IMO box|year=|num-b=|num-a=}}
+
{{USAMO box|year=|num-b=|num-a=}}
 
</pre>
 
</pre>
  
Line 17: Line 16:
 
For example,
 
For example,
 
<pre>
 
<pre>
{{IMO box|year=2005|num-b=1|num-a=3}}
+
{{USAMO box|year=2005|num-b=1|num-a=3}}
 
</pre>
 
</pre>
  
 
If it is the first question, then use:
 
If it is the first question, then use:
 
<pre>
 
<pre>
{{IMO box|year=|before=First Question|num-a=2}}
+
{{USAMO box|year=|before=First Question|num-a=2}}
 
</pre>
 
</pre>
  
 
If it is the last question, then use:
 
If it is the last question, then use:
 
<pre>
 
<pre>
{{IMO box|year=|num-b=4|after=Last Question}}
+
{{USAMO box|year=|num-b=4|after=Last Question}}
 
</pre>
 
</pre>
  
 
This yields, respectively:
 
This yields, respectively:
  
{{IMO box|year=1959|num-b=1|num-a=3}}
+
{{USAMO box|year=2005|num-b=1|num-a=3}}
  
{{IMO box|year=1959|before=First Question|num-a=2}}
+
{{USAMO box|year=2005|before=First Question|num-a=2}}
  
{{IMO box|year=1959|num-b=4|after=Last Question}}
+
{{USAMO box|year=2005|num-b=4|after=Last Question}}
  
 
[[Category:Succession templates]]
 
[[Category:Succession templates]]
 
</noinclude>
 
</noinclude>

Revision as of 15:29, 13 March 2007

[[{{{year}}} USAMO]] ([[{{{year}}} USAMO Problems|Problems]])
Preceded by
[[{{{year}}} USAMO Problems/Problem {{{num-b}}}|Problem {{{num-b}}}]]
[[{{{year}}} USAMO Problems/Problem 1|1]] [[{{{year}}} USAMO Problems/Problem 2|2]] [[{{{year}}} USAMO Problems/Problem 3|3]] [[{{{year}}} USAMO Problems/Problem 4|4]] [[{{{year}}} USAMO Problems/Problem 5|5]] Followed by
[[{{{year}}} USAMO Problems/Problem {{{num-a}}}|Problem {{{num-a}}}]]

To use this template, type in:

{{USAMO box|year=|num-b=|num-a=}}

Where num-b is the problem number before the current one, and num-a is the problem number after the current one (this is because parser functions are not supported).

For example,

{{USAMO box|year=2005|num-b=1|num-a=3}}

If it is the first question, then use:

{{USAMO box|year=|before=First Question|num-a=2}}

If it is the last question, then use:

{{USAMO box|year=|num-b=4|after=Last Question}}

This yields, respectively:

2005 USAMO (ProblemsResources)
Preceded by
Problem 1
Followed by
Problem 3
1 2 3 4 5
All USAMO Problems and Solutions
2005 USAMO (ProblemsResources)
Preceded by
First Question
Followed by
Problem 2
1 2 3 4 5
All USAMO Problems and Solutions
2005 USAMO (ProblemsResources)
Preceded by
Problem 4
Followed by
Last Question
1 2 3 4 5
All USAMO Problems and Solutions