You can use extensions or display
helpers in IPython to make whatever syntax highlighting you\'d like on output cells.
For some special cell magics, like
To replace IPython.config.cell_magic_highlight
, you can use something like
import IPython
js = "IPython.CodeCell.config_defaults.highlight_modes['magic_fortran'] = {'reg':[/^%%fortran/]};"
IPython.core.display.display_javascript(js, raw=True)
so cells which begin with %%fortran
will be syntax-highlighted like FORTRAN. (However, they will still be evaluated as python if you do only this.)