ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: "Давыдов, Кирилл Александрович" <davidov_ka@edu.surgu.ru>,
	"mailing list for ConTeXt users" <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: Vanishing floats with location=split and \start ... \stopsplittext within
Date: Tue, 4 Jun 2024 18:22:41 +0200	[thread overview]
Message-ID: <d76db46d-6562-4b1a-abb0-9edeca3d3624@freedom.nl> (raw)
In-Reply-To: <CANCDDAoyhYZhokdiM29HhOtakcECYrf6JO9f0jMqSWESZGMj0g@mail.gmail.com>

On 6/4/2024 3:57 PM, Давыдов, Кирилл Александрович wrote:
> Greetings,
> 
> I have run into an issue whilst using \start ... \stopsplittext. I 
> intended to use it for large code listings (using the t-vim module), 
> however floats with location=split using that environment seem to vanish 
> if there is nearly not enough text before the float to fill a page. Not 
> only that, a second float like that seems to lead to fatal errors 
> related to an unclosed group, however the document compiles regardless. 
> The following MWE is an example of this. I am using ConTeXt version 
> 2024.05.27 18:16.
> 
> \definefloat[codelisting][codelistings]
> \setupcaption[codelisting][location=top]
> \setuplabeltext[english][codelisting=Listing ]
> 
> %\showboxes
> \starttext
> 
> \input knuth
> \input knuth
> \input knuth
> \input knuth
> % Filler. Filler. Filler. Filler. % uncomment to push out a full page. 
> the float will appear
> 
> \startplacecodelisting[
>      title=My great C program on display!,
>      location=split,
> ]
> \startsplittext
> \tt \input zapf
> \stopsplittext
> \stopplacecodelisting
> 
> \input ward
> 
> \startplacecodelisting[
>      title=My second great C program on display!,
>      location=split,
> ]
> \startsplittext
> \tt \input ward
> \stopsplittext
> 
> \stoptext
> 
> On a related note, one can also observe that with specific amounts of 
> text a float may end up being split in two on a single page, however I 
> could not replicate it. Additionally, code listings done with t-vim's 
> commands seem to lose line numbering within \start ... \stopsplittext in 
> splittable floats, but I figure that's more on the module authors. In 
> any case, is there more I can do other than not use floats for code 
> listings?
best add a missing \stopplacecodelisting

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-06-04 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 13:57 [NTG-context] " Давыдов, Кирилл Александрович
2024-06-04 16:22 ` Hans Hagen via ntg-context [this message]
2024-06-04 18:44   ` [NTG-context] " Kirill Davidov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d76db46d-6562-4b1a-abb0-9edeca3d3624@freedom.nl \
    --to=ntg-context@ntg.nl \
    --cc=davidov_ka@edu.surgu.ru \
    --cc=j.hagen@freedom.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).