Using Overleaf as a blogging client
I use Overleaf for all my writing and presentations. Iâd like to use Overleaf for blogging as well. I usually write my blog like posts in Medium but Medium cannot yet show posts that contain tables, figures, and citations. So, I was looking for a workflow that might be useful for bringing in the power of Overleaf and blogging where one can customize the appearance of the paper and share in an html format.I suppose one can go in a number of directions. From the simple to a little more complex,
- I can convert a LaTeXdocument Iâd write in Overleaf to HTML and email the document to a Blogger or Wordpress site. That might be the easiest?
- If I want a little more flexibility in terms of how I want the site to appear and tweak things, I can use Github to use Github pages to push and serve my article as a static file that people can read
- An alternative way is to use static site generators and a web hosted solution such as Surge or Netlify to serve the paper.
Publishing an Overleaf Article as a blog post through Wordpress or Blogger
For this, you need the following:- An Overleaf Account (Free, you get 1 GB free space)
- A Blogger or Wordpress Account.
- An installation of Pandoc
- An installation of Git
- An Email Client
Go to blogger, set up an account if you do not have one, or select a blog where you want to work. Then set up your account so that you can email files to blogger directly and get published instantly. Here is a screenshot:
git clone URL
Now you use Pandoc to generate the html from the LaTeXdocument, and the code is
pandoc -f latex -t html â"filter pandoc-citeproc â"bibliography sample.bib -o post1.html main.tex
Explanation of this code
- pandoc is for invoking the pandoc programme
- -f and -t are from and to, so from latex to html
- filter: use it if youâd like to use a bibliography file and references, in this case the file name is sample.bib
- -o is for output and give it a file name, in this case post1.html
- main.tex is the name of the file that gets converted