Create a custom inset for the listings package

Jürgen Spitzmüller spitz at lyx.org
Thu Mar 3 17:43:20 UTC 2022


Am Donnerstag, dem 03.03.2022 um 16:13 +0000 schrieb tush via lyx-
users:
> I want to create a custom inset for the listings package.
> 
> The LaTeX command for displayed code should be as follows:
> 
> \lstinline$code goes here$
> or
> \lstinline!code goes here!
> 
> ( Sometimes it is better to type the code inside $$ or !! instead of
> {} )
> 
> How can I tell lyx that ! or $ should be the command delimiters?

InsetLayout Flex:listing
    LyXType        custom
    LabelString    "lstlisting"
    LatexType      None
    Decoration     classic
    LeftDelim      \lstinline$
    RightDelim     $
    NeedProtect    0
End


HTH,
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220303/0a0a97c8/attachment.asc>


More information about the lyx-users mailing list