ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using \startframedtext with \startcombination
@ 2014-09-29 16:52 Fabrice Couvreur
  2014-09-29 20:25 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2014-09-29 16:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
Why the second frame is not displayed ?
Best regards,
Fabrice

\definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00]
\starttext
\startcombination[2*1]
{%
\startframedtext[
    width=0.45\textwidth,
    frame=on,
    framecolor=H1prime,
    location=left,
    background=color,
    backgroundcolor=lightgray]
{\bf Algorithme A}
\startitemize[2]
\item Choisir un nombre
    \item Élever au carré
    \item Multiplier par 4
    \item Ajouter le produit du nombre choisi au départ par 28
    \item Donner le résultat
\stopitemize
\stopframedtext
}{}
{%
\startframedtext[
    width=0.45\textwidth,
    frame=on,
    framecolor=H1prime,
    location=right,
    background=color,
    backgroundcolor=H4]
\startitemize[2]
{\bf Algorithme B}
 \item Choisir un nombre
    \item Prendre son double
    \item Ajouter 7
    \item Prendre le carré du résultat
    \item Retrancher 49
    \item Donner le résultat
\stopitemize
\stopframedtext
}{}
\stopcombination
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1430 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: Using \startframedtext with \startcombination
  2014-09-29 16:52 Using \startframedtext with \startcombination Fabrice Couvreur
@ 2014-09-29 20:25 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2014-09-29 20:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.09.2014 um 18:52 schrieb Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hi, 
> Why the second frame is not displayed ? 

You need “location=none” on your framedtexts. With the values left and right you’re using now
context reserves a horizontal space which covers the whole text width for each frame which
is needed when you want to align the content on the left or right margins in the text.

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: Using \startframedtext with \startcombination
  2014-10-01 12:44 ` Wolfgang Schuster
@ 2014-10-03 11:03   ` Fabrice
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice @ 2014-10-03 11:03 UTC (permalink / raw)
  To: ntg-context

Hi Wolfgang,
Your explanations are once again very clear, I fully understand the 
mechanism.
Thank you very much,
Fabrice
___________________________________________________________________________________
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: Using \startframedtext with \startcombination
  2014-09-30 19:52 Couvreur Fabrice
@ 2014-10-01 12:44 ` Wolfgang Schuster
  2014-10-03 11:03   ` Fabrice
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-10-01 12:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 30.09.2014 um 21:52 schrieb Couvreur Fabrice <couvreur.fabrice@wanadoo.fr>:

> Hello Wolfgang,
> Thank you for the answer, but I did not understand everything.

I try ti explain it with a few examples. When you text in a framedtext environment context creates a box with the given width (which is shown with the red frame), this box is then put into another box (which is shown which a black frame) which has the width of the text area. The large outer box is necessary when you want to align the inner box to the left, middle or right of the text block.


\setupframedtext[width=8cm,framecolor=red,frameoffset=-1ex]

\starttext

\ruledhbox\bgroup
	\startframedtext[left]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[middle]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[right]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[none]
	\input ward
	\stopframedtext
\egroup

\stoptext


When you use now a combination with a framedtext environment each cell of the combination is too wide to show more than one cell on the page. You can see in the following example that the second cell is positioned outside of the visible page area.


\setuppapersize[A4][A3,landscape]

\showframe

\setupframedtext[width=8cm,framecolor=red,frameoffset=-1ex]

\starttext

\startcombination
	\startcontent
		\ruledhbox\bgroup
			\startframedtext[left]
			\input ward
			\stopframedtext
		\egroup
	\stopcontent
	\startcaption
		Left aligned!
	\stopcaption
	\startcontent
		\ruledhbox\bgroup
			\startframedtext[right]
			\input ward
			\stopframedtext
		\egroup
	\stopcontent
	\startcaption
		Right aligned!
	\stopcaption
\stopcombination

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

* Re: Using \startframedtext with \startcombination
@ 2014-09-30 19:52 Couvreur Fabrice
  2014-10-01 12:44 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Couvreur Fabrice @ 2014-09-30 19:52 UTC (permalink / raw)
  To: ntg-context

Hello Wolfgang,
Thank you for the answer, but I did not understand everything.
Fabrice

Envoyé de mon iPad
___________________________________________________________________________________
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-10-03 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29 16:52 Using \startframedtext with \startcombination Fabrice Couvreur
2014-09-29 20:25 ` Wolfgang Schuster
2014-09-30 19:52 Couvreur Fabrice
2014-10-01 12:44 ` Wolfgang Schuster
2014-10-03 11:03   ` Fabrice

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