ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* align and location in \setupcombination
@ 2012-10-27 11:38 Jeong Dal
  2012-10-28 14:59 ` Marco Patzer
  0 siblings, 1 reply; 12+ messages in thread
From: Jeong Dal @ 2012-10-27 11:38 UTC (permalink / raw)
  To: ntg-context

Dear all,

In the output of the following sample, figures are left flushed.
I found some discussions about the align and location in \setupcombination.
"align=" is for caption and "location=middle" is for figures' location.

But "align=   " worked while "location= " has no effect at all.
So I have to enclose \startcombination … \stopcombination in \placefigure[][]{}.
How to locate the combined figures at the horizontal center?

Thank you for reading.

Best regards,

\starttext
\setupcombination[align=leftflush, location=middle]
\startcombination[2*1]
{\externalfigure[dummy][]}{aaaaaa}
{\externalfigure[dummy][]}{bbbbbb}
\stopcombination
\stoptext


***** my system:
Mac OS 10.8

This is LuaTeX, Version beta-0.70.2-2012052309 (TeX Live 2012)
\write18 enabled.
(/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2012.10.19 00:06 MKIV fmt: 2012.10.19 int: english/english
___________________________________________________________________________________
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] 12+ messages in thread

* Re: align and location in \setupcombination
  2012-10-27 11:38 align and location in \setupcombination Jeong Dal
@ 2012-10-28 14:59 ` Marco Patzer
  2012-10-28 15:24   ` Wolfgang Schuster
  2012-10-30 12:01   ` Wolfgang Schuster
  0 siblings, 2 replies; 12+ messages in thread
From: Marco Patzer @ 2012-10-28 14:59 UTC (permalink / raw)
  To: ntg-context

2012-10-27 Jeong Dal:

> In the output of the following sample, figures are left flushed.
> I found some discussions about the align and location in \setupcombination.
> "align=" is for caption and "location=middle" is for figures' location.
> 
> But "align=   " worked while "location= " has no effect at all.

location is the vertical location of the element within the
combination. Compare:

\startcombination[2*1]
  {\externalfigure[dummy][height=1cm]}{aaaaaa}
  {\externalfigure[dummy][height=4cm]}{bbbbbb}
\stopcombination

\setupcombination
  [location=middle]

\startcombination[2*1]
  {\externalfigure[dummy][height=1cm]}{aaaaaa}
  {\externalfigure[dummy][height=4cm]}{bbbbbb}
\stopcombination

> So I have to enclose \startcombination … \stopcombination in \placefigure[][]{}.
> How to locate the combined figures at the horizontal center?

\midaligned
  {\startcombination[2*1]
    {\externalfigure[dummy][]}{aaaaaa}
    {\externalfigure[dummy][]}{bbbbbb}
   \stopcombination}


Marco

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

* Re: align and location in \setupcombination
  2012-10-28 14:59 ` Marco Patzer
@ 2012-10-28 15:24   ` Wolfgang Schuster
  2012-10-30 12:01   ` Wolfgang Schuster
  1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Schuster @ 2012-10-28 15:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 28.10.2012 um 15:59 schrieb Marco Patzer <homerow@lavabit.com>:

>> So I have to enclose \startcombination … \stopcombination in \placefigure[][]{}.
>> How to locate the combined figures at the horizontal center?
> 
> \midaligned
>  {\startcombination[2*1]
>    {\externalfigure[dummy][]}{aaaaaa}
>    {\externalfigure[dummy][]}{bbbbbb}
>   \stopcombination}


When there are more combinations in the document I would create a named framedtext to align them.

\defineframedtext
  [centered]
  [frame=off,
   width=fit,
   offset=overlay,
   location=middle]

\useMPlibrary[dum]

\starttext

\startcentered
	\startcombination[2*1]
		\startcontent
			\externalfigure[dummy]%
		\stopcontent
		\startcaption
			aaaaaa
		\stopcaption
		\startcontent
			\externalfigure[dummy]%
		\stopcontent
		\startcaption
			bbbbbb
		\stopcaption
	\stopcombination
\stopcentered

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

* Re: align and location in \setupcombination
  2012-10-28 14:59 ` Marco Patzer
  2012-10-28 15:24   ` Wolfgang Schuster
@ 2012-10-30 12:01   ` Wolfgang Schuster
  2012-10-30 12:36     ` Marco Patzer
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2012-10-30 12:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 28.10.2012 um 15:59 schrieb Marco Patzer <homerow@lavabit.com>:

>> So I have to enclose \startcombination … \stopcombination in \placefigure[][]{}.
>> How to locate the combined figures at the horizontal center?
> 
> \midaligned
>  {\startcombination[2*1]
>    {\externalfigure[dummy][]}{aaaaaa}
>    {\externalfigure[dummy][]}{bbbbbb}
>   \stopcombination}

With the new beta you can replace

    \midaligned{…}

with

    \startmidaligned
        …
    \stopmidaligned

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

* Re: align and location in \setupcombination
  2012-10-30 12:01   ` Wolfgang Schuster
