ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu)
       [not found] <mailman.1424.1275676267.4277.ntg-context@ntg.nl>
@ 2010-06-05  2:56 ` Adam Fuller
  2010-06-05 11:12   ` Hongwen Qiu
  2010-06-05 17:30 ` Wrong spacing before and after commas in math(?) Warrence
  1 sibling, 1 reply; 7+ messages in thread
From: Adam Fuller @ 2010-06-05  2:56 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]



On 5/06/2010 6:31 a.m., ntg-context-request@ntg.nl wrote:
>     3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu)

hi hongwen,
thanks for taking an interest.

my initial post had a mistake:  i meant to refer to the /Metafun/ manual, not the Metapost manual.  that probably didn't help.

i guess what i should have said is, i know that pxy can give me the bounding /box/ (the rectangle with the maximum horizontal and vertical extents of its contents, be they set in horizontal or vertical mode), but can it give me the subset of that, the bounding /path/, if you will, when the contents are text which flows over several lines.  the bounding /path/ may not be rectangular, although it will be something like the union of the bounding boxes of the text's individual lines.

i think if you look at the correct reference, the difference of the effects is clear.  i think the challenge is that you don't know where the line breaks will occur until you typeset it.   --adam

[-- Attachment #2: adam_fuller.vcf --]
[-- Type: text/x-vcard, Size: 446 bytes --]

begin:vcard
fn:Adam Fuller
n:Fuller;Adam
org:University of Canterbury;Mechanical Engineering
adr:Private Bag 4800;;Intersection of Creyke Rd and Engineering Rd;Christchurch;Canterbury;8041;New Zealand
email;internet:adam.fuller@pg.canterbury.ac.nz
title:Ph.D. candidate
tel;work:(+64) 3 364 2987 ext. 8390
tel;fax:(+64) 3 364 2078
tel;home:(+64) 3 366 3455
tel;cell:(+64) 21 0254 8677
url:http://www.mech.canterbury.ac.nz/
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu)
  2010-06-05  2:56 ` 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu) Adam Fuller
@ 2010-06-05 11:12   ` Hongwen Qiu
  0 siblings, 0 replies; 7+ messages in thread
From: Hongwen Qiu @ 2010-06-05 11:12 UTC (permalink / raw)
  To: ntg-context


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

? 2010?06?05? 10:56, Adam Fuller ??:
> my initial post had a mistake:  i meant to refer to the /Metafun/ 
> manual, not the Metapost manual.  that probably didn't help.
Actually, I know that you mean the /Metafun/ manual.
> i guess what i should have said is, i know that pxy can give me the 
> bounding /box/ (the rectangle with the maximum horizontal and vertical 
> extents of its contents, be they set in horizontal or vertical mode), 
> but can it give me the subset of that, the bounding /path/, if you 
> will, when the contents are text which flows over several lines.  the 
> bounding /path/ may not be rectangular, although it will be something 
> like the union of the bounding boxes of the text's individual lines.
So now, I understand what mean.
> i think if you look at the correct reference, the difference of the 
> effects is clear.  i think the challenge is that you don't know where 
> the line breaks will occur until you typeset it.   --adam 
And the source code from the manual may help you:

\setupMPvariables[mpos:box][linecolor=darkred]
\setupMPvariables[mpos:par][linecolor=darkred]

\startpositionoverlay{backgraphics}
   \setMPpositiongraphic{A-3}{mpos:box}{self=A-3}
   \setMPpositiongraphic{A-4}{mpos:box}{self=A-4}
   \setMPpositiongraphic{b:A-5}{mpos:par}{self=A-5}
   \setMPpositiongraphic{b:A-6}{mpos:par}{self=A-6}
\stoppositionoverlay

\fpos {A-5} Because the text must be laid on top of
the graphic, the graphic must precede the first word in the
typeset stream or it must be positioned on a separate layer.
In the latter case it can be calculated directly after the
paragraph is typeset, but in the former case a second pass
is needed. \tpos {A-5}

Given the above code, I think you can get some information about the 
horizontal and vertical pos of texts from \fpos and \tpos. And the 
mpos:par is defined in anch-pgr.mkii and anch-pgr.mkiv. But I haven't 
dig into the code which implement mpos:par. Hope you can find useful 
information there.

And hope the following message I just searched out will help you too:

http://archive.contextgarden.net/message/20080107.024554.314d9fee.ca.html

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

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: Wrong spacing before and after commas in math(?)
       [not found] <mailman.1424.1275676267.4277.ntg-context@ntg.nl>
  2010-06-05  2:56 ` 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu) Adam Fuller
