This recent question on chemistry.se includes a snippet of Fortran. Contrasting to anticipation, the addition of fortran
after the initial three grave accents does not enable the syntax highlighting (do
and end do
would qualify as keywords here):
h_core = e1ints
do q =1,norb
do p =1,q
h_core(p,q) = h_core(q,p) !lower triangular to symmetric
end do
end do
Following the discussion here, an explicit example how it is supposed to be used, and a check that Fortran per se is considered by highlight.js here, I notice currently none of the following approaches work on chemistry.se.
do i = 1, 5 ! backticks & fortran
write (*,*) i
end do
do i = 1, 5 ! backticks & f90
write (*,*) i
end do
do i = 1, 5 ! backticks & f95
write (*,*) i
end do
On the contrary, python
for Python works on the get-go:
for i in range(4):
print(i)
if i >= 2:
print("i .ge. 2")
Question/suggest: may there be (again?) support for syntax highlighting Fortran? Copy-paste of the three Fortran loops e.g., into the standard question box on mattermodelling.se promptly highlights all relevant keywords. Or, is there policy specific to chemistry.se to constrain highlight.js' action to general purpose language Python only?