NWHirschfeld
Technology and Creativity

LaTeX documents with Ruby

Posted by Niclas Wilhelm Hirschfeld on

I’m a big fan of the erb templating engine, which is supposed to be used for generating websites and … it also works great to generate LaTeX-documents.

The following snippet shows an example of this:

\section{<%= x %>}
<% (0 .. 10).each do |y| %>
\subsection{<%= y %>}
<% end >
\newpage

You can find the source here:

https://github.com/nwhirschfeld/rblatex