@ 2010-06-05 17:30 ` Warrence
  1 sibling, 0 replies; 7+ messages in thread
From: Warrence @ 2010-06-05 17:30 UTC (permalink / raw)
  To: ntg-context

On Fri, 4 Jun 2010, "Aditya Mahajan" wrote:
 > Does
 >
 > \setupmathematics[autopunctuation=no] % or yes
 >
 > give better result? (Are you using MKIV or MKII)?
 >
 > Aditya

\setupmathematics[autopunctuation=no] seems to fix the spaces before the 
x, but "...," is still bit ugly. I'm using MkIV, sorry for not 
mentioning it.


 > the default setup is for coordinates
 >
 > eventually we will have layer that implements settings for specific
 > fields as each demand their own rules (same for symbols)
 >
 > Hans

Do you mean coordinates like "a vector (x,y,z)"? I still think that the 
extra space before "y" and "z" would be appreciated. But nevertheless, 
different settings for different needs sounds like a good idea.

Thank you,
Stefan.
___________________________________________________________________________________
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] 7+ messages in thread

* Re: Wrong spacing before and after commas in math(?)
  2010-06-04 18:55     ` Yury G. Kudryashov
@ 2010-06-04 19:37       ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2010-06-04 19:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yury G. Kudryashov

On 4-6-2010 8:55, Yury G. Kudryashov wrote:
> Aditya Mahajan wrote:
>
>> On Fri, 4 Jun 2010, "Stefan Müller" wrote:
>>
>>> if I'm typesetting for example $(a,x,\dots,b)$ I see that the space
>>> before the x is too small.
>> Does
>>
>> \setupmathematics[autopunctuation=no] % or yes
>>
>> give better result? (Are you using MKIV or MKII)?
> I had a similar issue with MKIV. autopunctuation=no fixed it for me.

the default setup is for coordinates

eventually we will have layer that implements settings for specific 
fields as each demand their own rules (same for symbols)

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

* Re: Wrong spacing before and after commas in math(?)
  2010-06-04 16:28   ` Aditya Mahajan
@ 2010-06-04 18:55     ` Yury G. Kudryashov
  2010-06-04 19:37       ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Yury G. Kudryashov @ 2010-06-04 18:55 UTC (permalink / raw)
  To: ntg-context

Aditya Mahajan wrote:

> On Fri, 4 Jun 2010, "Stefan Müller" wrote:
> 
>> if I'm typesetting for example $(a,x,\dots,b)$ I see that the space
>> before the x is too small.
> Does
> 
> \setupmathematics[autopunctuation=no] % or yes
> 
> give better result? (Are you using MKIV or MKII)?
I had a similar issue with MKIV. autopunctuation=no fixed it for me.


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

* Re: Wrong spacing before and after commas in math(?)
  2010-06-04 14:52 ` "Stefan Müller"
@ 2010-06-04 16:28   ` Aditya Mahajan
  2010-06-04 18:55     ` Yury G. Kudryashov
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2010-06-04 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 725 bytes --]

On Fri, 4 Jun 2010, "Stefan Müller" wrote:

> Hi,
>
> if I'm typesetting for example $(a,x,\dots,b)$ I see that the space before the x is too small. It should be bigger than the space after the x. I could work around it by typing $a,\,x,\dots,\,b$ but this is somewhat inconvenient and even a bit too much spacing...
>
> On the other hand, the spacing before \dots is just right, but the spacing after \dots is too small: the spaces between commas and periods ",...," should all be the same.
>
> Is this a bug? Can this be changed by a global option or something? Thanks for any help in advance.

Does

\setupmathematics[autopunctuation=no] % or yes

give better result? (Are you using MKIV or MKII)?

Aditya

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Wrong spacing before and after commas in math(?)
       [not found] <mailman.1.1275559202.15201.ntg-context@ntg.nl>
@ 2010-06-04 14:52 ` "Stefan Müller"
  2010-06-04 16:28   ` Aditya Mahajan
  0 siblings, 1 reply; 7+ messages in thread
From: "Stefan Müller" @ 2010-06-04 14:52 UTC (permalink / raw)
  To: ntg-context

Hi,

if I'm typesetting for example $(a,x,\dots,b)$ I see that the space before the x is too small. It should be bigger than the space after the x. I could work around it by typing $a,\,x,\dots,\,b$ but this is somewhat inconvenient and even a bit too much spacing...

On the other hand, the spacing before \dots is just right, but the spacing after \dots is too small: the spaces between commas and periods ",...," should all be the same.

Is this a bug? Can this be changed by a global option or something? Thanks for any help in advance.

Best regards,
Stefan
-- 

_______
ey, leute, ich hab so lange gebraucht um mir plan a auszudenken, fragt jetzt doch nicht auch 
noch nach plan b!

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2010-06-05 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1424.1275676267.4277.ntg-context@ntg.nl>
2010-06-05  2:56 ` 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu) Adam Fuller
2010-06-05 11:12   ` Hongwen Qiu
2010-06-05 17:30 ` Wrong spacing before and after commas in math(?) Warrence
     [not found] <mailman.1.1275559202.15201.ntg-context@ntg.nl>
2010-06-04 14:52 ` "Stefan Müller"
2010-06-04 16:28   ` Aditya Mahajan
2010-06-04 18:55     ` Yury G. Kudryashov
2010-06-04 19:37       ` Hans Hagen

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