0

How can I create an environment that does the above? I want to be as close to Isabelle as possible(see picture). My best alternative is to define an environment as in the answer to my other question and insert $ $around every math character I use. Another big drawback of this solution is that in a block of text the first line is not alligned with the rest (like a paragraph in text mode in latex). Ideally I would like to be able to leave some blank space from the text before and after it (like $$ $$ does) but also be able to text formatted this way inline (like $$ does). See the picture for the kind of result I want.

1 Answers1

1

As already said for your previous question, if you want to include code, a math environment might not be the best choice. I suggest the listings package instead. The appearance can be customised in many ways (syntax highlighting etc., see the documentation for details), but the basic usage would be like this:

\documentclass{article}
\usepackage{listings}

\begin{document}

\begin{lstlisting}[basicstyle=\ttfamily,mathescape]
lemma inf_lim_larger_real:
    fixes M :: real and h :: "real $\Rightarrow$ real"
\end{lstlisting}    

\end{document}

enter image description here