Nanoc-latexmk
Nanoc filter to compile .tex
files to pdf using the latexmk
command. Supports both pdflatex
and xelatex
.
System requirements
You need everything to build your LaTeX file manually, so latexmk
, pdflatex
and xelatex
need to be installed on your system.
Installation
To use this filter, add nanoc-latexmk to your Gemfile
.
gem 'nanoc-latexmk'
Then require this project in your Rules
:
require 'nanoc/latexmk'
Usage
First, be sure to add tex
to the text_extensions
in your nanoc.yaml
.
With a basic file in content/file.tex
:
---
title: Hello
---
\section{World}
And a layout in layouts/default.tex.erb
\documentclass{article}
\title{<%= item[:title] %>}
\begin{document}
\maketitle
<%= yield %>
\end{document}
You can add this to your Rules
compile '/**/*.tex', rep: :pdf do
layout '/default.tex.erb'
filter :latexmk
write ext: 'pdf'
end
Results in:
Licence
See the UNLICENSE for details.
Author
Rien Maertens [email protected]
Changelog
See the CHANGELOG for details.