ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Visual highlighted text with title, mix of enumeration and framedtext
@ 2023-03-06 11:19 Gerion Entrup via ntg-context
  2023-03-06 12:45 ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Gerion Entrup via ntg-context @ 2023-03-06 11:19 UTC (permalink / raw)
  To: ntg-context; +Cc: Gerion Entrup


[-- Attachment #1.1.1: Type: text/plain, Size: 1195 bytes --]

Hi,

I want to typeset a "Good to know" section that is visually highlighted
and can spawn across multiple pages.

In LaTeX this would be possible with the mdframed package. See the
attached screenshot for an example how it might look like (it is copied
out of page 4: Definition: Inhomogeneous linear of the mdframed
documentation:
http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf)

I have searched in the wiki and found \defineenumeration:
This is near of that what I need. However I explicitly does not need an
enumeration (so no number or counter). Also I am not sure if I can set a
background and so on.

The other possibility is \defineframedtext. For example this goes much
in the direction that I want:
\definecolor[gbackground][s=0.98]
\defineframedtext[gtk][frame=on,
                       offset=5pt,
                       background=color,
                       width=0.95\textwidth,
                       backgroundcolor=gbackground]

However, there does not seem a possibility to define a title and it
seems to not work on multiple pages.

Is there a mix of an enumeration and framedtext that can produce
something like in the attached picture?

Best,
Gerion

[-- Attachment #1.1.2: Screenshot_20230306_120358.png --]
[-- Type: image/png, Size: 63243 bytes --]

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: Visual highlighted text with title, mix of enumeration and framedtext
  2023-03-06 11:19 Visual highlighted text with title, mix of enumeration and framedtext Gerion Entrup via ntg-context
@ 2023-03-06 12:45 ` Henning Hraban Ramm via ntg-context
  2023-03-06 13:24   ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2023-03-06 12:45 UTC (permalink / raw)
  To: Gerion Entrup via ntg-context; +Cc: Henning Hraban Ramm

Am 06.03.23 um 12:19 schrieb Gerion Entrup via ntg-context:
> I want to typeset a "Good to know" section that is visually highlighted
> and can spawn across multiple pages.
> 
> In LaTeX this would be possible with the mdframed package. See the
> attached screenshot for an example how it might look like (it is copied
> out of page 4: Definition: Inhomogeneous linear of the mdframed
> documentation:
> http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf)
> 
> I have searched in the wiki and found \defineenumeration:
> This is near of that what I need. However I explicitly does not need an
> enumeration (so no number or counter). Also I am not sure if I can set a
> background and so on.
> 
> The other possibility is \defineframedtext. For example this goes much
> in the direction that I want:
> \definecolor[gbackground][s=0.98]
> \defineframedtext[gtk][frame=on,
>                         offset=5pt,
>                         background=color,
>                         width=0.95\textwidth,
>                         backgroundcolor=gbackground]
> 
> However, there does not seem a possibility to define a title and it
> seems to not work on multiple pages.
> 
> Is there a mix of an enumeration and framedtext that can produce
> something like in the attached picture?

If you don’t need an enumeration, then don’t use one.

Did you try text backgrounds?
https://wiki.contextgarden.net/TextBackground

And then use the plethora of \framed options.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: Visual highlighted text with title, mix of enumeration and framedtext
  2023-03-06 12:45 ` Henning Hraban Ramm via ntg-context
@ 2023-03-06 13:24   ` Aditya Mahajan via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan via ntg-context @ 2023-03-06 13:24 UTC (permalink / raw)
  To: Henning Hraban Ramm via ntg-context; +Cc: Aditya Mahajan

[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]

On Mon, 6 Mar 2023, Henning Hraban Ramm via ntg-context wrote:

> Am 06.03.23 um 12:19 schrieb Gerion Entrup via ntg-context:
> > I want to typeset a "Good to know" section that is visually highlighted
> > and can spawn across multiple pages.
> > 
> > In LaTeX this would be possible with the mdframed package. See the
> > attached screenshot for an example how it might look like (it is copied
> > out of page 4: Definition: Inhomogeneous linear of the mdframed
> > documentation:
> > http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf)
> > 
> > I have searched in the wiki and found \defineenumeration:
> > This is near of that what I need. However I explicitly does not need an
> > enumeration (so no number or counter). Also I am not sure if I can set a
> > background and so on.
> > 
> > The other possibility is \defineframedtext. For example this goes much
> > in the direction that I want:
> > \definecolor[gbackground][s=0.98]
> > \defineframedtext[gtk][frame=on,
> >                         offset=5pt,
> >                         background=color,
> >                         width=0.95\textwidth,
> >                         backgroundcolor=gbackground]
> > 
> > However, there does not seem a possibility to define a title and it
> > seems to not work on multiple pages.
> > 
> > Is there a mix of an enumeration and framedtext that can produce
> > something like in the attached picture?
> 
> If you don’t need an enumeration, then don’t use one.
> 
> Did you try text backgrounds?
> https://wiki.contextgarden.net/TextBackground

As an example, see this article that I had written years ago:

https://www.tug.org/pracjourn/2006-4/mahajan/

The solution environment there is similar to what you want. Most of the code there should still work with minor changes.

Aditya

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

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-03-06 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 11:19 Visual highlighted text with title, mix of enumeration and framedtext Gerion Entrup via ntg-context
2023-03-06 12:45 ` Henning Hraban Ramm via ntg-context
2023-03-06 13:24   ` Aditya Mahajan 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).