@ 2012-10-30 12:36     ` Marco Patzer
  2012-10-30 17:57       ` Wolfgang Schuster
  0 siblings, 1 reply; 12+ messages in thread
From: Marco Patzer @ 2012-10-30 12:36 UTC (permalink / raw)
  To: ntg-context

2012-10-30 Wolfgang Schuster:

> > \midaligned
> >  {\startcombination[2*1]
> >    {\externalfigure[dummy][]}{aaaaaa}
> >    {\externalfigure[dummy][]}{bbbbbb}
> >   \stopcombination}
> 
> With the new beta you can replace
> 
>     \midaligned{…}
> 
> with
> 
>     \startmidaligned
>         …
>     \stopmidaligned

I already noted that. I appreciate the movement to a more uniform
\start…\stop syntax.

Just a random thought: Would it be possible or even make sense to
uniform the syntax even further and maybe merge the functionality
into \startalignment? At the moment we have one command with an
argument for alignments:

\startalignment [right|middle|left]
	\input knuth
\stopalignment

however three different command for boxed alignments (furthermore,
\startrightaligned works just the opposite of \startalignment[right]):

\startrightaligned
	FooBar
\stoprightaligned

\startmidaligned
	FooBar
\stopmidaligned

\startleftaligned
	FooBar
\stopleftaligned

This might be easy to remember for us who still know the
\midaligned{} syntax, but I guess for new users it's confusing.
Additionally, the difference between the commands is unclear. What
about an interface like this:

\startlinealignment [right|middle|left]
	FooBar
\stoplinealignment

Taking this one step further would be to merge both into one
command:

\startalignment [align=left, alternative=???]
	\input knuth
\stopalignment

\startalignment [align=left, alternative=!!!]
	FooBar
\stopalignment


Marco

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

* Re: align and location in \setupcombination
  2012-10-30 12:36     ` Marco Patzer
@ 2012-10-30 17:57       ` Wolfgang Schuster
  2012-10-30 18:39         ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2012-10-30 17:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 30.10.2012 um 13:36 schrieb Marco Patzer <homerow@lavabit.com>:

> 2012-10-30 Wolfgang Schuster:
> 
>>> \midaligned
>>> {\startcombination[2*1]
>>>   {\externalfigure[dummy][]}{aaaaaa}
>>>   {\externalfigure[dummy][]}{bbbbbb}
>>>  \stopcombination}
>> 
>> With the new beta you can replace
>> 
>>    \midaligned{…}
>> 
>> with
>> 
>>    \startmidaligned
>>        …
>>    \stopmidaligned
> 
> I already noted that. I appreciate the movement to a more uniform
> \start…\stop syntax.

Not all people on the list to read the dev list :)

