Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Richard Heck

On 10/14/2010 01:19 PM, iustifico wrote:

Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?

Perhaps like in here: http://bit.ly/belSIj

It would be great if something like Input: and Output: were implemented...

   

LyX supports the listings package, so I'd look into that.

rh



Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 19:19, schrieb iustifico:


Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?


Yes, see chap. 7 Program Code Listings of the EmbeddedObjects manual 
that you find in LyX's help menu.


regards Uwe


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread iustifico
Thank you, that is exactly what I am looking for. I see, that it is also
possible to chose a language and lyx highlightens the keywords. That is
nice!

But I only want to write Pseudecode. Which of these available languages
suits for that?

Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Regards,
iustifico

2010/10/14 Uwe Stöhr uwesto...@web.de

 Am 14.10.2010 19:19, schrieb iustifico:


  Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?


 Yes, see chap. 7 Program Code Listings of the EmbeddedObjects manual that
 you find in LyX's help menu.

 regards Uwe



Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Paul Rubin
iustifico iustifico at gmail.com writes:

 Thank you, that is exactly what I am looking for. I see, that it is also
 possible to chose a language and lyx highlightens the keywords. That is nice!
 
 But I only want to write Pseudecode. Which of these available languages 
 suits for that?

It depends on whether you want keywords (such as if or for) highlighted
by a special font.  If no, then you can leave the language box at no language
selected.  If yes, you want to look for a language that considers the 
keywords in your pseudocode to be reserved words.  You might try Python or
maybe sh to start.  I typically use no language or else experiment.
 
 Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Go to the advanced tab of the listing settings dialog and put mathescape=true in
the right side pane.  You will need to enter the math in raw LaTeX, not using
the math editor.  A trick I use is to use the math editor to type the
math in a math inset, then copy it and paste it into the listings box.  (I
still have to supply the dollar signs myself.)

/Paul




Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 21:09, schrieb iustifico:


But I only want to write Pseudecode. Which of these available languages
suits for that?


This depend on the keywords that listings should recognize. Personally, 
I use Pascal for writing pseudocode.



Another question: Is it possible to write mathsymbols into this
environment? CMD-M (MacOSX) doesn't seem to work...


This is possible, see the attached LyX file:

- set the option
  mathescape = true
  for the listing
- create the formula outside of the listing
- copy the content of the formula (not the formula inset) to the
  clipboard via Ctrl-c
- in the listing write
  $$
  and paste between the dollar signs via Ctrl-v

I'll add this info to the manual for LyX 1.6.8.

regards Uwe


ListingsMath.lyx
Description: application/lyx


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Richard Heck

On 10/14/2010 01:19 PM, iustifico wrote:

Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?

Perhaps like in here: http://bit.ly/belSIj

It would be great if something like Input: and Output: were implemented...

   

LyX supports the listings package, so I'd look into that.

rh



Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 19:19, schrieb iustifico:


Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?


Yes, see chap. 7 Program Code Listings of the EmbeddedObjects manual 
that you find in LyX's help menu.


regards Uwe


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread iustifico
Thank you, that is exactly what I am looking for. I see, that it is also
possible to chose a language and lyx highlightens the keywords. That is
nice!

But I only want to write Pseudecode. Which of these available languages
suits for that?

Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Regards,
iustifico

2010/10/14 Uwe Stöhr uwesto...@web.de

 Am 14.10.2010 19:19, schrieb iustifico:


  Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?


 Yes, see chap. 7 Program Code Listings of the EmbeddedObjects manual that
 you find in LyX's help menu.

 regards Uwe



Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Paul Rubin
iustifico iustifico at gmail.com writes:

 Thank you, that is exactly what I am looking for. I see, that it is also
 possible to chose a language and lyx highlightens the keywords. That is nice!
 
 But I only want to write Pseudecode. Which of these available languages 
 suits for that?

It depends on whether you want keywords (such as if or for) highlighted
by a special font.  If no, then you can leave the language box at no language
selected.  If yes, you want to look for a language that considers the 
keywords in your pseudocode to be reserved words.  You might try Python or
maybe sh to start.  I typically use no language or else experiment.
 
 Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Go to the advanced tab of the listing settings dialog and put mathescape=true in
