I enjoy highlighting my Python code with minted. However I now would like to do the same with my Magma code (Magma is a commercial computer algebra system of broadly similar scope as GAP).

However minted does not recognise Magma out-of-the-box and so I am enquiring if anyone has written the relevant lexer (I think that is the name of what is required.)

Google provides nothing relevant in response to my trying a few keyword combinations.

Any advice, information or alternatives gratefully received.

  • According to the documentation minted is not supported, but you can use listings instead. – DG' Nov 15 '18 at 7:18
  • 2
    magma is not listed by pygments but if you find a similar language and know some python, modifying the lexer may not be so hard, you can specify custom lexers to pygmentize via minted. – David Carlisle Nov 15 '18 at 7:53
  • 2
    The last line of the documentation @DG' posted states "Syntax highlighting for pygments and Sphinx is in preparation." Maybe; if you nudge them a little, they'll finish it. – thymaro Nov 17 '18 at 6:54
  • Thanks everyone for your suggestions; I will try them and see which works best. – Gordon Royle Nov 19 '18 at 1:53

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.