ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setupbars
@ 2012-07-08 20:24 Meer, H. van der
  2012-07-08 20:44 ` setupbars Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: Meer, H. van der @ 2012-07-08 20:24 UTC (permalink / raw)
  To: ConTeXt NTG

This gives an error:

\starttext
\setupbars[rulethickness=4pt]
\stoptext

! LuaTeX error <main ctx instance>:1: malformed number near '4pt'.
ConTeXt  ver: 2012.07.04 23:48 MKIV  fmt: 2012.7.6  int: english/english

Elsewhere this is ok, as for example in: \framed[rulethickness=4pt]{}
Strangely in node-rul.mkiv I see: \c!rulethickness=2.5
whereas in pack-rul.mkiv:  \c!rulethickness=\linewidth

I am inclined to spot an error here, or at least an inconsistency in the API.

Hans van der Meer



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

* Re: setupbars
  2012-07-08 20:24 setupbars Meer, H. van der
@ 2012-07-08 20:44 ` Wolfgang Schuster
  2012-07-08 21:40   ` setupbars Meer, H. van der
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2012-07-08 20:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 08.07.2012 um 22:24 schrieb Meer, H. van der:

> This gives an error:
> 
> \starttext
> \setupbars[rulethickness=4pt]
> \stoptext
> 
> ! LuaTeX error <main ctx instance>:1: malformed number near '4pt'.
> ConTeXt  ver: 2012.07.04 23:48 MKIV  fmt: 2012.7.6  int: english/english
> 
> Elsewhere this is ok, as for example in: \framed[rulethickness=4pt]{}
> Strangely in node-rul.mkiv I see: \c!rulethickness=2.5
> whereas in pack-rul.mkiv:  \c!rulethickness=\linewidth
> 
> I am inclined to spot an error here, or at least an inconsistency in the API.


\setupbars[rulethickness=0.5]

\starttext

\setupbars[unit=ex]\underbar{ex}

\setupbars[unit=em]\underbar{em}

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

* Re: setupbars
  2012-07-08 20:44 ` setupbars Wolfgang Schuster
@ 2012-07-08 21:40   ` Meer, H. van der
  2012-07-09  7:09     ` setupbars Meer, H. van der
  0 siblings, 1 reply; 10+ messages in thread
From: Meer, H. van der @ 2012-07-08 21:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Thansk,

I see. \setupbars doesn't give a hit on ConTeXt-wiki, so I couldn't find this.
Still I dare say, it is a pity that [rulethickness=] gets a different meaning here than elsewhere. I would like to ask to reconsider, because I strongly believe in consistency in the API (though I am ready to admit that it is not easy to maintain and confess guilty myself at more than one occasion). That is either change all rulethickness's everywhere to this scheme or otherwise. Or did this already happened and did I miss that? And of course, the easiest solution would be if the code itself could sort out the difference between having been given a fraction or a length.

Hans van der Meer



On 8 jul. 2012, at 22:44, Wolfgang Schuster wrote:


Am 08.07.2012 um 22:24 schrieb Meer, H. van der:

This gives an error:

\starttext
\setupbars[rulethickness=4pt]
\stoptext

! LuaTeX error <main ctx instance>:1: malformed number near '4pt'.
ConTeXt  ver: 2012.07.04 23:48 MKIV  fmt: 2012.7.6  int: english/english

Elsewhere this is ok, as for example in: \framed[rulethickness=4pt]{}
Strangely in node-rul.mkiv I see: \c!rulethickness=2.5
whereas in pack-rul.mkiv:  \c!rulethickness=\linewidth

I am inclined to spot an error here, or at least an inconsistency in the API.


\setupbars[rulethickness=0.5]

\starttext

\setupbars[unit=ex]\underbar{ex}

\setupbars[unit=em]\underbar{em}

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl<mailto: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
___________________________________________________________________________________


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

