Popularity
6.4
Growing
Activity
0.0
Stable
17
4
1
Monthly Downloads: 3
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.
-
taffybar
A gtk based status bar for tiling window managers such as XMonad -
nix-deploy
Deploy software or an entire NixOS system configuration to another NixOS system -
ghc-hotswap
Example code for how we swap compiled code within a running Haskell process. -
optparse-generic
Auto-generate a command-line parser for your datatype -
hapistrano
Deploy tool for Haskell applications, like Capistrano for Rails -
directory
Platform-independent library for basic file system operations -
typed-process
Alternative API for processes, featuring more type safety -
pid1
Do signal handling and orphan reaping for Unix PID1 init processes -
hnix-store-core
Haskell implementation of the nix store API -
clock
High-resolution clock functions: monotonic, realtime, cputime. -
hail
A service for pull-based continuous deployment based on hydra. -
system-fileio
Contains the system-filepath and system-fileio packages -
language-puppet
A library to work with Puppet manifests, test them and eventually replace everything ruby. -
openssh-github-keys
Control SSH access to your servers via GitHub teams -
plugins
Dynamic linking and runtime evaluation of Haskell, and C, including dependency chasing and package resolution. -
ascii-progress
A simple Haskell progress bar for the console. Heavily borrows from TJ Holowaychuk's Node.JS project -
optparse-declarative
Declarative command-line option parser -
directory-contents
Recursively build a tree of directory contents, avoiding symlink cycles -
halfs
The Haskell File System: A file system implementation in Haskell -
executable-hash
Provides the SHA1 hash of the program executable -
HPi
Library to access the GPIO pins on a Raspberry Pi from Haskell.
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.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 [email protected]#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}