inline code and other formatting issues
Paul Rubin
parubin73 at gmail.com
Mon Feb 9 16:20:39 UTC 2026
On 2/8/26 22:00, Ross Boylan wrote:
> How do I tell LyX (2.3.6) that some inline text is code? In LaTeX it
> would be \lstinline`some code`, using the listings package, which I
> gather LyX does.
>
> There is an answer at https://wiki.lyx.org/Layouts/modules#toc4, but
> it includes a dead link.* A web search doesn't turn up the file,
> listings.module, anywhere else, or does it seem to be in the Debian
> packages in my (old) distribution (Debian 11/bullseye) I use. Other
> answers on the net refer to modules that I don't see.
>
> Perhaps it's already built in, but I don't see it mentioned in the
> documentation. In particular, I don't know how to indicate that some
> text should be in this mode.
>
> More generally, if I have a bunch of special types of text, in LaTeX
> I'd define a macro for each. What do I do in LyX?
>
> I realize I could just drop into raw LaTeX/ERB and give the commands
> as I would in regular LaTeX, but I am hoping there's something more
> elegant.
>
> Thanks.
>
> Ross Boylan
>
> *The link is to the Max Planck Institute and the author of the code is
> Laura Dietz. She is not listed in their current directory, and I
> presume all the links to her stuff on
> https://wiki.lyx.org/Layouts/modules are broken. She appears to have
> moved to the University of New Hampshire; I don't see the files there
> either.
>
I don't know about LyX 2.36, but in 2.4.4 you can select the text,
execute Insert > Program Listing, then right-click the listing, click
Settings... and check Inline listing.
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20260209/8ffc66e8/attachment-0001.htm>
More information about the lyx-users
mailing list