Back to Articles
Dec 21, 2023
2 min read

Hello, World!

Test Article

This is a test blog post.

LaTeX\LaTeX

Inline LaTeX\LaTeX expressions such as f(x)=x+1f(x) = x + 1 are supported, as well as centered expressions. Here is the diffusion equation:

κuxx=utΨt=κ2Ψ\kappa u_{xx} = u_{t} \frac{\partial \Psi}{\partial t}=\kappa \triangledown^{2} \Psi

Code Blocks

Here is an example C++ code block:

// Write out a std::tuple to std::ostream
template<typename Ch, typename Tr, typename... Ts>
auto& operator<<(std::basic_ostream<Ch, Tr> &stream,
                 std::tuple<Ts...> const &tup) {
  std::basic_stringstream<Ch, Tr> tmp;
  tmp << "(";
  std::apply(
    [&tmp] (auto&&... args) { ((tmp << args << ", "), ...); },
    tup
  );
  tmp.seekp(-2, tmp.cur);
  tmp << ")";
  return stream << tmp.str();
}

Here is an example Scala code block:

// Materialize an Ordering[U] from an Ordering[T] and a map from T to U
extension [A](ordT: Ordering.type) {
  def map[B](conv: A => B)(using ord: Ordering[B]): Ordering[A] = {
    new Ordering[A] {
      def compare(x: A, y: A): Int = {
        ord.compare(conv(x), conv(y))
      }
    }
  }
}

Embedding Images

Images placed into /public directory can be referenced and embedded into MDX:

Embedding JavaScript

JSX and TSX components can be embedded into MDX. Here is an example YouTube video:

And here is an example Bilibili video: