Wikitext

Revision as of 19:14, 22 August 2022 by David (talk | contribs) (→‎Images)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
\( \newcommand{\P}[]{\unicode{xB6}} \newcommand{\AA}[]{\unicode{x212B}} \newcommand{\empty}[]{\emptyset} \newcommand{\O}[]{\emptyset} \newcommand{\Alpha}[]{Α} \newcommand{\Beta}[]{Β} \newcommand{\Epsilon}[]{Ε} \newcommand{\Iota}[]{Ι} \newcommand{\Kappa}[]{Κ} \newcommand{\Rho}[]{Ρ} \newcommand{\Tau}[]{Τ} \newcommand{\Zeta}[]{Ζ} \newcommand{\Mu}[]{\unicode{x039C}} \newcommand{\Chi}[]{Χ} \newcommand{\Eta}[]{\unicode{x0397}} \newcommand{\Nu}[]{\unicode{x039D}} \newcommand{\Omicron}[]{\unicode{x039F}} \DeclareMathOperator{\sgn}{sgn} \def\oiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222F}\,}{\unicode{x222F}}{\unicode{x222F}}{\unicode{x222F}}}\,}\nolimits} \def\oiiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x2230}\,}{\unicode{x2230}}{\unicode{x2230}}{\unicode{x2230}}}\,}\nolimits} \)

Code

Inline code can by represented with <code></code>
Code blocks should be like:

<syntaxhighlight lang="cpp">
// ... my code here
</syntaxhighlight>

Math

Math is written in standard latex syntax inside of <math></math>.
I use a modified version of SimpleMathJax: https://github.com/dli7319/SimpleMathJax3.

  • Beware: Do not use ||, use \Vert instead.
  • The attribute display can be used to control the rendering style. See Mediawikiwiki: Extension:Math/Displaystyle.
    • display="inline" renders inline math inline.
    • display="block" renders display math which separate and centered.
    • Omitting display will render display math inline.

Images

See Mediawikiwiki: Help:Images.

Line Breaks

Line breaks are usually done with:

  • <br> or <br /> for new lines
  • Two new lines for paragraph breaks

Download my extension Mediawikiwiki: Extension:LineBreaks to use two spaces and a new line as a line break.

References

Referenced are defined using the <ref> tag inline.
I'm actually pretty opposed to formatting all references inline with the wikitext. They should be centralized somewhere else such as in a references section. Instead you can use Wikipedia: Help:Footnotes#List-defined_references.

{{reflist|refs=
<ref name="name1">Content</ref>
<ref name="name2">Content</ref>
<ref name="name...n">Content</ref>
}}