This site is supported by donations to The OEIS Foundation.

Template:Clear

From OeisWiki
(Redirected from Template:-)
Jump to: navigation, search

The {{clear}} (or{{-}}) OEIS Wiki formatting and function template "clears" both margins (as default); it is often used before a header to make sure that a header will be the full width of the page. You also have the options to use it to clear only either the left margin or the right margin.

Caveat

The template uses CSS[1]

  • <br style="clear: left;" />, or
  • <br style="clear: right;" />, or
  • <br style="clear: both;" />.

If you use obsolete presentational HTML as in <table align="right"> for a "floating right" effect you would also need <br clear="all" /> instead of CSS to clear it consistently. Maybe modify this template to support obsolete presentational HTML—ugly, but working with any browser and all mixtures of "floating" markup.

Usage

{{-}}, {{clear}} (same as {{-|both}}, {{clear|both}})

or

{{-|l}}, {{clear|l}} (same as {{-|left}}, {{clear|left}})

or

{{-|r}}, {{clear|r}} (same as {{-|right}}, {{clear|right}})

where you may choose among the following subset of CSS clear attribute[2] values

  • both: no floating elements allowed on either the left or the right side (default);
  • left: no floating elements allowed on the left side;
  • right: no floating elements allowed on the right side.

Examples


[[Image:Euclidean_algorithm_running_time_X_Y_361×361.png|thumb|alt="A set of colored lines radiating outwards from the origin of an {{math|''x''{{dash|n}}''y''|&}} coordinate system. Each line corresponds to a set of number pairs requiring the same number of steps in the Euclidean algorithm."|Number of steps in the [[Euclidean algorithm]] for {{math|[[GCD]](''x'', ''y'')|&}}. Red points indicate relatively few steps (quick), whereas yellow, green and blue points indicate successively more steps (slow). The largest blue area follows the line {{math|''y'' {{=}} ''ϕ''{{sp|1}}''x''|&}}, where {{math|''[[Phi|ϕ]]''|&}} represents the [[Golden ratio]].]]
{{-}}

gives (without {{-}} the Code section would be to the left of the image, instead of below)

"A set of colored lines radiating outwards from the origin of an x–y coordinate system. Each line corresponds to a set of number pairs requiring the same number of steps in the Euclidean algorithm."
Number of steps in the Euclidean algorithm for 
GCD(x, y)
. Red points indicate relatively few steps (quick), whereas yellow, green and blue points indicate successively more steps (slow). The largest blue area follows the line 
y = ϕx
, where 
ϕ
represents the Golden ratio.


Code

Code (without obsolete presentation HTML support)

This is the code currently in use.


{{#switch: {{lc: {{{1|both}}} }}
| l | left  = <br style="clear: left;" />
| r | right = <br style="clear: right;" />
| both = <br style="clear: both;" />  
}}

Code (with obsolete presentation HTML support)


{{#switch: {{lc: {{{1|both}}} }}
| l | left  = <br style="clear: left;" clear="left" />
| r | right = <br style="clear: right;" clear="right" />
| both = <br style="clear: both;" clear="all" /> 
}}

Notes