[NTG-context] \setupmarginrules

Hans Hagen pragma at wxs.nl
Tue Mar 28 19:12:18 CEST 2006


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}}
>   
\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}}

btw, this feature is pretty old, and therefore a bit crappy; for 
instance, the spacing in this example poem is funny (topskip) so i 
wonder if the attached file works better (maybe optional); can those who 
use paragraphs this wau test the attached variant (for taco: raises the 
result by strutheight)

(beware: i un-dutched the file a bit)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: core-mis.tex
Type: text/x-tex
Size: 79266 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060328/a3e3f7db/attachment-0001.bin 


More information about the ntg-context mailing list