> Just a random thought: Would it be possible or even make sense to
> uniform the syntax even further and maybe merge the functionality
> into \startalignment? At the moment we have one command with an
> argument for alignments:
> 
> \startalignment [right|middle|left]
> 	\input knuth
> \stopalignment
> 
> however three different command for boxed alignments (furthermore,
> \startrightaligned works just the opposite of \startalignment[right]):
> 
> \startrightaligned
> 	FooBar
> \stoprightaligned
> 
> \startmidaligned
> 	FooBar
> \stopmidaligned
> 
> \startleftaligned
> 	FooBar
> \stopleftaligned
> 
> This might be easy to remember for us who still know the
> \midaligned{} syntax, but I guess for new users it's confusing.
> Additionally, the difference between the commands is unclear. What
> about an interface like this:
> 
> \startlinealignment [right|middle|left]
> 	FooBar
> \stoplinealignment

+1

> Taking this one step further would be to merge both into one
> command:
> 
> \startalignment [align=left, alternative=???]
> 	\input knuth
> \stopalignment
> 
> \startalignment [align=left, alternative=!!!]
> 	FooBar
> \stopalignment


Not sure if this method is too complicated for a few people.

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

* Re: align and location in \setupcombination
  2012-10-30 17:57       ` Wolfgang Schuster
@ 2012-10-30 18:39         ` Hans Hagen
  2012-10-30 19:04           ` Wolfgang Schuster
  2012-10-31 10:31           ` Alan BRASLAU
  0 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2012-10-30 18:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

On 30-10-2012 18:57, Wolfgang Schuster wrote:

> Not all people on the list to read the dev list :)

maybe we need a warning (like the mandate 'this site uses cookies' in 
NL) like 'if you read this message you agree not to complain about an 
undocumented feature'

>> Just a random thought: Would it be possible or even make sense to
>> uniform the syntax even further and maybe merge the functionality
>> into \startalignment? At the moment we have one command with an
>> argument for alignments:
>>
>> \startalignment [right|middle|left]
>> 	\input knuth
>> \stopalignment
>>
>> however three different command for boxed alignments (furthermore,
>> \startrightaligned works just the opposite of \startalignment[right]):
>>
>> \startrightaligned
>> 	FooBar
>> \stoprightaligned
>>
>> \startmidaligned
>> 	FooBar
>> \stopmidaligned
>>
>> \startleftaligned
>> 	FooBar
>> \stopleftaligned
>>
>> This might be easy to remember for us who still know the
>> \midaligned{} syntax, but I guess for new users it's confusing.
>> Additionally, the difference between the commands is unclear. What
>> about an interface like this:
>>
>> \startlinealignment [right|middle|left]
>> 	FooBar
>> \stoplinealignment
>
> +1

I've added something for you to check.

>> Taking this one step further would be to merge both into one
>> command:
>>
>> \startalignment [align=left, alternative=???]
>> 	\input knuth
>> \stopalignment
>>
>> \startalignment [align=left, alternative=!!!]
>> 	FooBar
>> \stopalignment
>
>
> Not sure if this method is too complicated for a few people.

Indeed,

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 12+ messages in thread

* Re: align and location in \setupcombination
  2012-10-30 18:39         ` Hans Hagen
@ 2012-10-30 19:04           ` Wolfgang Schuster
  2012-10-30 20:49             ` Hans Hagen
  2012-10-31 10:31           ` Alan BRASLAU
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2012-10-30 19:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 30.10.2012 um 19:39 schrieb Hans Hagen <pragma@wxs.nl>:

>>> Additionally, the difference between the commands is unclear. What
>>> about an interface like this:
>>> 
>>> \startlinealignment [right|middle|left]
>>> 	FooBar
>>> \stoplinealignment
>> 
>> +1
> 
> I've added something for you to check.


I found a typo:

\unexpanded\def\leftaligned  {\spac_align_wrapper_handle\v!left  }
-\unexpanded\def\midaligned   {\spac_align_wrapper_handle\v!middle}
+\unexpanded\def\middlealigned{\spac_align_wrapper_handle\v!middle}
\unexpanded\def\rightaligned {\spac_align_wrapper_handle\v!right }
\unexpanded\def\maxaligned   {\spac_align_wrapper_handle\v!max   }

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

