# latex-svg for blogs in .tex

Posted on 2020-05-10 by Oleg Grenrus

I’m a weird person. I like writing . With all of its downsides, it’s quite flexible.

This blog post is written in tex file, not markdown. With the help of latex-svg, the included math and some other environments work. We are still constrained by what pandoc supports, but there is a lot.

## #Examples

Let us write few examples of what we can do.

Formulas

or

work nicely.

### #tikzcd

As pandoc can preserve raw latex blocks and latex-svg renders them, you can draw tikzcd diagrams:

### #Tables

Writing tables in markdown is a pain. It is painful in also but less.

foo bar quu
foo1 2345678 quu9
foo123 456 quu789

### #Code snippets

pandoc recognizes code environment. So we get code highlighting!

fact :: Integer -> Integer
fact n = product [2 .. n]

## #Rendering as PDF

The benefit of writing posts in is that you can convert to PDF. You can also start with markdown, and use pandoc to convert it to tex document, and that is what more reasonable people do.

Site proudly generated by Hakyll