the right side pane.  You will need to enter the math in raw LaTeX, not using
the math editor.  A trick I use is to use the math editor to type the
math in a math inset, then copy it and paste it into the listings box.  (I
still have to supply the dollar signs myself.)

/Paul




Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 21:09, schrieb iustifico:


But I only want to write Pseudecode. Which of these available languages
suits for that?


This depend on the keywords that listings should recognize. Personally, 
I use Pascal for writing pseudocode.



Another question: Is it possible to write mathsymbols into this
environment? CMD-M (MacOSX) doesn't seem to work...


This is possible, see the attached LyX file:

- set the option
  mathescape = true
  for the listing
- create the formula outside of the listing
- copy the content of the formula (not the formula inset) to the
  clipboard via Ctrl-c
- in the listing write
  $$
  and paste between the dollar signs via Ctrl-v

I'll add this info to the manual for LyX 1.6.8.

regards Uwe


ListingsMath.lyx
Description: application/lyx


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Richard Heck

On 10/14/2010 01:19 PM, iustifico wrote:

Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?

Perhaps like in here: http://bit.ly/belSIj

It would be great if something like "Input:" and "Output:" were implemented...

   

LyX supports the listings package, so I'd look into that.

rh



Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 19:19, schrieb iustifico:


Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?


Yes, see chap. 7 "Program Code Listings" of the EmbeddedObjects manual 
that you find in LyX's help menu.


regards Uwe


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread iustifico
Thank you, that is exactly what I am looking for. I see, that it is also
possible to chose a language and lyx highlightens the keywords. That is
nice!

But I only want to write Pseudecode. Which of these available languages
suits for that?

Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Regards,
iustifico

2010/10/14 Uwe Stöhr 

> Am 14.10.2010 19:19, schrieb iustifico:
>
>
>  Is there a nice way to display Algorithms in Pseudocode-Algorithms in Lyx?
>>
>
> Yes, see chap. 7 "Program Code Listings" of the EmbeddedObjects manual that
> you find in LyX's help menu.
>
> regards Uwe
>


Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Paul Rubin
iustifico  gmail.com> writes:

> Thank you, that is exactly what I am looking for. I see, that it is also
> possible to chose a language and lyx highlightens the keywords. That is nice!
> 
> But I only want to write Pseudecode. Which of these available languages 
> suits for that?

It depends on whether you want "keywords" (such as "if" or "for") highlighted
by a special font.  If no, then you can leave the language box at "no language
selected".  If yes, you want to look for a language that considers the 
keywords in your pseudocode to be reserved words.  You might try Python or
maybe sh to start.  I typically use "no language" or else experiment.
> 
> Another question: Is it possible to write mathsymbols into this environment?
CMD-M (MacOSX) doesn't seem to work...

Go to the advanced tab of the listing settings dialog and put mathescape=true in
the right side pane.  You will need to enter the math in raw LaTeX, not using
the math editor.  A trick I use is to use the math editor to type the
math in a math inset, then copy it and paste it into the listings box.  (I
still have to supply the dollar signs myself.)

/Paul




Re: Display Pseudocode-Algorithms in Lyx

2010-10-14 Thread Uwe Stöhr

Am 14.10.2010 21:09, schrieb iustifico:


But I only want to write Pseudecode. Which of these available languages
suits for that?


This depend on the keywords that listings should recognize. Personally, 
I use Pascal for writing pseudocode.



Another question: Is it possible to write mathsymbols into this
environment? CMD-M (MacOSX) doesn't seem to work...


This is possible, see the attached LyX file:

- set the option
  mathescape = true
  for the listing
- create the formula outside of the listing
- copy the content of the formula (not the formula inset) to the
  clipboard via Ctrl-c
- in the listing write
  $$
  and paste between the dollar signs via Ctrl-v

I'll add this info to the manual for LyX 1.6.8.

regards Uwe


ListingsMath.lyx
Description: application/lyx