Difference between revisions of "Template:Frac/doc"

From Zero-K
Jump to navigation Jump to search
(Initial documentation.)
 
(Using BASEPAGENAME magic word.)
Line 1: Line 1:
Creates simple inline fractions like this one: {{frac|<var>numerator</var>|<var>denominator</var>}}. There is no awareness of where the line is, so if the top or the bottom of the fraction is too tall, vertical centering will be wrong:
+
Creates simple inline fractions like this one: {{ {{BASEPAGENAME}}}}. There is no awareness of where the line is, so if the top or the bottom of the fraction is too tall, vertical centering will be wrong:
<samp style="display:block;text-align:center">&minus; {{frac|<var>numerator</var>|<var>denominator &minus; {{frac|<var>numerator</var>|<var>denominator</var>}}</var>}}, &minus; {{frac|<var>numerator + {{frac|<var>numerator</var>|<var>denominator</var>}}</var>|<var>denominator</var>}}</samp>
+
<samp style="display:block;text-align:center">&minus; {{ {{BASEPAGENAME}}|<var>numerator</var>|<var>denominator &minus; {{ {{BASEPAGENAME}}|<var>numerator</var>|<var>denominator</var>}}</var>}}, &minus; {{ {{BASEPAGENAME}}|<var>numerator + {{ {{BASEPAGENAME}}|<var>numerator</var>|<var>denominator</var>}}</var>|<var>denominator</var>}}</samp>

Revision as of 01:21, 18 August 2021

Creates simple inline fractions like this one: numerator ÷ denominator. There is no awareness of where the line is, so if the top or the bottom of the fraction is too tall, vertical centering will be wrong: numerator ÷ denominator − numerator ÷ denominator, − numerator + numerator ÷ denominator ÷ denominator