Skip to content

Commit

Permalink
[latex] Add single comments into the LaTeX styles.
Browse files Browse the repository at this point in the history
close #588

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Mar 5, 2017
1 parent 56f8251 commit 486fe19
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ protected void generate(Set<String> literals, Set<String> keywords, Set<String>

final String langName = getLanguageSimpleName().toUpperCase();
append(sty, "\\lstdefinelanguage'{'{0}'}{'%", langName); //$NON-NLS-1$
append(sty, " morecomment=[l]'{'//'}',"); //$NON-NLS-1$
append(sty, " morecomment=[s]'{'/*'}{'*/'}',"); //$NON-NLS-1$
append(sty, " morestring=[b]\","); //$NON-NLS-1$
append(sty, " morekeywords='{'{0}'}',", Joiner.on(",").join(texKeywords)); //$NON-NLS-1$ //$NON-NLS-2$
Expand Down
3 changes: 2 additions & 1 deletion formatting-styles/latex/sarl-beamer-listing.sty
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-beamer-listing}[2017/02/17]
\ProvidesPackage{sarl-beamer-listing}[2017/03/05]
\RequirePackage{algpseudocode}
\RequirePackage{listings}
\RequirePackage{xspace}
Expand All @@ -40,6 +40,7 @@
\colorlet{SARLkeyword}{SARLblue}
\colorlet{SARLidentifier}{SARLdarkgray}
\lstdefinelanguage{SARL}{%
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]",
morekeywords={abstract,agent,annotation,as,behavior,boolean,byte,capacity,case,catch,char,class,def,default,dispatch,do,double,else,enum,event,extends,extension,false,final,finally,fires,float,for,if,implements,import,instanceof,int,interface,it,long,native,new,null,occurrence,on,override,package,private,protected,public,requires,return,short,skill,space,static,strictfp,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,uses,val,var,void,volatile,while,with},
Expand Down
3 changes: 2 additions & 1 deletion formatting-styles/latex/sarl-colorized-listing.sty
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-colorized-listing}[2017/02/17]
\ProvidesPackage{sarl-colorized-listing}[2017/03/05]
\RequirePackage{algpseudocode}
\RequirePackage{listings}
\RequirePackage{xspace}
Expand All @@ -41,6 +41,7 @@
\colorlet{SARLkeyword}{SARLblue}
\colorlet{SARLidentifier}{SARLdarkgray}
\lstdefinelanguage{SARL}{%
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]",
morekeywords={abstract,agent,annotation,as,behavior,boolean,byte,capacity,case,catch,char,class,def,default,dispatch,do,double,else,enum,event,extends,extension,false,final,finally,fires,float,for,if,implements,import,instanceof,int,interface,it,long,native,new,null,occurrence,on,override,package,private,protected,public,requires,return,short,skill,space,static,strictfp,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,uses,val,var,void,volatile,while,with},
Expand Down
3 changes: 2 additions & 1 deletion formatting-styles/latex/sarl-listing.sty
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
% limitations under the License.
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{sarl-listing}[2017/02/17]
\ProvidesPackage{sarl-listing}[2017/03/05]
\RequirePackage{algpseudocode}
\RequirePackage{listings}
\RequirePackage{xspace}
\RequirePackage{relsize}
\lstdefinelanguage{SARL}{%
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]",
morekeywords={abstract,agent,annotation,as,behavior,boolean,byte,capacity,case,catch,char,class,def,default,dispatch,do,double,else,enum,event,extends,extension,false,final,finally,fires,float,for,if,implements,import,instanceof,int,interface,it,long,native,new,null,occurrence,on,override,package,private,protected,public,requires,return,short,skill,space,static,strictfp,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,uses,val,var,void,volatile,while,with},
Expand Down

0 comments on commit 486fe19

Please sign in to comment.