I am trying to explain a program code step-by-step, but I would like to show what we have atm in each example, without retyping.



export A=2

We have
\( A =2 \)

export B=2

And we have now
\( A = 2 \)
\( B = 2 \)


Is there an environment, which stores these? Or is there a better style in doing this, while still showing all variables already declared?

  • How about you check this. You can escape some text in listings environment. – M. Al Jumaily Aug 28 '19 at 21:23
  • This is technically very nice, but doesn't solve my problem, as the real code uses lstinputlistings and is written by somebody else – 927589452 Aug 28 '19 at 22:02
  • Alright, how about this? – M. Al Jumaily Aug 28 '19 at 22:15
  • Not really, I should pobably remove the listings tag, as the problem is more with the example-pseudoenvironment – 927589452 Aug 29 '19 at 7:36

Your Answer

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

Browse other questions tagged or ask your own question.