* Re: align and location in \setupcombination
  2012-10-30 19:04           ` Wolfgang Schuster
@ 2012-10-30 20:49             ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2012-10-30 20:49 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 30-10-2012 20:04, Wolfgang Schuster wrote:

> I found a typo:

fixed

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 12+ messages in thread

* Re: align and location in \setupcombination
  2012-10-30 18:39         ` Hans Hagen
  2012-10-30 19:04           ` Wolfgang Schuster
@ 2012-10-31 10:31           ` Alan BRASLAU
  1 sibling, 0 replies; 12+ messages in thread
From: Alan BRASLAU @ 2012-10-31 10:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: pragma, Wolfgang Schuster

On Tue, 30 Oct 2012 19:39:33 +0100
Hans Hagen <pragma@wxs.nl> wrote:

> On 30-10-2012 18:57, Wolfgang Schuster wrote:
> 
> > Not all people on the list to read the dev list :)  
> 
> maybe we need a warning (like the mandate 'this site uses cookies' in 
> NL) like 'if you read this message you agree not to complain about an 
> undocumented feature'

So, basically you don't want any complaints at all
(as the list of undocumented features now far outweighs the list of
documented features!) :)

Of course, ConTeXt is "use at your own risk"
even though I find it to be more "use to your great benefit".

Alan
___________________________________________________________________________________
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] 12+ messages in thread

* Re: align and location in \setupcombination
  2012-10-29 12:31 Jeong Dal
@ 2012-10-29 12:59 ` Wolfgang Schuster
  0 siblings, 0 replies; 12+ messages in thread
From: Wolfgang Schuster @ 2012-10-29 12:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.10.2012 um 13:31 schrieb Jeong Dal <haksan@me.com>:

> Dear Marco and Wolfgang,
> 
> Thank you for solutions. 
> 
> I have tried \startalignment … \stopalignment, but it is not working.
> Does it work as same as \midaligned?

No, both commands work different. With \startalignment you can set a different \setupalign
setting for a certain part of your document and it does work for longer text but \midaligned
works only for content which fits on a single line. In the following example you can see
the text in the alignment environment is broken across line but the text in \midaligned is
placed in one long line which exceeds the page dimensions.

\starttext

\startalignment[middle]
\input ward
\stopalignment

\blank

\midaligned{\input ward }

\stoptext

> \startcontent … \stopcontent, \startcaption … \stopcaption seem to me a new commands. 
> Is every command in ConTeXt changed as a form of "\start … \stop"?

No, not all commands are available in a start/stop form and even when it doesn’t
mean you can replace a command with a environment, e.g. \quotation{…} is
different from \startquotation … \stopquotation but there will be more commands
in the future which can be used as \start… and \stop…

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

* Re: align and location in \setupcombination
@ 2012-10-29 12:31 Jeong Dal
  2012-10-29 12:59 ` Wolfgang Schuster
  0 siblings, 1 reply; 12+ messages in thread
From: Jeong Dal @ 2012-10-29 12:31 UTC (permalink / raw)
  To: ntg-context

Dear Marco and Wolfgang,

Thank you for solutions. 

I have tried \startalignment … \stopalignment, but it is not working.
Does it work as same as \midaligned?

\startcontent … \stopcontent, \startcaption … \stopcaption seem to me a new commands. 
Is every command in ConTeXt changed as a form of "\start … \stop"?

Thank you again.

Best regards,

Dalyoung

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

end of thread, other threads:[~2012-10-31 10:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 11:38 align and location in \setupcombination Jeong Dal
2012-10-28 14:59 ` Marco Patzer
2012-10-28 15:24   ` Wolfgang Schuster
2012-10-30 12:01   ` Wolfgang Schuster
2012-10-30 12:36     ` Marco Patzer
2012-10-30 17:57       ` Wolfgang Schuster
2012-10-30 18:39         ` Hans Hagen
2012-10-30 19:04           ` Wolfgang Schuster
2012-10-30 20:49             ` Hans Hagen
2012-10-31 10:31           ` Alan BRASLAU
2012-10-29 12:31 Jeong Dal
2012-10-29 12:59 ` 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).