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

[ bsd3, program, system ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
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:
Reverse Dependencies 1 direct, 0 indirect [details]
Executables latex-live-snippets
Downloads 790 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2018-07-11 [all 3 reports]

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.