Warnings when using Listings in a RTL document

Jürgen Spitzmüller jspitzm at gmail.com
Sun Apr 2 11:21:00 UTC 2023


Am Mittwoch, dem 22.03.2023 um 23:21 +0000 schrieb Udicoudco:
> > > I attached a possible patch, it only fix the lstlisting case when
> > > polyglossia is used, since babel-hebrew does not have an
> > > equivalent
> > > to \begin{RTL}...\end{RTL} (or there is one?) and babel with
> > > luatex
> > > does not need this kind of wrappers.
> > I've added line breaks to the LaTeX code for
> > readability.
> 
> I've forgot to test if we use polyglossia at the closing point
> of the inset. Attached a new patch

Thanks. A couple of issues:

* It should be the LTR environment, not RTL, right?

* I don't like the hardcoding of insets. Basically, this is needed will
all "display" insets, right? And it will break with "inline" listings
(\lstinline), which shouldn't go on an own line

I in order to properly support that we need to introduce an
Inset(Layout) tag that indicates whether an inset starts a new
paragraph in the output (we have a half-implemented isDisplay() member
in InsetLayout, but IIRC this has a different semantics, only referring
to whether it stands on a new line in the code)

This needs some effort. For the time being, I think we will be better
off with this rather harmless info message.

-- 
Jürgen


More information about the lyx-devel mailing list