CTAN Comprehensive TeX Archive Network

Verzeichnis macros/latex/contrib/lstbayes

README.md

Listings language drivers for BUGS, JAGS, and Stan

CTAN CTAN license

Adds support for the following languages to the listings package, which pretty-prints source code:

Usage

To use, load the package

\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 model,

\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 for more on how to use the listings package.

Issues

Development occurs on github at https://github.com/jrnold/lstbayes.

Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (273.4k).

lstbayes – Listings language driver for Bayesian modeling languages

The package provides language drivers for the listings package for several languages not included in that package: BUGS, JAGS, and Stan.

Paketlstbayes
Version 2018-07-06
LizenzenThe Project Public License 1.3
Copyright2015–2018 Jeffrey B. Arnold
BetreuerJeffrey B. Arnold
Enthalten inTeX Live als lstbayes
MiKTeX als lstbayes
ThemenListings
...
Gästebuch Seiten-Struktur Impressum Autor kontaktieren