ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with framed text.
@ 2015-02-21 17:35 John Culleton
  2015-02-21 19:16 ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: John Culleton @ 2015-02-21 17:35 UTC (permalink / raw)
  To: ConTeXt

In several palces I want to set up framed text
with a gray background and rounded corners. Here
is my \setupframed description:

\setupframed[
framecorner=round,
frameradius=0.1,
background=screen,
backgroundscreen=0.70,
backgroundcorner=round,
backgroundradius=0.1,
corner=round,
radius=0.1
]
--------------------
And here is my first framed text:
--------------------------
\startframedtext[middle] 
\centerline{A Vision Example}
 \QQ{[In the year 20xx], our
company is internationally recognized as the
premier supplier of [your food products]. We
regularly exceed customer expectations by
providing innovative and valuable [your food
products] .} 
\stopframedtext
------------------------------------
The hangup seems to be the rounded corners. 
I am using texlive 2014. 

BTW the macro QQ is my shorthand for \quotation
which is much to long IMO. But I am American and
use double quotes a lot.
\def\QQ#1{\quotation{#1}}
That is not the problem. Everything works until
I try to use rounded corners. The customer had
them on the last edition of the book, probably
done with MSWord (!) 

All answers appreciated.

-- 
John Culleton
Wexford Press
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-21 17:35 Problem with framed text John Culleton
@ 2015-02-21 19:16 ` Aditya Mahajan
  2015-02-22 12:55   ` John Culleton
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2015-02-21 19:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On Feb 21, 2015, at 12:35 PM, John Culleton <John@wexfordpress.com> wrote:
> 
> In several palces I want to set up framed text
> with a gray background and rounded corners. Here
> is my \setupframed description:
> 
> \setupframed[
> framecorner=round,
> frameradius=0.1,
> background=screen,
> backgroundscreen=0.70,
> backgroundcorner=round,
> backgroundradius=0.1,
> corner=round,
> radius=0.1
> ]

There should be a comma after 0.1.

> --------------------
> And here is my first framed text:
> --------------------------
> \startframedtext[middle] 
> \centerline{A Vision Example}
> \QQ{[In the year 20xx], our
> company is internationally recognized as the
> premier supplier of [your food products]. We
> regularly exceed customer expectations by
> providing innovative and valuable [your food
> products] .} 
> \stopframedtext
> ------------------------------------
> The hangup seems to be the rounded corners. 
> I am using texlive 2014. 
> 
> BTW the macro QQ is my shorthand for \quotation
> which is much to long IMO. But I am American and
> use double quotes a lot.
> \def\QQ#1{\quotation{#1}}
> That is not the problem. Everything works until
> I try to use rounded corners. The customer had
> them on the last edition of the book, probably
> done with MSWord (!) 

It is helpful if you post a complete MWE.

Aditya 
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-21 19:16 ` Aditya Mahajan
@ 2015-02-22 12:55   ` John Culleton
  2015-02-22 14:57     ` Pablo Rodriguez
  2015-02-22 15:04     ` Problem with framed text Alan BRASLAU
  0 siblings, 2 replies; 8+ messages in thread
From: John Culleton @ 2015-02-22 12:55 UTC (permalink / raw)
  To: ntg-context

On Sat, 21 Feb 2015 14:16:31 -0500
Aditya Mahajan <adityam@umich.edu> wrote:

> 
> > On Feb 21, 2015, at 12:35 PM, John Culleton
> > <John@wexfordpress.com> wrote:
> > 
> > In several palces I want to set up framed text
> > with a gray background and rounded corners.
> > Here is my \setupframed description:
> > 
> > \setupframed[
> > framecorner=round,
> > frameradius=0.1,
> > background=screen,
> > backgroundscreen=0.70,
> > backgroundcorner=round,
> > backgroundradius=0.1,
> > corner=round,
> > radius=0.1
> > ]
> 
> There should be a comma after 0.1.

With respect, I don't think so. Commas separate
parameters. the last "0.1" is properly followed
by a "]".
-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-22 12:55   ` John Culleton
@ 2015-02-22 14:57     ` Pablo Rodriguez
  2015-02-22 17:56       ` John Culleton
  2015-02-22 15:04     ` Problem with framed text Alan BRASLAU
  1 sibling, 1 reply; 8+ messages in thread
From: Pablo Rodriguez @ 2015-02-22 14:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 02/22/2015 01:55 PM, John Culleton wrote:
> On Sat, 21 Feb 2015 14:16:31 -0500 Aditya Mahajan wrote:
>> [...]
>> There should be a comma after 0.1.
> 
> With respect, I don't think so. Commas separate
> parameters. the last "0.1" is properly followed
> by a "]".

Hi John,

this should work:

\setupframed[framecorner=round,
frameradius=0.1em,
background=screen,
backgroundscreen=0.70,
backgroundcorner=round,
backgroundradius=0.1em,
corner=round,
radius=0.1em]

Radius, framedradius and backgroundradius expect dimensions as values,
not mere numbers.

BTW, having a sample that shows the problem increases the reply speed :-).

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-22 12:55   ` John Culleton
  2015-02-22 14:57     ` Pablo Rodriguez
@ 2015-02-22 15:04     ` Alan BRASLAU
  1 sibling, 0 replies; 8+ messages in thread
From: Alan BRASLAU @ 2015-02-22 15:04 UTC (permalink / raw)
  To: John Culleton; +Cc: ntg-context

On Sun, 22 Feb 2015 07:55:45 -0500
John Culleton <John@wexfordpress.com> wrote:

> > There should be a comma after 0.1.  
> 
> With respect, I don't think so. Commas separate
> parameters. the last "0.1" is properly followed
> by a "]".

In which case you need to use
	radius=0.1]
(no newline)

Alan
-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.braslau@cea.fr
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-22 14:57     ` Pablo Rodriguez
@ 2015-02-22 17:56       ` John Culleton
  2015-02-22 19:52         ` Wolfgang Schuster
  2015-02-25 12:27         ` Problem with framed text.--addendum John Culleton
  0 siblings, 2 replies; 8+ messages in thread
From: John Culleton @ 2015-02-22 17:56 UTC (permalink / raw)
  To: ntg-context

On Sun, 22 Feb 2015 15:57:48 +0100
Pablo Rodriguez <oinos@gmx.es> wrote:

> On 02/22/2015 01:55 PM, John Culleton wrote:
> > On Sat, 21 Feb 2015 14:16:31 -0500 Aditya
> > Mahajan wrote:
> >> [...]
> >> There should be a comma after 0.1.
> > 
> > With respect, I don't think so. Commas
> > separate parameters. the last "0.1" is
> > properly followed by a "]".
> 
> Hi John,
> 
> this should work:
> 
> \setupframed[framecorner=round,
> frameradius=0.1em,
> background=screen,
> backgroundscreen=0.70,
> backgroundcorner=round,
> backgroundradius=0.1em,
> corner=round,
> radius=0.1em]
> 
> Radius, framedradius and backgroundradius
> expect dimensions as values, not mere numbers.
> 
> BTW, having a sample that shows the problem
> increases the reply speed :-).
> 
> I hope it helps,
> 
> 
> Pablo
You had the cure.

I built a sample and then played with the em
value. Lacking precise guidance I thought that
the value was one of those 0 to 1 ranges. Not so.
setting at 1.0 em gives me what I was looking
for.  The setting 0.1 em gave me rounding that was
imperceptible without magnification. 

Here is my successful sample:
-------------------------------------
\setupframed[framecorner=round,
frameradius=1em,
background=screen,
backgroundscreen=0.70,
backgroundcorner=round,
backgroundradius=1em,
corner=round,
radius1em]
\starttext
Some text.
\startframedtext[middle] 
\centerline{A Vision Example}
 In the year 20xx, our
company is internationally recognized as the premier supplier of
your food products. We regularly exceed customer expectations
by providing innovative and valuable your food products.
\stopframedtext
Some more text
\stoptext
---------------------------------

 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
___________________________________________________________________________________
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] 8+ messages in thread

* Re: Problem with framed text.
  2015-02-22 17:56       ` John Culleton
@ 2015-02-22 19:52         ` Wolfgang Schuster
  2015-02-25 12:27         ` Problem with framed text.--addendum John Culleton
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2015-02-22 19:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


> Am 22.02.2015 um 18:56 schrieb John Culleton <John@wexfordpress.com>:
> 
> On Sun, 22 Feb 2015 15:57:48 +0100
> Pablo Rodriguez <oinos@gmx.es <mailto:oinos@gmx.es>> wrote:
> 
>> On 02/22/2015 01:55 PM, John Culleton wrote:
>>> On Sat, 21 Feb 2015 14:16:31 -0500 Aditya
>>> Mahajan wrote:
>>>> [...]
>>>> There should be a comma after 0.1.
>>> 
>>> With respect, I don't think so. Commas
>>> separate parameters. the last "0.1" is
>>> properly followed by a "]".
>> 
>> Hi John,
>> 
>> this should work:
>> 
>> \setupframed[framecorner=round,
>> frameradius=0.1em,
>> background=screen,
>> backgroundscreen=0.70,
>> backgroundcorner=round,
>> backgroundradius=0.1em,
>> corner=round,
>> radius=0.1em]
>> 
>> Radius, framedradius and backgroundradius
>> expect dimensions as values, not mere numbers.
>> 
>> BTW, having a sample that shows the problem
>> increases the reply speed :-).
>> 
>> I hope it helps,
>> 
>> 
>> Pablo
> You had the cure.
> 
> I built a sample and then played with the em
> value. Lacking precise guidance I thought that
> the value was one of those 0 to 1 ranges. Not so.
> setting at 1.0 em gives me what I was looking
> for.  The setting 0.1 em gave me rounding that was
> imperceptible without magnification. 
> 
> Here is my successful sample:
> -------------------------------------
> \setupframed

Use \setupframedtext to change the layout of \startframedtext.

> [framecorner=round,
> frameradius=1em,

The “frameradius” setting can be omitted because you set “radius”.

> background=screen,
> backgroundscreen=0.70,
> backgroundcorner=round,
> backgroundradius=1em,

The “backgroundcorner” and “backgroundradius” settings can be omitted as well because you set “corner” and “radius”.

> corner=round,
> radius1em]

Missing “=” between “radius” and “1em”.

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Problem with framed text.--addendum
  2015-02-22 17:56       ` John Culleton
  2015-02-22 19:52         ` Wolfgang Schuster
@ 2015-02-25 12:27         ` John Culleton
  1 sibling, 0 replies; 8+ messages in thread
From: John Culleton @ 2015-02-25 12:27 UTC (permalink / raw)
  To: ntg-context

On Sun, 22 Feb 2015 12:56:05 -0500
John Culleton <John@wexfordpress.com> wrote:

> On Sun, 22 Feb 2015 15:57:48 +0100
> Pablo Rodriguez <oinos@gmx.es> wrote:
> 
> > On 02/22/2015 01:55 PM, John Culleton wrote:
> > > On Sat, 21 Feb 2015 14:16:31 -0500 Aditya
> > > Mahajan wrote:
> > >> [...]
> > >> There should be a comma after 0.1.
> > > 
> > > With respect, I don't think so. Commas
> > > separate parameters. the last "0.1" is
> > > properly followed by a "]".
> > 
> > Hi John,
> > 
> > this should work:
> > 
> > \setupframed[framecorner=round,
> > frameradius=0.1em,
> > background=screen,
> > backgroundscreen=0.70,
> > backgroundcorner=round,
> > backgroundradius=0.1em,
> > corner=round,
> > radius=0.1em]
> > 
> > Radius, framedradius and backgroundradius
> > expect dimensions as values, not mere numbers.
> > 
> > BTW, having a sample that shows the problem
> > increases the reply speed :-).
> > 
> > I hope it helps,
> > 
> > 
> > Pablo
> You had the cure.

I put commands like the one under discussion in a
separate file called "macros.tex" which is hte
first file called in my standard "book.tex"
top level file.
For some reason it didn't work. So I copied it to
just before my first text frame in the
'chapter01.tex' file. Then it worked for that
frame and subsequent instances.

Here is my book.tex file as used in my current
project:

\input variables.tex
\input macros.tex
\input fonts.tex
\starttext
%\showlayout
\startfrontmatter
\input half.tex
\input title.tex
\input contents.tex
\stopfrontmatter
\startbodymatter
%\input sample3.tex
\input body.tex
\stopbodymatter
\stoptext

I will add more calls later for acknowledgements,
appendices etc. all in separate subfiles.
\body.tex is a subfile that calls the individual 
chapter subsubfiles.

Variables.tex contains the definitions of title,
subtitle, author, publisher, ISBN etc.

John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: "Create Book Covers with
Scribus 1.4.5" coming soon at
http://www.booklocker.com/!
___________________________________________________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2015-02-25 12:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-21 17:35 Problem with framed text John Culleton
2015-02-21 19:16 ` Aditya Mahajan
2015-02-22 12:55   ` John Culleton
2015-02-22 14:57     ` Pablo Rodriguez
2015-02-22 17:56       ` John Culleton
2015-02-22 19:52         ` Wolfgang Schuster
2015-02-25 12:27         ` Problem with framed text.--addendum John Culleton
2015-02-22 15:04     ` Problem with framed text Alan BRASLAU

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