Popularity
6.2
Declining
Activity
0.0
Stable
17
4
1
Monthly Downloads: 1
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
System
Latest version: v0.1.0.0
latex-live-snippets alternatives and similar packages
Based on the "System" category.
Alternatively, view latex-live-snippets alternatives based on common mentions on social networks and blogs.
-
ghc-hotswap
DISCONTINUED. Example code for how we swap compiled code within a running Haskell process. -
plugins
Dynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution. -
language-puppet
A library to work with Puppet manifests, test them and eventually replace everything ruby. -
ascii-progress
A simple Haskell progress bar for the console. Heavily borrows from TJ Holowaychuk's Node.JS project
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
Promo
influxdata.com

Do you think we are missing an alternative of latex-live-snippets or a related project?
README
latex-live-snippets
Install with stack install
, and then in latex via:
% set this to where your code is
\newcommand{\srcdir}{.}
\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
\snip{Test}{test}
which will result in:
\begin{code}
test :: Bool -> Bool
test True = id $ True
test _ = True !\annotate{1}!
\end{code}
It will also find type families, data definitions. Custom snippet areas can be
defined via comments of the form -- # name
.
latex-live-snippets-ghci
Put the following on your path as latex-live-snippets-run-ghci
#!/usr/bin/bash
response=$(mktemp /tmp/ghci-latex.XXXXXXXXXXX)
echo ":l $1" | cat - $2 | stack exec ghci > $response
latex-live-snippets-ghci $2 $response $3
and install in latex via
\usepackage{fancyvrb}
\makeatletter
\newcommand*\ifcounter[1]{%
\ifcsname c@#1\endcsname
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
}
\makeatother
\newcommand{\doreplparam}{}
\newcommand{\doreplfile}{}
\newenvironment{dorepl}[1]{\VerbatimEnvironment
\renewcommand{\doreplparam}{#1}
\renewcommand{\doreplfile}{\doreplparam-\arabic{\doreplparam}}
\ifcounter{\doreplparam}{}{\newcounter{\doreplparam}}
\begin{VerbatimOut}{/tmp/\doreplfile.aux}}{\end{VerbatimOut}
\immediate\write18{latex-live-snippets-run-ghci \srcdir/\doreplparam.hs /tmp/\doreplfile.aux \doreplfile}
\input{.latex-live-snippets/repl/\doreplfile.tex}
\stepcounter{\doreplparam}
}
Now you can run repl sessions:
\begin{dorepl}{Test}
:set -XDataKinds
:t zoo
take 3 $ iterate not False
\end{dorepl}
results in
\begin{repl}
\ghcisilent{:set -XDataKinds}
\ghci{:t zoo}{zoo :: Int}
\ghci{take 3 $ iterate not False}{[False,True,False]]}
\end{repl}