CZ:Formatting mathematics: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Aleksander Stos
imported>Anthony Argyriou
(change link, now that the meta page has been imported)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
this page: CZ policy (either established by consensus or under debate) for how to format mathematics in CZ articles
{{Workgroup|group=Mathematics}}
This page contains CZ policy (either established by consensus or under debate) for how to format mathematics in CZ articles.
 
This page does not explain how to type mathematical formula in the software that we are using here. For that, you are referred to [[Help:Displaying mathematical formulas]].


== Issues for all <nowiki><math></nowiki> environments ==
== Issues for all <nowiki><math></nowiki> environments ==
Line 5: Line 8:
=== Use <nowiki><math></nowiki> environments instead of HTML markup ===
=== Use <nowiki><math></nowiki> environments instead of HTML markup ===


''Proposed policy:'' Always use a <nowiki><math></nowiki> environment when typesetting mathematics (for example, whenever a $ environment would be used in TeX), rather than using by-hand italics or HTML markup. [[CZ:Formatting mathematics/Use math environments|(discuss this)]]
''Note: this policy is at odds with [[CZ:Formatting_mathematics#Proper_non-TeX_mathematical_notation|one formatting section below]]. When consensus is reached, this item and that one should be coordinated.''
 
''Proposed policy:'' Always use a <nowiki><math></nowiki> environment when typesetting mathematics (for example, whenever a $ environment would be used in TeX), rather than using by-hand italics or HTML markup. [[CZ:Formatting mathematics/Use math environments|('''''discuss this''''')]]


===Inline or display?===
===Inline or display?===
Line 16: Line 21:
=== The <math>dx</math> in integrals ===
=== The <math>dx</math> in integrals ===


''Proposed policy:'' Insert a "thin space" \, before any <math>dx</math>-type object in an integral or differential; let the <nowiki><math></nowiki> environment typeset it in normal math font, rather than altering it. [[CZ:Formatting mathematics/The dx in integrals|(discuss this)]]
''Policy:'' Insert a "thin space" \, before any <math>dx</math>-type object in an integral or differential; let the <nowiki><math></nowiki> environment typeset it in normal math font, rather than altering it.
 
''Good examples:'' <math>d\bar f = u \, dx - iv \, dy</math> and <math>\iint g(x,y) \, dx \, dy</math>
 
''Bad examples:'' <math>d\bar f = u dx - iv dy</math> and <math>\iint g(x,y) \, \mathrm{dx} \, \mathrm{dy}</math>
 
=== Punctuation ===
 
The punctuation marks that follow a <nowiki><math></nowiki> environment should be put ''inside'' the environment -- otherwise the mark might appear at the beginning of the next line, depending on the position of the text in browser's window, or be ridiculously too high or too low.
 
=== Fractions ===
 
Writing
 
:<math>\frac{3}{4}</math>
 
looks good when "displayed", but when "inline", <math>3/4</math> is better.
 
In superscripts
 
:<math>e^{-x^2/2}\,</math>
 
looks better than
 
:<math>e^{-\frac{x^2}{2}}.</math>
 
In fractions-within-fractions, a similar issue is raised:


''Proposed good examples:'' <math>d\bar f = u \, dx - iv \, dy</math> and <math>\iint g(x,y) \, dx \, dy</math>
:<math> \frac{\overline{x} - \mu}{s/\sqrt{n}} </math>


''Proposed bad examples:'' <math>d\bar f = u dx - iv dy</math> and <math>\iint g(x,y) \, \mathrm{dx} \, \mathrm{dy}</math>
versus


=== Punctation ===
:<math> \frac{\overline{x} - \mu}{\frac{s}{\sqrt{n}}}. </math>
The punctuation marks that follow <nowiki><math></nowiki> environment should be put ''inside'' the environment -- otherwise the mark might appear at the beginning of the next line, depending on the position of the text in browser's window.


== Issues for display <nowiki><math></nowiki> environments ==
== Issues for display <nowiki><math></nowiki> environments ==
Line 29: Line 59:
=== Indentation ===
=== Indentation ===


'''Policy:''' Use a single colon outside the &lt;math&gt; tag to indent a displayed equation. [[CZ:Formatting mathematics/Indentation|(discuss this)]]
'''Policy:''' Use a single colon outside the &lt;math&gt; tag to indent a displayed equation.


''Good example:''
''Good example:''
Line 43: Line 73:
=== Use of \scriptstyle ===
=== Use of \scriptstyle ===


''To determine:'' Whether to use \scriptstyle to reduce the size of PNG-rendered inline math formulas. [[CZ:Formatting mathematics/Scriptstyle|(discuss this)]]
''To determine:'' Whether to use \scriptstyle to reduce the size of PNG-rendered inline math formulas. [[CZ:Formatting mathematics/Scriptstyle|('''''discuss this''''')]]


''Example with \scriptstyle:'' The identity <math>\scriptstyle e^{2\pi i} = \int_0^\infty e^{-x} \, dx</math> is cool.
''Example with \scriptstyle:'' The identity <math>\scriptstyle e^{2\pi i} = \int_0^\infty e^{-x} \, dx</math> is cool.
Line 49: Line 79:
''Example without \scriptstyle:'' The identity <math>e^{2\pi i} = \int_0^\infty e^{-x} \, dx</math> is cool.
''Example without \scriptstyle:'' The identity <math>e^{2\pi i} = \int_0^\infty e^{-x} \, dx</math> is cool.


''Size problems: The letters in <math>A + B = C\,</math> look comically gigantic on some browsers.
== Issues for the text ==
It was suggested that global resizing of PNG-renderd formulas is possible. This would eliminate the need for \scriptstyle (or leave it for its proper use). The only question would be to determine the "right" size, as the ''dispayed'' formulas will be affected too.


== Fractions ==
=== Capitalizing theorem names ===


Writing
''Proposed policy:'' Do not capitalize names of theorems for that reason alone, either when referring to them in prose or when creating new CZ articles. Normally capitalized words within theorem names should still be capitalized. [[CZ:Formatting mathematics/Theorem capitalization|('''''discuss this''''')]]


:<math>\frac{3}{4}</math>
''Proposed good example:'' The [[fundamental theorem of covering spaces]] should never be called Martin's theorem, because [[User:Greg Martin|Martin]] isn't a topologist.


looks good when "displayed", but when "inline", 3/4 may be better.
''Proposed bad example:'' The [[Fundamental Theorem of Covering Spaces]] should never be called Martin's Theorem, because [[User:Greg Martin|Martin]] isn't a topologist.


In superscripts
=== Using phrases like "it is clear that", "obviously" ===


:<math>e^{-x^2/2}\,</math>
This is tricky. Spelling out every detail of an argument can be awkward, pedantic, or boring, and it can disrupt the narrative. On the other hand, what might be obvious to one reader might not be obvious to another. Some suggestions:


looks better than
*Pay attention to the level of mathematical sophistication expected of the reader in the surrounding text.


:<math>e^{-\frac{x^2}{2}}.</math>
*Consider using endnotes or hyperlinks to point readers to more detailed explantions, or to articles providing necessary background and context.


In fractions-within-fractions, a similar issue is raised:
=== Proper non-TeX mathematical notation ===


:<math> \frac{\overline{x} - \mu}{s/\sqrt{n}} </math>
''Note: using non-TeX mathematical notation at all is at odds with [[CZ:Formatting_mathematics#Use_.3Cmath.3E_environments_instead_of_HTML_markup|one proposed policy above]]. When consensus is reached, this item and that one should be coordinated.''


versus
Italicizing variables but ''not'' digits and ''not'' punctuation matches TeX style.  Spacing before and after "+" or "=" or the like matches TeX style.
 
:<math> \frac{\overline{x} - \mu}{\frac{s}{\sqrt{n}}}. </math>
 
== Proper non-TeX mathematical notation ==
 
Italicizing variables bot ''not'' digits and ''not'' punctuation matches TeX style.  Spacing before and after "+" or "=" or the like matches TeX style.


: (''a''<sup>2</sup> + ''b''<sup>2</sup>) = ''c''<sup>2</sup>
: (''a''<sup>2</sup> + ''b''<sup>2</sup>) = ''c''<sup>2</sup>


== Issues for the text ==
== \frac versus \cfrac ==


=== Capitalizing theorem names ===
Compare and contrast:


''Proposed policy:'' Do not capitalize names of theorems for that reason alone, either when referring to them in prose or when creating new CZ articles. Normally capitalized words within theorem names should still be capitalized. [[CZ:Formatting mathematics/Theorem capitalization|(discuss this)]]
:<math> 4\int_0^\infty\frac{xe^{-x\sqrt{5}}}{\cosh x}\,dx
={1 \over 1 + {1^2 \over {1 + {1^2 \over {1 + {2^2 \over 1 + {2^2 \over {1 + {3^2 \over {1 + {3^2 \over{1 + \cdots \quad}}}}}}}}}}}}. </math>


''Proposed good example:'' The [[fundamental theorem of covering spaces]] should never be called Martin's theorem, because [[User:Greg Martin|Martin]] isn't a topologist.
<!-- extra blank line between two fairly complicated [[TeX]] displays for ease of legibility -->


''Proposed bad example:'' The [[Fundamental Theorem of Covering Spaces]] should never be called Martin's Theorem, because [[User:Greg Martin|Martin]] isn't a topologist.
:<math>
4\int_0^\infty\frac{xe^{-x\sqrt{5}}}{\cosh x}\,dx
= \cfrac{1}{{}\quad 1 + \cfrac{1^2}{1 + \cfrac{1^2}{1 + \cfrac{2^2}{1 + \cfrac{2^2}{1 + \cfrac{3^2}{1 + \cfrac{3^2}{1 + \cdots \qquad\qquad{}}}}}}} \quad{}}
</math>
: [[User:Michael Hardy|Michael Hardy]] 17:47, 13 August 2007 (CDT)


=== Using phrases like "it is clear that", "obviously" ===
::PS: The identity is (of course) due to [[Srinivasa Ramanujam|Ramanujan]]. [[User:Michael Hardy|Michael Hardy]] 17:49, 13 August 2007 (CDT)
 
This is tricky. Spelling out every detail of an argument can be awkward, pedantic, or boring, and it can disrupt the narrative. On the other hand, what might be ovious to one reader might not be obvious to another. Some suggestions:
 
*Pay attention to the level of mathematical sophistication expected of the reader in the surrounding text.
 
*Consider using endnotes or hyperlinks to point readers to more detailed explantions, or to articles providing necessary background and context.

Latest revision as of 13:19, 11 February 2008

Workgroups are no longer used for group communications, but they still are used to group articles into fields of interest. Each article is assigned to 1-3 Workgroups via the article's Metadata.

Mathematics Workgroup
Mathematics article All articles (901) To Approve (0) Editors: active (2) / inactive (15)
and
Authors: active (280) / inactive (0)
Workgroup Discussion
Recent changes Citable Articles (16)
Subgroups (1)
Checklist-generated categories:

Subpage categories:

Missing subpage categories:

Article statuses:

This page contains CZ policy (either established by consensus or under debate) for how to format mathematics in CZ articles.

This page does not explain how to type mathematical formula in the software that we are using here. For that, you are referred to Help:Displaying mathematical formulas.

Issues for all <math> environments

Use <math> environments instead of HTML markup

Note: this policy is at odds with one formatting section below. When consensus is reached, this item and that one should be coordinated.

Proposed policy: Always use a <math> environment when typesetting mathematics (for example, whenever a $ environment would be used in TeX), rather than using by-hand italics or HTML markup. (discuss this)

Inline or display?

Consider using display style for complex expressions (particulary if they include integrals, sums, products, matrices, etc.) rather than inline expressions. Consider the following example: inline and displayed

Sometimes, there will be compelling reasons for not doing this, but a useful strategy to difficulties with awkward inline expressions is avoidance.

The in integrals

Policy: Insert a "thin space" \, before any -type object in an integral or differential; let the <math> environment typeset it in normal math font, rather than altering it.

Good examples: and

Bad examples: and

Punctuation

The punctuation marks that follow a <math> environment should be put inside the environment -- otherwise the mark might appear at the beginning of the next line, depending on the position of the text in browser's window, or be ridiculously too high or too low.

Fractions

Writing

looks good when "displayed", but when "inline", is better.

In superscripts

looks better than

In fractions-within-fractions, a similar issue is raised:

versus

Issues for display <math> environments

Indentation

Policy: Use a single colon outside the <math> tag to indent a displayed equation.

Good example:

Bad example:

Issues for inline <math> environments

Use of \scriptstyle

To determine: Whether to use \scriptstyle to reduce the size of PNG-rendered inline math formulas. (discuss this)

Example with \scriptstyle: The identity is cool.

Example without \scriptstyle: The identity is cool.

Issues for the text

Capitalizing theorem names

Proposed policy: Do not capitalize names of theorems for that reason alone, either when referring to them in prose or when creating new CZ articles. Normally capitalized words within theorem names should still be capitalized. (discuss this)

Proposed good example: The fundamental theorem of covering spaces should never be called Martin's theorem, because Martin isn't a topologist.

Proposed bad example: The Fundamental Theorem of Covering Spaces should never be called Martin's Theorem, because Martin isn't a topologist.

Using phrases like "it is clear that", "obviously"

This is tricky. Spelling out every detail of an argument can be awkward, pedantic, or boring, and it can disrupt the narrative. On the other hand, what might be obvious to one reader might not be obvious to another. Some suggestions:

  • Pay attention to the level of mathematical sophistication expected of the reader in the surrounding text.
  • Consider using endnotes or hyperlinks to point readers to more detailed explantions, or to articles providing necessary background and context.

Proper non-TeX mathematical notation

Note: using non-TeX mathematical notation at all is at odds with one proposed policy above. When consensus is reached, this item and that one should be coordinated.

Italicizing variables but not digits and not punctuation matches TeX style. Spacing before and after "+" or "=" or the like matches TeX style.

(a2 + b2) = c2

\frac versus \cfrac

Compare and contrast:


Michael Hardy 17:47, 13 August 2007 (CDT)
PS: The identity is (of course) due to Ramanujan. Michael Hardy 17:49, 13 August 2007 (CDT)