Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

ibogi schrieb:


I want to use syntax highlighting for a program language which is not
supported by lyx (there is no entry in the program listing setting dialog).
I would be grateful if someone could tell me how can I define my own
language which I can use in program listings with syntax highlight.


What's the name of the language? When your programming language is really missing, read the listings 
manual:

http://www.ctan.org/tex-archive/help/Catalogue/entries/listings.html
In section 3 it is described how to define a language and how to set up the 
syntax highlighting.

regards Uwe


Re: Custom Syntax Highlight

2009-09-11 Thread Guenter Milde
On 2009-09-11, ibogi wrote:

 I want to use syntax highlighting for a program language which is not
 supported by lyx (there is no entry in the program listing setting dialog).
 I would be grateful if someone could tell me how can I define my own
 language which I can use in program listings with syntax highlight.

As LyX uses the listings package for this, you will have to read and
understand the listings.pdf guide (try `texdoc listings`).

Günter



Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

Ivica B schrieb:


I read that manual, but I do not see how it fits into solving my
problem. I can add as custom TEX code:
\lstdefinelanguage{isdl}
{morekeywords={instruction,operand,global,underlying-array,memory,bit,register},
sensitive=false,
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b],
}

somewhere in the LYX file, but when I want to enter program listing
using isdl as a language, I can not select it.


You want to select it in the LyX listings dialog? This is not possible because LyX can only support 
things that are directly supported by the LaTeX-packages.



What would be the solution here, to enter it again as a TEX source.


Yes.

regards Uwe


Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

ibogi schrieb:


I want to use syntax highlighting for a program language which is not
supported by lyx (there is no entry in the program listing setting dialog).
I would be grateful if someone could tell me how can I define my own
language which I can use in program listings with syntax highlight.


What's the name of the language? When your programming language is really missing, read the listings 
manual:

http://www.ctan.org/tex-archive/help/Catalogue/entries/listings.html
In section 3 it is described how to define a language and how to set up the 
syntax highlighting.

regards Uwe


Re: Custom Syntax Highlight

2009-09-11 Thread Guenter Milde
On 2009-09-11, ibogi wrote:

 I want to use syntax highlighting for a program language which is not
 supported by lyx (there is no entry in the program listing setting dialog).
 I would be grateful if someone could tell me how can I define my own
 language which I can use in program listings with syntax highlight.

As LyX uses the listings package for this, you will have to read and
understand the listings.pdf guide (try `texdoc listings`).

Günter



Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

Ivica B schrieb:


I read that manual, but I do not see how it fits into solving my
problem. I can add as custom TEX code:
\lstdefinelanguage{isdl}
{morekeywords={instruction,operand,global,underlying-array,memory,bit,register},
sensitive=false,
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b],
}

somewhere in the LYX file, but when I want to enter program listing
using isdl as a language, I can not select it.


You want to select it in the LyX listings dialog? This is not possible because LyX can only support 
things that are directly supported by the LaTeX-packages.



What would be the solution here, to enter it again as a TEX source.


Yes.

regards Uwe


Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

ibogi schrieb:


I want to use syntax highlighting for a program language which is not
supported by lyx (there is no entry in the program listing setting dialog).
I would be grateful if someone could tell me how can I define my own
language which I can use in program listings with syntax highlight.


What's the name of the language? When your programming language is really missing, read the listings 
manual:

http://www.ctan.org/tex-archive/help/Catalogue/entries/listings.html
In section 3 it is described how to define a language and how to set up the 
syntax highlighting.

regards Uwe


Re: Custom Syntax Highlight

2009-09-11 Thread Guenter Milde
On 2009-09-11, ibogi wrote:

> I want to use syntax highlighting for a program language which is not
> supported by lyx (there is no entry in the program listing setting dialog).
> I would be grateful if someone could tell me how can I define my own
> language which I can use in program listings with syntax highlight.

As LyX uses the "listings" package for this, you will have to read and
understand the listings.pdf guide (try `texdoc listings`).

Günter



Re: Custom Syntax Highlight

2009-09-11 Thread Uwe Stöhr

Ivica B schrieb:


I read that manual, but I do not see how it fits into solving my
problem. I can add as custom TEX code:
\lstdefinelanguage{isdl}
{morekeywords={instruction,operand,global,underlying-array,memory,bit,register},
sensitive=false,
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]",
}

somewhere in the LYX file, but when I want to enter program listing
using isdl as a language, I can not select it.


You want to select it in the LyX listings dialog? This is not possible because LyX can only support 
things that are directly supported by the LaTeX-packages.



What would be the solution here, to enter it again as a TEX source.


Yes.

regards Uwe