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 <http://pygments.org/> 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

Reply via email to