listings interrupted by figure in pdf output
Herbert Voss
Herbert.Voss at fu-berlin.de
Mon May 22 13:56:31 UTC 2023
Am 22.05.23 um 15:47 schrieb Wolfgang Engelmann:
>
>
> Am 22.05.23 um 15:26 schrieb Herbert Voss:
>>
>>
>> Am 22.05.23 um 14:22 schrieb Wolfgang Engelmann:
>>> How can one avoid the interruption of a listing (used instead of an
>>> algorithm, because of its length) by a figure in the pdf output of a
>>> koma script book?
>> Wolfgang,
>>
>> enable the option "float" (Gleitobjekt) in the listings menue.
>> or put the listing into a minipage. However, this can lead to a lot
>> of whitespace on one page.
>>
>> Herbert
>
> Thanks, Herbert.
>
> However, I could not find a listings menue, where I could enable the
> float option.
put the cursor into the listings and then Edit->Listings
>
> If I put the listing in a box (minipage), it is uninterrupted, but
> runs over the normal end of the page. The reason we used listings was,
> that it can be interrupted if to long at the end of the page and
> continued at the next page.
then use package placeins and the command \FloatBarrier after the listing.
A LaTeX example for \FloatBarrier:
https://tex.stackexchange.com/questions/19766/how-to-control-the-position-of-floating-images
Herbert
More information about the lyx-users
mailing list