latex-live-snippets: Automatically inline Haskell snippets into LaTeX documents.

[ bsd3, program, system ] [ Propose Tags ]

Please see the README on GitHub at

[Skip to Readme]
Versions [faq]
Change log
Dependencies base (>=4.7 && <5), directory, filepath, lens, MissingH [details]
License BSD-3-Clause
Copyright 2018 Sandy Maguire
Author Sandy Maguire
Category System
Home page
Bug tracker
Source repo head: git clone
Uploaded by isovector at 2018-07-11T14:24:28Z
Distributions NixOS:
Executables latex-live-snippets
Downloads 553 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
Last success reported on 2018-07-11 [all 3 reports]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for latex-live-snippets-

[back to package description]


Install with stack install, and then in latex via:

% set this to where your code is

\newcommand{\snip}[2]{\immediate\write18{latex-live-snippets \srcdir/#1.hs #2}\input{.latex-live-snippets/#1.#2.tex}}

Now, given a file Test.hs:

zoo :: Int
zoo = 5

test :: Bool -> Bool
test True = id $ True
test _    = True  -- ! 1

we can call


which will result in:

test :: Bool -> Bool
test True = id \$ True
test \_    = True \ann{1}

It will also find type families, data definitions. Custom snippet areas can be defined via comments of the form -- # name.