ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Remove left and right offset from nested frames?
@ 2014-08-31 22:18 Mica Semrick
  2014-09-01  4:32 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Mica Semrick @ 2014-08-31 22:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello!

Given: 

\starttext

\framed[frame=on,width=local,offset=0in,loffset=0in,roffset=0in,frameoffset=0in]{
\framed
   [frame=on,
    location=middle,
    align={flushleft,nothyphenated,verytolerant}] % maybe also stretch
   {%
{\tfd My Name Here}
}
\hfill
\framed
   [frame=on,
    location=middle,
    align={flushright,nothyphenated,verytolerant}] % maybe also stretch
   {%
1234 Tree Ave. \#407, Beach City, CA 99876 \\
(123) 456-7890 \ \bullet \ \goto{mail@email.com}[url(mailto:mail@email.com)]
}
}\stoptext
The two nested \framed commands are aligned as I'd like them, but I'd like to remove the small gaps so the text in the first nexted frame sits flush to the left of the text area and the second framed sits flush right to the text area. In other words, I'd like to remove the small gaps from the left and right of the frames. 

Is that possible?

Best,
Mica
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Remove left and right offset from nested frames?
  2014-08-31 22:18 Remove left and right offset from nested frames? Mica Semrick
@ 2014-09-01  4:32 ` Wolfgang Schuster
  2014-09-02 23:12   ` Mica Semrick
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2014-09-01  4:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 01.09.2014 um 00:18 schrieb Mica Semrick <mica@silentumbrella.com>:

> Hello!
> 
> Given: 
> \starttext
> 
> \framed[frame=on,width=local,offset=0in,loffset=0in,roffset=0in,frameoffset=0in]{

Add a % after the {.

> \framed
>  [frame=on,
>   location=middle,
>   align={flushleft,nothyphenated,verytolerant}] % maybe also stretch
>  {%
> {\tfd My Name Here}
> }
> \hfill
> \framed
>  [frame=on,
>   location=middle,
>   align={flushright,nothyphenated,verytolerant}] % maybe also stretch
>  {%
> 1234 Tree Ave. \#407, Beach City, CA 99876 \\
> (123) 456-7890 \ \bullet \ \goto{mail@email.com}[url(mailto:mail@email.com)]
> }

Add a % after the }.

> }\stoptext
> The two nested \framed commands are aligned as I'd like them, but I'd like to remove the small gaps so the text in the first nexted frame sits flush to the left of the text area and the second framed sits flush right to the text area. In other words, I'd like to remove the small gaps from the left and right of the frames. 
> Is that possible?

You forgot a few comment signs in your code which can be avoided when you \startframed … \stopframed instead of \framed{…}.

\starttext

\startframed[frame=on,width=local,offset=0pt]
	\startframed[frame=on,location=middle,align={flushleft,nothyphenated,verytolerant},foregroundstyle=\tfd]
		My Name Here
	\stopframed
	\hfill
	\startframed[frame=on,location=middle,align={flushright,nothyphenated,verytolerant}]
		1234 Tree Ave. \#407, Beach City, CA 99876\\
		(123) 456-7890 \hspace[medium] \symbol[bullet] \hspace[medium] \goto{mail@email.com}[url(mailto:mail@email.com)]
	\stopframed
\stopframed

\stoptext

Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Remove left and right offset from nested frames?
  2014-09-01  4:32 ` Wolfgang Schuster
@ 2014-09-02 23:12   ` Mica Semrick
  2014-09-03 11:03     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Mica Semrick @ 2014-09-02 23:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks Wolfgang, that worked well.

Are there more reasons to use start & stop over start{}?

On August 31, 2014 9:32:31 PM PDT, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
>Am 01.09.2014 um 00:18 schrieb Mica Semrick <mica@silentumbrella.com>:
>
>> Hello!
>> 
>> Given: 
>> \starttext
>> 
>>
>\framed[frame=on,width=local,offset=0in,loffset=0in,roffset=0in,frameoffset=0in]{
>
>Add a % after the {.
>
>> \framed
>>  [frame=on,
>>   location=middle,
>>   align={flushleft,nothyphenated,verytolerant}] % maybe also stretch
>>  {%
>> {\tfd My Name Here}
>> }
>> \hfill
>> \framed
>>  [frame=on,
>>   location=middle,
>>   align={flushright,nothyphenated,verytolerant}] % maybe also stretch
>>  {%
>> 1234 Tree Ave. \#407, Beach City, CA 99876 \\
>> (123) 456-7890 \ \bullet \
>\goto{mail@email.com}[url(mailto:mail@email.com)]
>> }
>
>Add a % after the }.
>
>> }\stoptext
>> The two nested \framed commands are aligned as I'd like them, but I'd
>like to remove the small gaps so the text in the first nexted frame
>sits flush to the left of the text area and the second framed sits
>flush right to the text area. In other words, I'd like to remove the
>small gaps from the left and right of the frames. 
>> Is that possible?
>
>You forgot a few comment signs in your code which can be avoided when
>you \startframed … \stopframed instead of \framed{…}.
>
>\starttext
>
>\startframed[frame=on,width=local,offset=0pt]
>	\startframed[frame=on,location=middle,align={flushleft,nothyphenated,verytolerant},foregroundstyle=\tfd]
>		My Name Here
>	\stopframed
>	\hfill
>	\startframed[frame=on,location=middle,align={flushright,nothyphenated,verytolerant}]
>		1234 Tree Ave. \#407, Beach City, CA 99876\\
>		(123) 456-7890 \hspace[medium] \symbol[bullet] \hspace[medium]
>\goto{mail@email.com}[url(mailto:mail@email.com)]
>	\stopframed
>\stopframed
>
>\stoptext
>
>Wolfgang
>___________________________________________________________________________________
>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://tex.aanhet.net
>archive  : http://foundry.supelec.fr/projects/contextrev/
>wiki     : http://contextgarden.net
>___________________________________________________________________________________

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Remove left and right offset from nested frames?
  2014-09-02 23:12   ` Mica Semrick
@ 2014-09-03 11:03     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2014-09-03 11:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 03.09.2014 um 01:12 schrieb Mica Semrick <mica@silentumbrella.com>:

> Thanks Wolfgang, that worked well.
> 
> Are there more reasons to use start & stop over start{}?

It’s more a matter of taste. \framed is better when you use to to frame short parts os text and \startframed when you want to put complete sentences into a frame.


A big difference is how leading and trailing spaces are handled, as can be seen in the following example the spaces before and after “text” are removed with \startframed.

\starttext

\framed[foregroundcolor=red]{ text }

\startframed[foregroundcolor=red] text \stopframed

\stoptext

Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-09-03 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-31 22:18 Remove left and right offset from nested frames? Mica Semrick
2014-09-01  4:32 ` Wolfgang Schuster
2014-09-02 23:12   ` Mica Semrick
2014-09-03 11:03     ` Wolfgang Schuster

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