ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jon Wong <jhannwong@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: startnarrower and framed?
Date: Wed, 21 Aug 2019 21:37:19 +0800	[thread overview]
Message-ID: <051AF450-F973-469F-8ED6-1A8C96BCBC0D@gmail.com> (raw)
In-Reply-To: <ED44CA5B-34F8-407A-B205-12583DD0F985@gmail.com>


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

Hi all,

Ah, found the solution in TextBackground. At here: https://www.contextgarden.net/TextBackground <https://www.contextgarden.net/TextBackground>

Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 TextBackgrounds, zero vspace between them)?

For the top segment, I want rounded corners only for top corners (corner=03 with \framed).

Seems I really should dig into MetaFun and TextBackground. Looks really fun and useful.

Sorry for the noise. Am a little carried away exploring the Garden. :-P

Regards
Jon


> On Aug 21, 2019, at 9:25 PM, Jon Wong <jhannwong@gmail.com> wrote:
> 
> Hi all,
> 
> Sorry, my solution didn’t work.
> 
> My purpose of using \startnarrower is to have some paragraphs of text inside the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
> 
> \startframedtext doesn’t have as many border options as \framed.
> 
> Should I use overlays? Or layers? It seems layers require absolutely positioning, and can’t be logically contained inside a \startnarrower?
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 8:53 PM, Jon Wong <jhannwong@gmail.com> wrote:
>> 
>> Hi all,
>> 
>> I got some progress!
>> 
>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>> \startnarrower
>> \dontleavehmode\framed[width=local]{testing}
>> 
>> Since this works for left offset: \framed[width=local]{testing}
>> \endnarrower
>> 
>> So, how do I do a gradient background? Yeah, I know I have to dive into MetaPost and MetaFun some time. Is that where the solution is?
>> 
>> Regards
>> Jon
>> 
>>> On Aug 21, 2019, at 8:14 PM, Jon Wong <jhannwong@gmail.com> wrote:
>>> 
>>> Hi all,
>>> 
>>> I want to have a \startnarrower effect. But I also want that segment to have a border (hopefully a gradient background color too!).
>>> 
>>> I tried:
>>> 
>>> \startnarrower
>>> \framed{testing}
>>> 
>>> Seems framed doesn’t observe startnarrower commands.
>>> \endnarrower
>>> 
>>> How do I achieve that?
>>> 
>>> Regards
>>> Jon
>> 
> 


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

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

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

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

  reply	other threads:[~2019-08-21 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 12:14 Jon Wong
2019-08-21 12:41 ` Hans Hagen
2019-08-21 12:53 ` Jon Wong
2019-08-21 13:25   ` Jon Wong
2019-08-21 13:37     ` Jon Wong [this message]
2019-08-21 14:21       ` Jon Wong
2019-08-21 14:35         ` Jon Wong

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=051AF450-F973-469F-8ED6-1A8C96BCBC0D@gmail.com \
    --to=jhannwong@gmail.com \
    --cc=ntg-context@ntg.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).