ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Difference between "definetextbackground" and "definefreamedtext"
@ 2026-02-25  7:18 Jeong Dal via ntg-context
  2026-02-25  8:55 ` [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext" Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dal via ntg-context @ 2026-02-25  7:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dal


[-- Attachment #1.1: Type: text/plain, Size: 1000 bytes --]

Hi, 

In the following code, the output of \starttextbackground and the output of \startframedtext are same.
Is there any differences between them?
Or
Are the purposes of two command different?

Thanks for reading.

Best regards,

Dalyoung

\startuseMPgraphic{mp:leftBar}
begingroup;
  path p ;
  for i = 1 upto nofmultipars :
    p := (ulcorner multipars[i]) -- (llcorner multipars[i]); 
    draw p withcolor boxfillcolor withpen pencircle scaled 2pt;
  endfor;
endgroup;
\stopuseMPgraphic

\definetextbackground
  [leftBarFrame]
  [ mp=mp:leftBar,
    location=paragraph,
    background=color,
    backgroundcolor=darkred,
    leftoffset=1ex
  ]
  \defineframedtext[LeftBar]
  [width=\textwidth,
  frame=off,
  leftframe=on,
  framecolor=darkred,
  rulethickness=2pt,
  offset=0pt,
  loffset=4pt,
  roffset=4pt,
  ]

\starttext

  \startleftBarFrame
  \input tufte
  \stopleftBarFrame

  \startLeftBar
  \input tufte
  \stopLeftBar

\stoptext


[-- Attachment #1.2: Type: text/html, Size: 5404 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext"
  2026-02-25  7:18 [NTG-context] Difference between "definetextbackground" and "definefreamedtext" Jeong Dal via ntg-context
@ 2026-02-25  8:55 ` Pablo Rodriguez via ntg-context
  2026-02-25 12:02   ` Jeong Dal via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2026-02-25  8:55 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/25/26 08:18, Jeong Dal via ntg-context wrote:
> Hi, 
> 
> In the following code, the output of \starttextbackground and the output
> of \startframedtext are same.
> Is there any differences between them?

Hi Dalyoung,

a non-minor difference is that text backgrounds may contain page breaks,
but frames cannot.

You may see that when you add to your sample:

  \setuppapersize[A7, landscape]

> Or
> Are the purposes of two command different?

I think that comparing options between `\setuptextbackground` and
`\setupframed` you may see differences.

But probably the main difference (according to my impression) is that
text backgrounds may have a frame, but they are mainly texts.

Framed texts are mainly frames that contain a text and they are subject
to the boundaries of frames (such as they cannot be splitted in pages).

Just in case it might help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext"
  2026-02-25  8:55 ` [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext" Pablo Rodriguez via ntg-context
@ 2026-02-25 12:02   ` Jeong Dal via ntg-context
  2026-02-25 13:13     ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dal via ntg-context @ 2026-02-25 12:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dal

Dear Pablo,

Thank you for your explanations.


> You may see that when you add to your sample:
> 
>  \setuppapersize[A7, landscape]
> 
It shows the difference clearly.


> 
> But probably the main difference (according to my impression) is that
> text backgrounds may have a frame, but they are mainly texts.
> 
> Framed texts are mainly frames that contain a text and they are subject
> to the boundaries of frames (such as they cannot be splitted in pages).

In short, which is main thing among text and  frame.

Thanks again.

Best regards,

Dalyoung


>> Or
>> Are the purposes of two command different?
> 
> I think that comparing options between `\setuptextbackground` and
> `\setupframed` you may see differences.
> 
> Just in case it might help,
> 
> Pablo
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext"
  2026-02-25 12:02   ` Jeong Dal via ntg-context
@ 2026-02-25 13:13     ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2026-02-25 13:13 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/25/26 13:02, Jeong Dal via ntg-context wrote:
> […]
> In short, which is main thing among text and frame.

Well, as far as I can understand, frames may be the ConTeXt name for TeX
boxes.

They are explained in chapter 5 from “TeX by Topic”
(https://texdoc.org/serve/TeXbyTopic.pdf/0#nameddest=chapter.5), pages
51ff from “TeX for the Impatient”
(https://tug.ctan.org/info/impatient/book.pdf#page=71) and chapter 11
from “The TeXbook” (source available at https://ctan.org/pkg/texbook
[the file shouldn’t be compiled, it is only offered as a sample for
study]; chapter begins with `\beginchapter Chapter 11. Boxes`).

That being said, text is directly modifiable as such, but frames are
like containers: you may modify frames directly, but their contents are
modifiable only inside the frames themselves.

In a certain way, frames are direct page elements, such as texts, but
frame contents are only indirect page elements (only through their
containers).

Sorry, this is probably a poor (and I hope not totally wrong)
explanation. But this is the best I can do now.

If you have uses or needs in mind, please elaborate them and that way it
might be easier to explain.

I hope it might help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-25 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25  7:18 [NTG-context] Difference between "definetextbackground" and "definefreamedtext" Jeong Dal via ntg-context
2026-02-25  8:55 ` [NTG-context] Re: Difference between "definetextbackground" and "defineframedtext" Pablo Rodriguez via ntg-context
2026-02-25 12:02   ` Jeong Dal via ntg-context
2026-02-25 13:13     ` Pablo Rodriguez via ntg-context

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).