summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lstbayes/README.md
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-29 22:08:57 +0000
committerKarl Berry <karl@freefriends.org>2015-09-29 22:08:57 +0000
commit6c088673b9f7d4b0e3b186b850d4fd6ba9997326 (patch)
tree3c86550ea260098612b6ca6f6f0250664a606716 /Master/texmf-dist/doc/latex/lstbayes/README.md
parent982ab23fae158d0e4ca19de74a6fa98928334007 (diff)
lstbayes (29sep15)
git-svn-id: svn://tug.org/texlive/trunk@38498 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/lstbayes/README.md')
-rw-r--r--Master/texmf-dist/doc/latex/lstbayes/README.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lstbayes/README.md b/Master/texmf-dist/doc/latex/lstbayes/README.md
new file mode 100644
index 00000000000..9f076be4c5c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/lstbayes/README.md
@@ -0,0 +1,54 @@
+# Listings language drivers for BUGS, JAGS, and Stan
+
+[![CTAN](https://img.shields.io/ctan/v/lstbayes.svg)](https://www.ctan.org/pkg/lstbayes)
+[![CTAN license](https://img.shields.io/ctan/l/lstbayes.svg)](https://www.ctan.org/pkg/lstbayes)
+
+Adds support for the following languages to the LaTeX
+[listings](http://www.ctan.org/tex-archive/macros/latex/contrib/listings/)
+package, which pretty-prints source code:
+
+- [BUGS](http://www.openbugs.net)
+- [JAGS](http://mcmc-jags.sourceforge.net/)
+- [Stan](http://mc-stan.org/)
+
+# Usage
+
+To use, load the package
+```latex
+\usepackage{lstbayes}
+```
+Then use `BUGS`, `JAGS` or `Stan` as a language in one of the listings environments or commands. For example, to format the Stan [Eight schools](https://raw.githubusercontent.com/wiki/stan-dev/rstan/8schools.stan) model,
+```latex
+\begin{lstlisting}[language=Stan]
+data {
+ int<lower=0> J; // number of schools
+ real y[J]; // estimated treatment effects
+ real<lower=0> sigma[J]; // s.e. of effect estimates
+}
+parameters {
+ real mu;
+ real<lower=0> tau;
+ real eta[J];
+}
+transformed parameters {
+ real theta[J];
+ for (j in 1:J)
+ theta[j] <- mu + tau * eta[j];
+}
+model {
+ eta ~ normal(0, 1);
+ y ~ normal(theta, sigma);
+}
+\end{lstlisting}
+```
+
+Also see the examples in `examples.tex` and `examples.pdf` files included in this repository.
+See the `listings` [documentation](https://www.ctan.org/tex-archive/macros/latex/contrib/listings/?la) for more on how to use the `listings` package.
+
+# Issues
+
+Development occurs on github at <https://github.com/jrnold/lstbayes>.
+
+
+<!-- LocalWords: lstbayes tex usepackage lstlisting pdf
+ -->