Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Styleguide

Jan De Wilde edited this page Sep 7, 2020 · 2 revisions

This post demoes the capabilities of Markdown and added extensions. This post was created in the United States of America, anno 2020. Not that it matters.


KaTeX

There are those who go by the moniker of mathematician.

They are known to like to try and impress everyone by making up symbols like $\varphi$. Sometimes they'll write stuff like ${3x-1}+(1+x)^2$ and feel quite chuffed with themselves. When they really start peacocking they'll regurgitate this incomprehensible drivel:

$$\begin{array}{c} \nabla \times \vec{\mathbf{B}} -, \frac1c, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}, +, \frac1c, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{array}$$

I kid, I kid! I have great respect for mathematicians! I'll take them over serial killers any day. Although there is some overlap. Alright, that's demoes the KaTeX extension in Markdown. Time to move on.

Syntax highlighting

Code can be useful, can't it? I can really see it coming into widespread use one day!

After all the unwarranted rudeness, let me extend an olive branch and use MATLAB to show syntax highlighting.

ds = tabularTextDatastore('airlinesmall.csv');
ds.TreatAsMissing = 'NA';
ds.SelectedVariableNames = {'Year','Month','ArrDelay','DepDelay','Origin','Dest'};
ds.SelectedFormats(5:6) = {'%C','%C'};
pre = preview(ds)

By Erdős—your number, John?—such gobbledygook! No wonder most mathematicians don't get invited to parties. Here is some inline code let foo = bar + baz; Well, that's why I don't get invited either.

Have a look at the full list of supported languages

Lists

  • lists don't always need numbers
  • which is of course hard to accept
  • for the mathematician
  1. neutral
  2. even
  3. 14159 irrational
  4. not even a prime, ugh, gross

Quotes

Q: What is the difference between a mathematician and a philosopher?

A: The mathematician only needs paper, pencil, and a trash bin for his work. The philosopher can do without the trash bin.

Inline stuff

This is bold. Here's a link, I always forgot how to create them in markdown until I used the mnemonic device: b before p, brackets before parens.

Images

Frosted glass depicting the number 20

Mathematicians like numbers. Even in bitmaps. In fact, legend has it some like the number twenty.

HTML

HTML does just fine embedded in markdown. Here's a table. It's not very useful.

This That The Other
Answer
Amazingly Accurate Answer to Life,
the Universe and Everything
42
Answer
Amazingly Accurate Answer to Life,
the Universe and Everything
42
Answer
Amazingly Accurate Answer to Life,
the Universe and Everything
42
Clone this wiki locally