Re: [NTG-context] \setupmarginrules

2006-03-30 Thread Willi Egger
Hi Taco (the pretended Vit) and Vit,

I had to look tiwce, but then I had to smile!

Willil

Taco Hoekwater wrote:

>Vit Zyka wrote:
>  
>
>>   \dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>>
>>
>
>Taco Hoekwater wrote:
>  
>
>>   \dimen4=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>>
>>
>
>That's funny ;)
>
>Cheers, Taco
>
>___
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>  
>
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-29 Thread Hans Hagen
frantisek holop wrote:
> hmm, on Tue, Mar 28, 2006 at 07:12:18PM +0200, Hans Hagen said that
>   
>> \def\doalinealijn#1#2%
>>  {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
>> {\linewidth\getvalue{\??al#2\the\alteller\c!rulethickness}%
>>  \scratchdimen#1%
>>  \advance\scratchdimen-\linewidth
>>  \divide\scratchdimen \plustwo
>>  \hskip\scratchdimen
>>  \vrule\!!width\linewidth
>>  \hskip\scratchdimen}
>> {\hskip#1}}
>> 
>
> excuse my silly question, but what am i to do now?
> replace core-mis.tex in my context installation and
> also add the \doalinealijn macro to my .tex file?
>   
replace core-mis and remake the format 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread frantisek holop
hmm, on Tue, Mar 28, 2006 at 07:12:18PM +0200, Hans Hagen said that
> \def\doalinealijn#1#2%
>  {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
> {\linewidth\getvalue{\??al#2\the\alteller\c!rulethickness}%
>  \scratchdimen#1%
>  \advance\scratchdimen-\linewidth
>  \divide\scratchdimen \plustwo
>  \hskip\scratchdimen
>  \vrule\!!width\linewidth
>  \hskip\scratchdimen}
> {\hskip#1}}

excuse my silly question, but what am i to do now?
replace core-mis.tex in my context installation and
also add the \doalinealijn macro to my .tex file?

-f
-- 
words are not food, though sometimes we must eat them.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Hans Hagen
Vit Zyka wrote:
> Taco Hoekwater wrote:
>   
>> Vit Zyka wrote:
>>
>> 
>>>   \dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>>>   
>> Taco Hoekwater wrote:
>>
>> 
>>>   \dimen4=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>>>   
>> That's funny ;)
>>
>> Cheers, Taco
>> 
>
> Yes funny. Even line position is the same. But why 4? I know: why not.
>
> Will be move to distro? (Indifferent which version.) Old code contained 
> buggy space calculation and the rule position, I think.
>
>   
well, this feature needs an overhaul anyway 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Vit Zyka
Taco Hoekwater wrote:
> 
> Vit Zyka wrote:
> 
>>   \dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
> 
> 
> Taco Hoekwater wrote:
> 
>>   \dimen4=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
> 
> 
> That's funny ;)
> 
> Cheers, Taco

Yes funny. Even line position is the same. But why 4? I know: why not.

Will be move to distro? (Indifferent which version.) Old code contained 
buggy space calculation and the rule position, I think.

Vit
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Hans Hagen
Vit Zyka wrote:
> Willi Egger wrote:
>   
>> Hi Vit!
>>
>> Thanks for this patch. Do you know why the rulethickness must be given 
>> in integer dimension. e.g. 2.5pt will cause an error, telling that a 
>> wrong dimension is used.
>>
>> Willi
>> 
>
> Due to my fault. Sorry. This is a little bit better solution:
>
> ---
> \defineparagraphs   [poem][n=2,distance=20pt]
> \setupparagraphs[poem][1][width=.25\textwidth]
> \setupparagraphs[poem][2][rule=on,rulethickness=5.5pt]
>
> \unprotected
> \def\doalinealijn#1#2%
>{\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
>   {\dimen2=#1\relax
>\dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>\hskip.5\dimen2
> %  \hskip-\linewidth
>\hskip-.5\dimen3 % VZ
> %  \vrule\!!width\linewidth
>\vrule\!!width\dimen3 % VZ
>\hskip-.5\dimen3 % VZ
>\hskip.5\dimen2}
>   {\hskip#1}}
>
> \starttext
> \startpoem
> \input knuth
> \nextpoem
> \input knuth
> \stoppoem
> \stoptext
> 
>   
don't use dimen 3 locally (tex convention, has to do with stack build-up) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Taco Hoekwater


Vit Zyka wrote:
>\dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ

Taco Hoekwater wrote:
>\dimen4=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ

That's funny ;)

Cheers, Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Vit Zyka
Willi Egger wrote:
> Hi Vit!
> 
> Thanks for this patch. Do you know why the rulethickness must be given 
> in integer dimension. e.g. 2.5pt will cause an error, telling that a 
> wrong dimension is used.
> 
> Willi

Due to my fault. Sorry. This is a little bit better solution:

---
\defineparagraphs   [poem][n=2,distance=20pt]
\setupparagraphs[poem][1][width=.25\textwidth]
\setupparagraphs[poem][2][rule=on,rulethickness=5.5pt]

\unprotected
\def\doalinealijn#1#2%
   {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
  {\dimen2=#1\relax
   \dimen3=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
   \hskip.5\dimen2
%  \hskip-\linewidth
   \hskip-.5\dimen3 % VZ
%  \vrule\!!width\linewidth
   \vrule\!!width\dimen3 % VZ
   \hskip-.5\dimen3 % VZ
   \hskip.5\dimen2}
  {\hskip#1}}

\starttext
\startpoem
\input knuth
\nextpoem
\input knuth
\stoppoem
\stoptext


Vit

> Vit Zyka wrote:
> 
> 
>>frantisek holop wrote:
>> 
>>
>>
>>>hmm, on Sun, Mar 26, 2006 at 10:12:01PM +0200, Vit Zyka said that
>>>
>>>   
>>>
>>>
>>>>>\defineparagraphs   [poem][n=2]
>>>>>\setupparagraphs[poem][1][width=.25\textwidth]
>>>>>\setupparagraphs[poem][2][rule=on]
>>>>>
>>>>>\setupmarginrules   [rulethickness=5pt]
>>>>>   
>>>>>
>>>>
>>>>this sets rules for margins. I guess the solution
>>>>
>>>>\setupparagraphs[poem][2][rule=on,rulethickness=5pt]
>>>> 
>>>>
>>>
>>>sorry, i forgot to add, that i tried this one also :)
>>>seemed logical, but the result is the same.
>>>
>>>-f
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Taco Hoekwater

Hi Willi (and Vit),

Willi Egger wrote:
> Hi Vit!
> 
> Thanks for this patch. Do you know why the rulethickness must be given 
> in integer dimension. e.g. 2.5pt will cause an error, telling that a 
> wrong dimension is used.

(I'll pretend to be Vit)

That is because in that case, it expands to  \hskip -.52.5pt

Try this:

   \unprotected
   \def\doalinealijn#1#2%
 {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
   {\dimen2=#1\relax
\dimen4=\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
\hskip.5\dimen2
\hskip-.5\dimen4 % TH
\vrule\!!width\dimen4 % TH
\hskip-.5\dimen4 % TH
\hskip.5\dimen2}
   {\hskip#1}}

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-28 Thread Willi Egger
Hi Vit!

Thanks for this patch. Do you know why the rulethickness must be given 
in integer dimension. e.g. 2.5pt will cause an error, telling that a 
wrong dimension is used.

Willi

Vit Zyka wrote:

>frantisek holop wrote:
>  
>
>>hmm, on Sun, Mar 26, 2006 at 10:12:01PM +0200, Vit Zyka said that
>>
>>
>>
>>>>\defineparagraphs   [poem][n=2]
>>>>\setupparagraphs[poem][1][width=.25\textwidth]
>>>>\setupparagraphs[poem][2][rule=on]
>>>>
>>>>\setupmarginrules   [rulethickness=5pt]
>>>>
>>>>
>>>this sets rules for margins. I guess the solution
>>>
>>>\setupparagraphs[poem][2][rule=on,rulethickness=5pt]
>>>  
>>>
>>sorry, i forgot to add, that i tried this one also :)
>>seemed logical, but the result is the same.
>>
>>-f
>>
>>
>
>OK, there is a patch (with minor correction):
>
>---
>\defineparagraphs   [poem][n=2,distance=20pt]
>\setupparagraphs[poem][1][width=.25\textwidth]
>\setupparagraphs[poem][2][rule=on,rulethickness=10pt]
>
>\unprotected
>\def\doalinealijn#1#2%
>   {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
>  {\dimen2=#1\relax
>   \hskip.5\dimen2
>%  \hskip-\linewidth
>   \hskip-.5\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>%  \vrule\!!width\linewidth
>   \vrule\!!width\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>   \hskip-.5\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
>   \hskip.5\dimen2}
>  {\hskip#1}}
>
>\starttext
>\startpoem
>\input knuth
>\nextpoem
>\input knuth
>\stoppoem
>\stoptext
>-
>
>for distro it also should be accompanied by
>
>   \c!rulethickness=\linewidth,
>
>in \def\dodefineparagraphs[#1][#2]%
>
>Vit
>___
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>  
>
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-27 Thread Vit Zyka
frantisek holop wrote:
> hmm, on Sun, Mar 26, 2006 at 10:12:01PM +0200, Vit Zyka said that
> 
>>>\defineparagraphs   [poem][n=2]
>>>\setupparagraphs[poem][1][width=.25\textwidth]
>>>\setupparagraphs    [poem][2][rule=on]
>>>
>>>\setupmarginrules   [rulethickness=5pt]
>>
>>this sets rules for margins. I guess the solution
>>
>>\setupparagraphs[poem][2][rule=on,rulethickness=5pt]
> 
> 
> sorry, i forgot to add, that i tried this one also :)
> seemed logical, but the result is the same.
> 
> -f

OK, there is a patch (with minor correction):

---
\defineparagraphs   [poem][n=2,distance=20pt]
\setupparagraphs[poem][1][width=.25\textwidth]
\setupparagraphs[poem][2][rule=on,rulethickness=10pt]

\unprotected
\def\doalinealijn#1#2%
   {\doifelsevalue{\??al#2\the\alteller\c!rule}\v!on
  {\dimen2=#1\relax
   \hskip.5\dimen2
%  \hskip-\linewidth
   \hskip-.5\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
%  \vrule\!!width\linewidth
   \vrule\!!width\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
   \hskip-.5\getvalue{\??al#2\the\alteller\c!rulethickness}% VZ
   \hskip.5\dimen2}
  {\hskip#1}}

\starttext
\startpoem
\input knuth
\nextpoem
\input knuth
\stoppoem
\stoptext
-

for distro it also should be accompanied by

   \c!rulethickness=\linewidth,

in \def\dodefineparagraphs[#1][#2]%

Vit
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-26 Thread frantisek holop
hmm, on Sun, Mar 26, 2006 at 10:12:01PM +0200, Vit Zyka said that
> > \defineparagraphs   [poem][n=2]
> > \setupparagraphs[poem][1][width=.25\textwidth]
> > \setupparagraphs[poem][2][rule=on]
> > 
> > \setupmarginrules   [rulethickness=5pt]
> 
> this sets rules for margins. I guess the solution
> 
> \setupparagraphs[poem][2][rule=on,rulethickness=5pt]

sorry, i forgot to add, that i tried this one also :)
seemed logical, but the result is the same.

-f
-- 
it is better to be hated than to be ignored.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupmarginrules

2006-03-26 Thread Vit Zyka
frantisek holop wrote:
> hmm, on Fri, Mar 17, 2006 at 07:49:57PM +0100, Willi Egger said that
> 
>>Hi Frantisek
>>
>>The correct command is \setupmarginrules[rulethickness=2pt]. The option 
>>is rulethickness and it takes a dimension.
> 
> 
> i have tried this and it doesn't seem to work.
> 
> \defineparagraphs   [poem][n=2]
> \setupparagraphs[poem][1][width=.25\textwidth]
> \setupparagraphs[poem][2][rule=on]
> 
> \setupmarginrules   [rulethickness=5pt]

Hi,

this sets rules for margins. I guess the solution

\setupparagraphs[poem][2][rule=on,rulethickness=5pt]

Vit

> the rule in front of the 2nd column (poem[2]) still
> has the default thickness.
> 
> -f
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \setupmarginrules (was: Re: \page inside a block)

2006-03-26 Thread frantisek holop
hmm, on Fri, Mar 17, 2006 at 07:49:57PM +0100, Willi Egger said that
> Hi Frantisek
> 
> The correct command is \setupmarginrules[rulethickness=2pt]. The option 
> is rulethickness and it takes a dimension.

i have tried this and it doesn't seem to work.

\defineparagraphs   [poem][n=2]
\setupparagraphs[poem][1][width=.25\textwidth]
\setupparagraphs[poem][2][rule=on]

\setupmarginrules   [rulethickness=5pt]

the rule in front of the 2nd column (poem[2]) still
has the default thickness.

-f
-- 
strength of mind: person who can eat one salted peanut.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context