* Re: setupbars
  2012-07-08 21:40   ` setupbars Meer, H. van der
@ 2012-07-09  7:09     ` Meer, H. van der
  2012-07-09  7:26       ` setupbars Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: Meer, H. van der @ 2012-07-09  7:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

There is still an issue here.

\setupbars[unit=mm,rulethickness=1]
AB\startbar[underbar]CD\stopbar EF\crlf
\setupbars[unit=ex,rulethickness=1]
AB\startbar[underbar]CD\stopbar EF\crlf
\setupbars[unit=pt,rulethickness=1]
AB\startbar[underbar]CD\stopbar EF\crlf

The first and third setup do not give an underbar, the second does.
Question: why does "ex" qualify as a dimension unit but "pt" and "mm" do not? Sounds strange.

If I want an underbar exactly 1mm or 3pt's thick, why isn't that made possible? Doing the math myself is no option, becaus ex will not be known beforehand.

Hans van der Meer


On 8 jul. 2012, at 23:40, Meer, H. van der wrote:

Thansk,

I see. \setupbars doesn't give a hit on ConTeXt-wiki, so I couldn't find this.
Still I dare say, it is a pity that [rulethickness=] gets a different meaning here than elsewhere. I would like to ask to reconsider, because I strongly believe in consistency in the API (though I am ready to admit that it is not easy to maintain and confess guilty myself at more than one occasion). That is either change all rulethickness's everywhere to this scheme or otherwise. Or did this already happened and did I miss that? And of course, the easiest solution would be if the code itself could sort out the difference between having been given a fraction or a length.

Hans van der Meer



On 8 jul. 2012, at 22:44, Wolfgang Schuster wrote:


Am 08.07.2012 um 22:24 schrieb Meer, H. van der:

This gives an error:

\starttext
\setupbars[rulethickness=4pt]
\stoptext

! LuaTeX error <main ctx instance>:1: malformed number near '4pt'.
ConTeXt  ver: 2012.07.04 23:48 MKIV  fmt: 2012.7.6  int: english/english

Elsewhere this is ok, as for example in: \framed[rulethickness=4pt]{}
Strangely in node-rul.mkiv I see: \c!rulethickness=2.5
whereas in pack-rul.mkiv:  \c!rulethickness=\linewidth

I am inclined to spot an error here, or at least an inconsistency in the API.


\setupbars[rulethickness=0.5]

\starttext

\setupbars[unit=ex]\underbar{ex}

\setupbars[unit=em]\underbar{em}

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl<http://www.pragma-ade.nl/> / http://tex.aanhet.net<http://tex.aanhet.net/>
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net<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<mailto: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
___________________________________________________________________________________


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

[-- Attachment #2: rule.pdf --]
[-- Type: application/pdf, Size: 5269 bytes --]

[-- Attachment #3: 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] 10+ messages in thread

* Re: setupbars
  2012-07-09  7:09     ` setupbars Meer, H. van der
@ 2012-07-09  7:26       ` Wolfgang Schuster
  2012-07-09  7:38         ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
                           ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2012-07-09  7:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 09.07.2012 um 09:09 schrieb Meer, H. van der:

> There is still an issue here.
> 
> \setupbars[unit=mm,rulethickness=1]
> AB\startbar[underbar]CD\stopbar EF\crlf
> \setupbars[unit=ex,rulethickness=1]
> AB\startbar[underbar]CD\stopbar EF\crlf
> \setupbars[unit=pt,rulethickness=1]
> AB\startbar[underbar]CD\stopbar EF\crlf
> 
> The first and third setup do not give an underbar, the second does.
> Question: why does "ex" qualify as a dimension unit but "pt" and "mm" do not? Sounds strange.
> 
> If I want an underbar exactly 1mm or 3pt's thick, why isn't that made possible? Doing the math myself is no option, becaus ex will not be known beforehand.

The underlying Lua code accepts only “ex” and “em” as valid options for the “unit” key but I would also vote to accept either “pt”, “mm” etc. as unit value or to allow “rulethickness=…pt”.

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

* Re: setupbars
  2012-07-09  7:26       ` setupbars Wolfgang Schuster
@ 2012-07-09  7:38         ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-07-09 15:35         ` setupbars Bill Meahan
  2012-07-09 22:16         ` setupbars Hans Hagen
  2 siblings, 0 replies; 10+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-07-09  7:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 09 Jul 2012 09:26:51 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> to allow “rulethickness=…pt”.

+1

Lukas

>
> Wolfgang


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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

* Re: setupbars
  2012-07-09  7:26       ` setupbars Wolfgang Schuster
  2012-07-09  7:38         ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-07-09 15:35         ` Bill Meahan
  2012-07-09 22:16         ` setupbars Hans Hagen
  2 siblings, 0 replies; 10+ messages in thread
From: Bill Meahan @ 2012-07-09 15:35 UTC (permalink / raw)
  To: ntg-context

On Mon, 9 Jul 2012 09:26:51 +0200
Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>
> 
> The underlying Lua code accepts only “ex” and “em” as valid options
> for the “unit” key but I would also vote to accept either “pt”, “mm”
> etc. as unit value or to allow “rulethickness=…pt”.
> 
> Wolfgang

It proposal has my vote!


-- 
Bill Meahan, Westland, Michigan USA

“Writing is a combination of intangible
  creative fantasy and appallingly
  hard work.”

          —Anthony Powell


This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.
___________________________________________________________________________________
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] 10+ messages in thread

* Re: setupbars
  2012-07-09  7:26       ` setupbars Wolfgang Schuster
  2012-07-09  7:38         ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
  2012-07-09 15:35         ` setupbars Bill Meahan
@ 2012-07-09 22:16         ` Hans Hagen
  2012-07-10 13:25           ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
  2 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2012-07-09 22:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 9-7-2012 09:26, Wolfgang Schuster wrote:
