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

Fix fortran77 #2728

Merged
merged 2 commits into from Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions chapters/functions.tex
Expand Up @@ -1859,7 +1859,7 @@ \subsubsection{Arrays}\label{arrays-1}
\end{lstlisting}
the default assumptions correspond to a FORTRAN~77 function
defined as follows:
\begin{lstlisting}[language=fortran77]
\begin{lstlisting}[language=FORTRAN77]
FUNCTION foo(a, d1, d2, d3)
DOUBLE PRECISION(d1, d2, d3) a
INTEGER d1
Expand Down Expand Up @@ -1891,7 +1891,7 @@ \subsubsection{Arrays}\label{arrays-1}
end foo;
\end{lstlisting}
The corresponding FORTRAN~77 subroutine would be declared as follows:
\begin{lstlisting}[language=fortran77]
\begin{lstlisting}[language=FORTRAN77]
SUBROUTINE myfoo(x, y, n, m, u1, i, u2)
DOUBLE PRECISION(n) x
DOUBLE PRECISION(n,m) y
Expand Down
9 changes: 5 additions & 4 deletions mlsshared.sty
Expand Up @@ -56,6 +56,7 @@
terminal,noEvent,smooth,sample,pre,edge,change,reinit,%
previous,hold,subSample,superSample,shiftSample,backSample,noClock,firstTick,interval,%
Real,Integer,Boolean,String},%
sensitive=true, % just in case
comment=[l]{//}, % comment lines
morecomment=[s]{/*}{*/}, % comment blocs
morestring=[b]{'},
Expand Down Expand Up @@ -92,8 +93,8 @@
morekeywords=[1]{|}
}[keywords,comments,strings]

% Duplicate this definition here to avoid issue - and name it "fortran77" to avoid problem in LatexML
\lstdefinelanguage{fortran77}{%
% Duplicate this definition here to avoid issue
\lstdefinelanguage{FORTRAN77}{%
basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code
morekeywords={%
ASSIGN,BACKSPACE,CALL,CHARACTER,%
Expand All @@ -114,7 +115,7 @@
LOG10,SIN,COS,TAN,ASIN,ACOS,ATAN,ATAN2,SINH,COSH,TANH,LGE,LLE,LLT,%
LEN,INDEX},
morekeywords=[4]{AND,EQ,EQV,FALSE,GE,GT,OR,LE,LT,NE,NEQV,NOT,TRUE},%
sensitive=f, % not Fortran-77 standard, but allowed in Fortran-95 %%
sensitive=true,
morecomment=[f]*,
morecomment=[f]C,
morecomment=[f]c,
Expand All @@ -130,7 +131,7 @@
short,signed,sizeof,static,struct,switch,typedef,union,unsigned,%
void,volatile,while},
% henrikt-ma: How about adding some highlighting of 'size_t' as a recognized name?
sensitive,
sensitive=true,
morecomment=[s]{/*}{*/},
morecomment=[l]//, % nonstandard
morestring=[b]",
Expand Down