Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literate Pecan #18

Open
ReedOei opened this issue Dec 8, 2019 · 0 comments
Open

Literate Pecan #18

ReedOei opened this issue Dec 8, 2019 · 0 comments

Comments

@ReedOei
Copy link
Owner

ReedOei commented Dec 8, 2019

It would be very cool if we could write a Latex file, and then just automatically run that file with Pecan. Code would be detected as lstlistings with language=pecan set, like the following:


\begin{lstlisting}[language=pecan, basicstyle=\small\ttfamily, mathescape=true, frame=single]
n, m, a, b, c are nat
purchashable(n) := n is nat $\color{red} \wedge$ $\exists$a. $\exists$b. $\exists$c. n =$\ $6*a $\color{red} +$ 9*b $\color{red} +$ 20*c
non_purchasable(n) := n is nat $\color{red} \wedge$ $\color{red} \neg$purchashable(n)
\end{lstlisting}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant