-
Notifications
You must be signed in to change notification settings - Fork 747
Description
Hi there,
I use pygments through the minted package to highlight source code in LaTeX, thank you very much for the project!
I am wonrdering if "f90" can be added as an alias to the Fortran lexer FortranLexer.
pygments/pygments/lexers/fortran.py
Lines 20 to 28 in 99f5bfa
| class FortranLexer(RegexLexer): | |
| """ | |
| Lexer for FORTRAN 90 code. | |
| .. versionadded:: 0.10 | |
| """ | |
| name = 'Fortran' | |
| aliases = ['fortran'] | |
| filenames = ['*.f03', '*.f90', '*.F03', '*.F90'] |
This request comes from my export of Emacs org-mode source code block to LaTeX minted environment.
In org-mode, the Fortran 90 or free-format Fortran source code block is specified by "f90", which is distinguished from "fortran" for the fixed format. Exporting to tex file and compiling will through out "Error: no lexer for alias 'f90' found".
In my opinion, it would not hurt to add "f90" as an alias for the free-format lexer since Fortran 90 is almost a synonym of free-format Fortran. In fact, I notice that the docstring says that it is for the "Fortran 90 code", so I tend to think "f90" is a straightforward alias.
Regards,
Minye