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
    I'm having trouble understanding your question. Your picture doesn't have any blank lines. Or are you talking about some vertical spacing before and after the environment? – Teepeemm Feb 13 '18 at 20:22
  • @Teepeemm thanks for noticing, I changed the code to look as it was supposed to. – Kyriakos Kats Feb 13 '18 at 20:32
  • Don't use $$...$$ – user36296 Feb 13 '18 at 22:22
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.