Joe,

When you open the Insert -> File -> Child Document -> Program Listing
there should be a window looking something like the enclosed, where you
can either type the path to the file (complete or relative as in this
example) or click the Browse button, find the file and double click it
after the path will appear there.

Please note the Caption, Label and the parameters.  If you enter
something on the right the left will show you "completions" and/or
choices. Color is mentioned in the LaTeX Listings manual.

greetings, el

On 2022-01-14 05:32 , Joseph Hesse via lyx-users wrote:
On 1/13/22 21:11, Herbert Voss wrote:
Joseph Hesse via lyx-users schrieb:
On 1/12/22 15:00, Herbert Voss via lyx-users wrote:
Use /Insert -> Program Listing/ option.

I tried what you suggested.  I right clicked on the inset and could
not find an option where I could specify where my code listing are
located.

What do you mean with "listing are located"?  If you do not define it
as a float it will appear at the place where you defined it.

Attached the screenshot of the output of the demo file.

Herbert
I am sorry that I did not state my problem more clearly.
Before even using lyx, I have program code in folders in my computer.
I want to have this code appear in my lyx document.  What I meant was
that when I use "Insert -> Program Listing" I do no see a way to
choose the folders on my computer to import these already written
programs into my lyx document.  The only option that gave me that
choice was "Insert -> File -> Child Document" and this seems to work
for me except for the color.
Thank you,
Joe
-- 
lyx-users mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to