https://github.com/rien/nanoc-latexmk
Latexmk filter for Nanoc
https://github.com/rien/nanoc-latexmk
Last synced: about 1 year ago
JSON representation
Latexmk filter for Nanoc
- Host: GitHub
- URL: https://github.com/rien/nanoc-latexmk
- Owner: rien
- License: unlicense
- Created: 2017-12-23T18:19:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T09:08:45.000Z (almost 6 years ago)
- Last Synced: 2025-04-14T22:53:52.085Z (about 1 year ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Nanoc-latexmk
[](https://badge.fury.io/rb/nanoc-latexmk)
[Nanoc](https://nanoc.ws/) 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](https://github.com/rien/nanoc-latexmk/blob/master/LICENSE) for details.
## Author
Rien Maertens [maertensrien@gmail.com](mailto:maertensrien@gmail.com)
## Changelog
See the [CHANGELOG](https://github.com/rien/nanoc-latexmk/blob/master/CHANGELOG.md) for details.