Remove left and right offset from nested frames?
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
Am 01.09.2014 um 00:18 schrieb Mica Semrick
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
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
Am 01.09.2014 um 00:18 schrieb Mica Semrick
: 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 ___________________________________________________________________________________
Am 03.09.2014 um 01:12 schrieb Mica Semrick
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
participants (2)
-
Mica Semrick
-
Wolfgang Schuster