Re: Program Listing -- programming language, etc.

2019-02-11 Thread Paul A. Rubin

On 2/11/19 8:44 AM, Bernt Lie wrote:


I use LyX 2.3.1-1 on Windows 10. Two questions related to LyX and 
inserted Program Listing:


In the Settings, I can choose Language:

  * If I make my own definition for syntax highlighting of a
programming language (say, Julia or Modelica), where in the
directory tree to I put that definition so that it shows up in the
pull-down menu of “Language”?
  * If I want to insert a link to a file instead of the code itself in
the Program Listing window, how do I do that?

Any hints are welcome, e.g., which help manual to look into, etc.

-B

The program listings feature uses a LaTeX package (listings by default, 
minted if you so choose) to handle the syntax highlighting. If you are 
using listings, the manual gives information on how to add your own 
language style (and where to store it). If you switch to minted (which 
requires the Python package Pygments and maybe some other software), I 
think you can also create your own definition ... but Pygments 
 supports both Julia and Modelica (among some 300 
languages).


I have no idea if it's possible to link to an external document inside a 
program listing inset. I suspect not.


Paul



Program Listing -- programming language, etc.

2019-02-11 Thread Bernt Lie
I use LyX 2.3.1-1 on Windows 10. Two questions related to LyX and inserted 
Program Listing:

In the Settings, I can choose Language:
[cid:image002.jpg@01D4C218.4CF8E290]


  *   If I make my own definition for syntax highlighting of a programming 
language (say, Julia or Modelica), where in the directory tree to I put that 
definition so that it shows up in the pull-down menu of "Language"?
  *   If I want to insert a link to a file instead of the code itself in the 
Program Listing window, how do I do that?

Any hints are welcome, e.g., which help manual to look into, etc.

-B