Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add f90 alias to the Fortran lexer #2000

minyez opened this issue Dec 27, 2021 · 1 comment

Add f90 alias to the Fortran lexer #2000

minyez opened this issue Dec 27, 2021 · 1 comment


Copy link

minyez commented Dec 27, 2021

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.

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.


@Anteru Anteru closed this as completed in a8dcc0a Dec 29, 2021
@Anteru Anteru added this to the 2.11.0 milestone Dec 29, 2021
Copy link

Anteru commented Dec 29, 2021


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants