ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Itemize and framed
@ 2014-08-29 13:19 Fabrice Couvreur
  2014-08-29 13:55 ` Otared Kavian
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2014-08-29 13:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
Is this the best way to insert a list in a frame ?
thank you,
Fabrice

\setupcolors[state=start]
\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
\starttext
\framed[corner=06,frame=on,framecolor=H1prime,location=middle,background=color,backgroundcolor=H4]{%
\rbox{
\startitemize[1]
 \item planter le piquet 1 à côté de l'arbre 1 ;
 \item aligner le piquet 1, le piquet 2 et les deux arbres puis fixer les
piquets 3 et 4 ;
\item se placer de manière à être aligné avec l'arbre 2 et le piquet 3
d'une part ;

 et avec l'arbre 1 et le piquet 4 d'autre part.
\item mesurer sa distance à l'arbre 1 ;
\item rechercher, dans le tableau, la distance correspondante entre les
deux arbres.
\stopitemize}}
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1128 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] 5+ messages in thread

* Re: Itemize and framed
  2014-08-29 13:19 Itemize and framed Fabrice Couvreur
@ 2014-08-29 13:55 ` Otared Kavian
  2014-08-29 16:17   ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Otared Kavian @ 2014-08-29 13:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

It looks fine, but you can as well use \startframedtext, as in:

\starttext
\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
\starttext
\startframedtext[
	width=\textwidth,
	corner=06,
	frame=on,
	framecolor=H1prime,
	location=middle,
	background=color,
	backgroundcolor=H4]

\startitemize[1] 
 \item planter le piquet 1 à côté de l'arbre 1 ; 
 \item aligner le piquet 1, le piquet 2 et les deux arbres puis fixer les piquets 3 et 4 ;
\item se placer de manière à être aligné avec l'arbre 2 et le piquet 3 d'une part ;

 et avec l'arbre 1 et le piquet 4 d'autre part.
\item mesurer sa distance à l'arbre 1 ; 
\item rechercher, dans le tableau, la distance correspondante entre les deux arbres. 
\stopitemize

\stopframedtext

\stoptext

Best regards: OK


On 29 Aug 2014, at 15:19, Fabrice Couvreur <fabrice1.couvreur@gmail.com> wrote:

> 
> Hi, 
> Is this the best way to insert a list in a frame ? 
> thank you,
> Fabrice
> 
> \setupcolors[state=start]
> \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
> \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
> \starttext
> \framed[corner=06,frame=on,framecolor=H1prime,location=middle,background=color,backgroundcolor=H4]{%
> \rbox{
> \startitemize[1] 
>  \item planter le piquet 1 à côté de l'arbre 1 ; 
>  \item aligner le piquet 1, le piquet 2 et les deux arbres puis fixer les piquets 3 et 4 ;
> \item se placer de manière à être aligné avec l'arbre 2 et le piquet 3 d'une part ;
> 
>  et avec l'arbre 1 et le piquet 4 d'autre part.
> \item mesurer sa distance à l'arbre 1 ; 
> \item rechercher, dans le tableau, la distance correspondante entre les deux arbres. 
> \stopitemize}}
> \stoptext
> ___________________________________________________________________________________
> 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] 5+ messages in thread

* Re: Itemize and framed
  2014-08-29 13:55 ` Otared Kavian
@ 2014-08-29 16:17   ` Wolfgang Schuster
  2014-08-29 17:30     ` Fabrice
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-08-29 16:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.08.2014 um 15:55 schrieb Otared Kavian <otared@gmail.com>:

> Hi,
> 
> It looks fine, but you can as well use \startframedtext, as in:
> 
> \starttext
> \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
> \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00]
> \starttext
> \startframedtext[
> 	width=\textwidth,
> 	corner=06,
> 	frame=on,
> 	framecolor=H1prime,
> 	location=middle,
> 	background=color,
> 	backgroundcolor=H4]
> 
> \startitemize[1] 
> \item planter le piquet 1 à côté de l'arbre 1 ; 
> \item aligner le piquet 1, le piquet 2 et les deux arbres puis fixer les piquets 3 et 4 ;
> \item se placer de manière à être aligné avec l'arbre 2 et le piquet 3 d'une part ;
> 
> et avec l'arbre 1 et le piquet 4 d'autre part.
> \item mesurer sa distance à l'arbre 1 ; 
> \item rechercher, dans le tableau, la distance correspondante entre les deux arbres. 
> \stopitemize
> 
> \stopframedtext
> 
> \stoptext

In this case framedtext is the better choice but it can be done with framed as well
but one has to set values for align and disable the strut, e.g.

\framed
  [align=right,strut=no]
  {\startitemize
   …
   \stopitemize}

and when you use MkIV replace \framed with \startframed, i.e.

\startframed[align=right,strut=no]
  \startitemize
  …
  \stopitemize
\stopframed

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] 5+ messages in thread

* Re: Itemize and framed
  2014-08-29 16:17   ` Wolfgang Schuster
@ 2014-08-29 17:30     ` Fabrice
  2014-08-29 18:21       ` Otared Kavian
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice @ 2014-08-29 17:30 UTC (permalink / raw)
  To: ntg-context

Thank you for your answers, I continue to learn.
However, the solution should Otared me better because the numbering is 
less near the edge of the frame.
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Itemize and framed
  2014-08-29 17:30     ` Fabrice
@ 2014-08-29 18:21       ` Otared Kavian
  0 siblings, 0 replies; 5+ messages in thread
From: Otared Kavian @ 2014-08-29 18:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Fabrice,

Actually with both solutions you can control the distance of the framed material to the frame by the key 
	« offset=SomeMeasure »
For instance you can say:

\startframedtext[
	width=\textwidth,
	offset=.5em,
	corner=06,
	frame=on,
	framecolor=H1prime,
	location=middle,
	background=color,
	backgroundcolor=H4]

and changing .5em to another value you cans choose what you find better.

Best regards: OK

On 29 Aug 2014, at 19:30, Fabrice <couvreur.fabrice@wanadoo.fr> wrote:

> Thank you for your answers, I continue to learn.
> However, the solution should Otared me better because the numbering is less near the edge of the frame.
> ___________________________________________________________________________________
> 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] 5+ messages in thread

end of thread, other threads:[~2014-08-29 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 13:19 Itemize and framed Fabrice Couvreur
2014-08-29 13:55 ` Otared Kavian
2014-08-29 16:17   ` Wolfgang Schuster
2014-08-29 17:30     ` Fabrice
2014-08-29 18:21       ` Otared Kavian

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