>
> Am 09.07.2012 um 09:09 schrieb Meer, H. van der:
>
>> There is still an issue here.
>>
>> \setupbars[unit=mm,rulethickness=1]
>> AB\startbar[underbar]CD\stopbar EF\crlf
>> \setupbars[unit=ex,rulethickness=1]
>> AB\startbar[underbar]CD\stopbar EF\crlf
>> \setupbars[unit=pt,rulethickness=1]
>> AB\startbar[underbar]CD\stopbar EF\crlf
>>
>> The first and third setup do not give an underbar, the second does.
>> Question: why does "ex" qualify as a dimension unit but "pt" and "mm" do not? Sounds strange.
>>
>> If I want an underbar exactly 1mm or 3pt's thick, why isn't that made possible? Doing the math myself is no option, becaus ex will not be known beforehand.
>
> The underlying Lua code accepts only “ex” and “em” as valid options for the “unit” key but I would also vote to accept either “pt”, “mm” etc. as unit value or to allow “rulethickness=…pt”.

actually it does accept more units but they were pretty small (needed an 
1/u)

anyhow, in the next beta we can do

\starttext

     \setupbars[unit=mm,rulethickness=1] 
bar\startbar[underbar]foo\stopbar bar\blank
     \setupbars[unit=ex,rulethickness=1] 
bar\startbar[underbar]foo\stopbar bar\blank
     \setupbars[unit=pt,rulethickness=1] 
bar\startbar[underbar]foo\stopbar bar\blank
     \setupbars[unit=pt,rulethickness=10pt] 
bar\startbar[underbar]foo\stopbar bar\blank

\stoptext

but someone has do document it

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

* Re: setupbars
  2012-07-09 22:16         ` setupbars Hans Hagen
@ 2012-07-10 13:25           ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-07-10 14:31             ` setupbars Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-07-10 13:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... OK -

On Tue, 10 Jul 2012 00:16:08 +0200, Hans Hagen <pragma@wxs.nl> wrote:

> actually it does accept more units but they were pretty small (needed an
> 1/u)
>
> anyhow, in the next beta we can do
>
> \starttext
>
>      \setupbars[unit=mm,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
>      \setupbars[unit=ex,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
>      \setupbars[unit=pt,rulethickness=1] bar\startbar[underbar]foo\stopbar bar\blank
>      \setupbars[unit=pt,rulethickness=10pt] bar\startbar[underbar]foo\stopbar bar\blank
>
> \stoptext

Although it's meaningless, what would

\setupbars[unit=mm,rulethickness=10pt] bar\startbar[underbar]foo\stopbar bar\blank
                 ^^                 ^^

produce?

Will the following setups be valid in the next beta?

\setupbars[rulethickness=1mm]
\setupbars[rulethickness=1cm]
\setupbars[rulethickness=1in]
\setupbars[rulethickness=1ex]
\setupbars[rulethickness=1pt]
\setupbars[rulethickness=1bp]

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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

* Re: setupbars
  2012-07-10 13:25           ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-07-10 14:31             ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2012-07-10 14:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10-7-2012 15:25, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> ... OK -
>
> On Tue, 10 Jul 2012 00:16:08 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>> actually it does accept more units but they were pretty small (needed an
>> 1/u)
>>
>> anyhow, in the next beta we can do
>>
>> \starttext
>>
>>      \setupbars[unit=mm,rulethickness=1]
>> bar\startbar[underbar]foo\stopbar bar\blank
>>      \setupbars[unit=ex,rulethickness=1]
>> bar\startbar[underbar]foo\stopbar bar\blank
>>      \setupbars[unit=pt,rulethickness=1]
>> bar\startbar[underbar]foo\stopbar bar\blank
>>      \setupbars[unit=pt,rulethickness=10pt]
>> bar\startbar[underbar]foo\stopbar bar\blank
>>
>> \stoptext
>
> Although it's meaningless, what would
>
> \setupbars[unit=mm,rulethickness=10pt] bar\startbar[underbar]foo\stopbar
> bar\blank
>                  ^^                 ^^
>
> produce?
>
> Will the following setups be valid in the next beta?
>
> \setupbars[rulethickness=1mm]
> \setupbars[rulethickness=1cm]
> \setupbars[rulethickness=1in]
> \setupbars[rulethickness=1ex]
> \setupbars[rulethickness=1pt]
> \setupbars[rulethickness=1bp]

the unit is uses for consistent stacking of nested bars; in the case of 
a unit with rulethickness that one is used for the rules, otherwise the 
general unit is applied to the rulethickness

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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08 20:24 setupbars Meer, H. van der
2012-07-08 20:44 ` setupbars Wolfgang Schuster
2012-07-08 21:40   ` setupbars Meer, H. van der
2012-07-09  7:09     ` setupbars Meer, H. van der
2012-07-09  7:26       ` setupbars Wolfgang Schuster
2012-07-09  7:38         ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
2012-07-09 15:35         ` setupbars Bill Meahan
2012-07-09 22:16         ` setupbars Hans Hagen
2012-07-10 13:25           ` setupbars Procházka Lukáš Ing. - Pontex s. r. o.
2012-07-10 14:31             ` setupbars 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).