From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21853 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: \placelist disturbs grid? Date: Tue, 09 Aug 2005 17:50:06 +0200 Message-ID: <42F8D0AE.5020205@seznam.cz> References: <42F13791.2080509@seznam.cz> <42F14254.6040609@wxs.nl> <42F296EA.3070406@seznam.cz> <42F32AE6.7000507@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1123602896 21619 80.91.229.2 (9 Aug 2005 15:54:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Aug 2005 15:54:56 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 09 17:54:44 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2WP5-0008Ho-10 for gctc-ntg-context-518@m.gmane.org; Tue, 09 Aug 2005 17:52:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ACC49127B8; Tue, 9 Aug 2005 17:52:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19720-01; Tue, 9 Aug 2005 17:52:34 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 73831127B6; Tue, 9 Aug 2005 17:50:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6644E127B6 for ; Tue, 9 Aug 2005 17:50:01 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19413-07 for ; Tue, 9 Aug 2005 17:50:00 +0200 (CEST) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id E01D1127B0 for ; Tue, 9 Aug 2005 17:49:59 +0200 (CEST) Original-Received: (qmail 17982 invoked from network); 9 Aug 2005 15:49:58 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@62.240.166.134) by cetus.go.seznam.cz with ESMTPA; 9 Aug 2005 15:49:58 -0000 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <42F32AE6.7000507@wxs.nl> X-Antivirus: avast! (VPS 0531-4, 05.08.2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21853 Hans Hagen wrote: > Vit Zyka wrote: >=20 >> Hans Hagen wrote: >> >>> Vit Zyka wrote: >>> >>>> Hello Hans, Taco, and the next gurus, >>>> >>>> sorry for bother with another thing I can not understand. Very high = >>>> glyphs like \v S disturb grid in the \placelist. The same glyph in=20 >>>> the common paragraph with the same (intentionally) interline setting= =20 >>>> preserves grid: >>>> >>>> --------------------------------------- >>>> \setupbodyfont[10pt,rm] >>>> \setupinterlinespace[line=3D12pt] >>>> \setuplayout[grid=3Dyes,width=3D8cm] >>>> \showgrid >>>> >>>> \writetolist[section]{}{See the next line:} >>>> \writetolist[section]{}{\v Sejba} >>>> \writetolist[section]{}{Another list line} >>>> >>>> \starttext >>>> \v Sejba\par >>>> Here grid is OK, but in \type{placelist}: >>>> >>>> \placelist[section] >>>> >>>> no! >>>> \stoptext >>>> ------------------------------------------ >>>> I was looking in definitions for some font-size dependent line=20 >>>> setting, I also tried to >>>> \setuplist[section]{style=3D\baselineskip=3D12pt\lineskiplimit=3D-10= pt} >>>> but without success to lounging on the grid. >>> >>> >>> this is the default ratio: >>> >>> \setupinterlinespace >>> [height=3D.72, >>> depth=3D.28] >> >> Thank you Hans; after some experimenting I understood: >> - height and depth in \setupinterlinespace are baseline-ratio/size of = >> struts (add description to tex-show) >> - some my chars (/,\v S, \tfa, ...) oversized \strut size of any ratio= >> - list items are typeset with struts (perhaps all alternative) >> - only alternative without strut is 'none' with command=3D\Mycommand d= ef >> >> So I do know how to preserve grid. But I do not know HOW TO TYPESET=20 >> \Mycommand TO FIT THE PARAGRAPH WIDTH. It seem it is not in the=20 >> restricted horizontal mode and continue on one long line. And another = >> question/request: can the list distance param (alternative d,...) be=20 >> glue instead of skip? For better line fitting. >> >> example: >> ------------------ >> \setupbodyfont[10pt,rm] >> \setupinterlinespace[line=3D12pt,height=3D.77,depth=3D.23] >> \setuplayout[grid=3Dyes,width=3D8cm] >> \showgrid >> >> \setuplist[section] >> [style=3D\tfd,alternative=3Dnone,command=3D\MyListItem] >> \def\MyListItem#1#2#3{{\tfb (#1-#2-#3) }} >> >> \starttext >> \writetolist[section]{}{See the next line} >> \writetolist[section]{}{\v Sejba} >> \writetolist[section]{}{Another list line} >> \writetolist[section]{}{And the last one} >> >> \lineskiplimit=3D-10pt >> Line\par >> Anothet line of \v Sejba\par >> >> \placelist[section] >> >> \strut %% should be! why? >> After list line. >> >> \stoptext >> ------------------ >> >> Vit Hallo hans, thank you for your code. I find it in my mail box just today = although it is 4 days old. So apologise me. Unfortunately it seems to me it A) does not work after successfull \definelistplacement[MyListItem][none]#1#2#3% {\listparameter{style} (#1 - #2 - #3) } \MyListItem is not defined. B) does not solve the problem with a single long line list alternative. But. Your example discovered me there are few more alternative in=20 \setuplist (except a..f, none): horizontal vertical command So your example leads me to find the solution. I still do not know how=20 to insert interaction to page number inside \MyListCommand. I have tried \def\MyListCommand#1#2#3{% #1-#2-% \setbox0\hbox{#3}% \showcontrastlocation\??ia{??}{#3}}% \linklisttoelement{subsection}{??}{#3}{\box0}% )} } but I am puzzled by \linklisttoelement parameters. Thnak ones more Vit Solution: ---------------------- \setupbodyfont[10pt,rm] \setupinterlinespace[line=3D12pt,height=3D.77,depth=3D.23] \setuplayout[grid=3Dyes,width=3D8cm] \showgrid \setuplist[part] =20 [style=3D\bfb,alternative=3Dcommand,command=3D\MyListCommand,before=3D\bl= ank,after=3D\endgraf] \setuplist[chapter] =20 [style=3D\bfb,alternative=3Dcommand,command=3D\MyListCommand,before=3D\bl= ank,after=3D\endgraf] \setuplist[section] [style=3D\tfa,alternative=3Dcommand,command=3D\MyListCommand] \def\MyListCommand#1#2#3{% \listparameter{before}% {\listparameter{style}(#1-#2-#3)}\hskip1em plus.5em minus.5em \listparameter{after}% } \starttext \writetolist[part]{1}{Part 1} \writetolist[chapter]{1}{Chapter 1} \writetolist[section]{1}{See the next line} \writetolist[section]{2}{\v Sejba} \writetolist[section]{3}{Another list line} \expanded{\writetolist[section]{}{And the last line.}} \writetolist[chapter]{2}{Chapter 2} \writetolist[section]{1}{Section 1} \lineskiplimit=3D-\maxdimen Line\par Another line of \v Sejba\par \placecontent \strut After list. \stoptext ------------------------------- >=20 >=20 > \setuplist > [section] > [style=3D\tfd, > alternative=3Dnone, > after=3D\blank, > before=3D\blank, > command=3D\MyListItem] >=20 > \setuplist > [section] > [style=3D\tfd, > alternative=3Dcommand > command=3D\MyListItem] >=20 > in core-lst you can see how the alternatives are defined > ok, let's give you a bonus (goes in cont-new): > \unprotect > \def\definelistplacement > {\dodoubleempty\dodefinelistplacement} >=20 > \def\dodefinelistplacement[#1][#2]% > {\setvalue{\@@dodolistelement#1}% > {\doifelsenothing{#2} > {\getvalue{\@@dodolistelement\v!command}}% > {\executeifdefined{\@@dodolistelement#2} > {\getvalue{\@@dodolistelement\v!command}}}% > \setvalue{\??li\currentlist\c!command}% > {\getvalue{\@@dodolistelement::#1}}}% > \setvalue{\@@dodolistelement::#1}} >=20 > \definelistplacement[MyListItem][none]#1#2#3% > {\listparameter{style} (#1 - #2 - #3) } >=20 > \protect > now you can say: > \definelistplacement[MyListItem][none]#1#2#3% > {\listparameter{style} (#1 - #2 - #3) } >=20 > \setuplist > [section] > [style=3D\tfd, > alternative=3DMyListItem, > after=3D\blank, > before=3D\blank] >=20 > (btw, watch how one can ask for listparameters)=20 > \definelistplacement[MyListItem][none]#1#2#3% > {\listparameter{style} (#1 - #2 - #3) } >=20 > \setuplist > [section] > [style=3D\tfd, > alternative=3DMyListItem, > after=3D\blank, > before=3D\blank] >=20 > \definelistplacement[MyListItem][none]#1#2#3% > {\listparameter{before} > \listparameter{style} (#1 - #2 - #3) \listparameter{after}} >=20 >=20 >=20 > 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 > ----------------------------------------------------------------- >=20 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ing. V=EDt Z=FDka, Ph.D. TYPOkv=EDtek database publishing databazove publikovani data maintaining and typesetting in typographic quality priprava dat a jejich sazba v typograficke kvalite tel.: (+420) 777 198 189 www: http://typokvitek.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D