From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41257 Path: news.gmane.org!not-for-mail From: Willi Egger Newsgroups: gmane.comp.tex.context Subject: Re: [Fwd: problem with context] Date: Thu, 29 May 2008 13:49:09 +0200 Message-ID: <6BD2B72B-2913-44F5-B0C7-4CB486F02E59@boede.nl> References: <483D6D77.3060008@wxs.nl> <2EE9DA98-6657-4893-9B3E-E67480A99FFE@boede.nl> <115224fb0805282343w1a21ff0cm99ecc670d17e6a21@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: multipart/mixed; boundary=Apple-Mail-1--321167692 X-Trace: ger.gmane.org 1212062136 10349 80.91.229.12 (29 May 2008 11:55:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 May 2008 11:55:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 29 13:56:16 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1K1gjt-00059m-2t for gctc-ntg-context-518@m.gmane.org; Thu, 29 May 2008 13:56:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 85D7E1FCBD; Thu, 29 May 2008 13:55:23 +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 06480-08; Thu, 29 May 2008 13:54:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B3DEF1FC78; Thu, 29 May 2008 13:49:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B8D3F1FC78 for ; Thu, 29 May 2008 13:49:49 +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 06208-04-3 for ; Thu, 29 May 2008 13:49:12 +0200 (CEST) Original-Received: from mail.7values.nl (pluto.digitpaint.nl [83.98.197.3]) by ronja.ntg.nl (Postfix) with ESMTP id D6E411FC27 for ; Thu, 29 May 2008 13:49:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.7values.nl (Postfix) with ESMTP id 92C01180EF for ; Thu, 29 May 2008 13:49:11 +0200 (CEST) Original-Received: from mail.7values.nl ([127.0.0.1]) by localhost (pluto [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00606-01-70 for ; Thu, 29 May 2008 13:49:11 +0200 (CEST) Original-Received: from [192.168.0.17] (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) by mail.7values.nl (Postfix) with ESMTP id 20E2B180EA for ; Thu, 29 May 2008 13:49:11 +0200 (CEST) In-Reply-To: <115224fb0805282343w1a21ff0cm99ecc670d17e6a21@mail.gmail.com> X-Mailer: Apple Mail (2.753) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:41257 Archived-At: --Apple-Mail-1--321167692 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi, Of course... Wili --Apple-Mail-1--321167692 Content-Transfer-Encoding: quoted-printable Content-Type: application/octet-stream; x-unix-mode=0644; name=rotatedtable-notrotatedcaption.tex Content-Disposition: attachment; filename=rotatedtable-notrotatedcaption.tex %=20Context=20file=0A%=20Filename:=20rotateedtable-notrotatedcaption.tex=0A= %=20Willi=20Egger=0A%=2003-06-2007=0A%=20Copyright=20(c)=202007=20BOEDE.=20= All=20rights=20reserved.=0A%=20Question=20on=20rotated=20and=20split=20= table=20with=20caption=20not=20rotated=20with=20the=20table=20(Henning=20= Hraban=20Ramm)=0A%=20Answered=20by=20Wolfgang=20Schuster=0A=0A= \setupoutput[pdftex]=0A\input=20rotatesplit=0A\enableregime[utf]=0A=0A= \startsetups=20caption:rotatedcaption=0A=09\setupcaptions=0A=09=20=20= [location=3D{middle,left},=0A=09=20=20=20= command=3D{\rotate[rotation=3D-90]},=0A=09=20=20=20width=3Dmax,=0A=09=20=20= =20align=3Dmiddle]=0A\stopsetups=0A=0A\startsetups=20= caption:normalcaption=0A=09\setupcaptions=0A=09=20=20[location=3Dbottom,=0A= =09=20=20=20command=3D,=0A=09=20=20=20width=3Dfit,=0A=09=20=20=20align=3D]= =0A\stopsetups=0A=0A\def\rotatedcaption=0A=20=20{\ifnum\floatrotation=3D90= =0A=20=20=20=20=20\setups{caption:rotatedcaption}=0A=20=20=20= \else\ifnum\floatrotation=3D270=0A=20=20=20=20=20= \setups{caption:rotatedcaption}=0A=20=20=20\else=0A=20=20=20=20=20= \setups{caption:normalcaption}=0A=20=20=20\fi\fi}=0A=0A= %\setupfloats[before=3D\rotatedcaption]=0A=0A\showframe=0A=0A\starttext=0A= =0A\dorecurse{10}{\input=20knuth\relax}=0A=0A\chardef\floatrotation=3D90=0A= =0A\rotatedcaption=0A=0A\placetable=0A=20=20[90,split]=0A=20=20= [tab:religionen]=0A=20=20{G=C3=B6tter}=0A=20=20{\bTABLE[width=3D5cm]=0A=20= =20=20\dorecurse{100}{\bTR\bTD=20Text\eTD\eTR}=0A=09\bTR\bTD=20Ende=20= nach=20100=20Zeilen=20\eTD\eTR=0A=20=20=20\eTABLE}=0A=0A= \chardef\floatrotation=3D0=0A=0A\rotatedcaption=0A=0A\placetable=0A=20=20= [split]=0A=20=20[tab:religionen]=0A=20=20{G=C3=B6tter}=0A=20=20= {\bTABLE[width=3D5cm]=0A=20=20=20\dorecurse{100}{\bTR\bTD=20= Text\eTD\eTR}=0A=09\bTR\bTD=20Ende=20nach=20100=20Zeilen=20\eTD\eTR=0A=20= =20=20\eTABLE}=0A=0A\dorecurse{10}{\input=20knuth\relax}=0A=0A\stoptext=0A= --Apple-Mail-1--321167692 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=rotatesplit.tex Content-Disposition: attachment; filename=rotatesplit.tex % This file is most probably built by Wolfgang Schuster! \unprotect \def\floathack#1% {\globallet\floatrotation\!!zerocount \ifparfloat \else \processallactionsinset [#1] [ 90=>\globallet\floatrotation\commalistelement,% 180=>\globallet\floatrotation\commalistelement,% 270=>\globallet\floatrotation\commalistelement]% \fi \setbox\scratchbox\hbox{\floatrotation}% \floatparameter\c!before} \def\dodocomplexplacefloat[#1][#2][#3]#4% {\flushnotes \flushsidefloats % here ! \ifsomefloatwaiting % this was \checkwaitingfloats spread all over \doifinsetelse\v!always{#2} {\showmessage\m!floatblocks5\empty} {\expanded{\doifcommonelse{#2}{\flushfloatslist}}\doflushfloats\donothing}% % but which should be done before using box \floatbox \fi \ifmargeblokken \doifinset\v!margin{#2}\endgraf \fi \global\insidefloattrue \begingroup % ** \ifmargeblokken \doifinset\v!margin{#2}{\hsize\@@mbwidth}% \fi \the\everyinsidefloat \let\@@extrafloat\empty \presetmorefloatvariables{#2}% \dowithnextboxcontent % better a \the\everyfloattoks {\setlocalfloathsize \floatparameter\c!inner \fuzzysnappingfalse \postponenotes} % new {\doifsomething{\floatparameter\c!criterium} {\ifdim\wd\nextbox>\floatparameter\c!criterium\relax \edef\forcedfloatmethod{\executeifdefined{\??fl\currentfloat\c!fallback}\v!here}% \fi}% \xdocompletefloat{#1}{#3}{#1}{#2}{#1}{#4}% ** not yet done % we need to carry over the par because of side floats \doifnotinset\v!text{#2}{\carryoverpar\endgroup}% \global\sidefloatdownshift \zeropoint \global\sidefloatextrashift\zeropoint \ifparfloat \doifinset\v!reset{#2}\forgetsidefloats \doinhibitblank \fi}% better move this to side floats \vbox} \def\splitrotation {\ifnum\floatrotation=90 \scratchdimen\textwidth \else\ifnum\floatrotation=270 \scratchdimen\textwidth \else \scratchdimen\textheight \fi\fi} \def\handletsplit {\analyzesplitfloatcaption\tsplitcontent \global\setfalse\tsplitfirstdone \testpage [\tsplitminimumfreelines] [\dimexpr\tsplitminimumfreespace+\extrasplitfloatlines\lineheight\relax]% \setbox\scratchbox\vbox{\tsplitinbetween}% \edef\tsplitinbetweenheight{\the\htdp\scratchbox}% etex \!!doneafalse \doloop {\ifinsidecolumns % brrr, assumes empty columns \global\setfalse\tsplitfirstdone \splitrotation \!!donectrue \else \ifconditional\tsplitfirstdone \splitrotation \!!donectrue \else\ifdim\pagegoal<\maxdimen \scratchdimen\dimexpr\pagegoal-\pagetotal\relax \!!donecfalse \else \splitrotation \!!donectrue \fi\fi \fi \scratchdimen\dimexpr\scratchdimen-\tsplitinbetweenheight-\tsplitminimumfreespace-\extrasplitfloatlines\lineheight\relax \ifdim\htdp\tsplittail>\zeropoint \advance\scratchdimen-\htdp\tsplittail \fi \setbox\tsplitresult\vbox {\ifdim\ht\tsplithead>\zeropoint \unvcopy\tsplithead \tsplitinbetween \fi}% \if!!donea\else\ifdim\ht\tsplitnext>\zeropoint \setbox\tsplithead\box\tsplitnext \fi\fi \!!doneatrue \ifdim\ht\tsplitresult>\zeropoint \!!donedtrue % table head \else \!!donedfalse % no tablehead \fi \splittopskip\zeropoint \doloop {\setbox\scratchbox\vsplit\tsplitcontent to \onepoint % \lineheight \setbox\scratchbox\vbox{\unvbox\scratchbox}% \ifdim\dimexpr\scratchdimen-\htdp\scratchbox-\htdp\tsplitresult\relax>\zeropoint \setbox\tsplitresult\vbox {\unvbox\tsplitresult \tsplitinbetween \unvbox\scratchbox}% \ifvoid\tsplitcontent \exitloop \fi \else\if!!doned % we only have a tablehead so far \setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvbox\scratchbox}% \exitloop \else\if!!donec % we have text height available, but the (one) cell is too % large to fit, so, in order to avoid loops/deadcycles we do: \setbox\tsplitresult\vbox {\unvbox\tsplitresult \tsplitinbetween \unvbox\scratchbox}% \exitloop \else \setbox\tsplitcontent\vbox {\unvbox\scratchbox \tsplitinbetween \ifvoid\tsplitcontent\else\unvbox\tsplitcontent\fi}% \exitloop \fi\fi\fi \!!donedfalse \!!donecfalse}% \postprocesstsplit \dochecksplitofffloat\tsplitcontent \ifvoid\tsplitcontent \setbox\tsplitresult\vbox {\unvbox\tsplitresult \tsplitinbetween \unvcopy\tsplittail}% \dowithsplitofffloat{\tsplitbeforeresult\box\tsplitresult\tsplitafterresult}% \doifnotinsidesplitfloat\tsplitafter \endgraf \exitloop \else % hack \ifdim\pagegoal<\maxdimen \global\pagegoal\dimexpr\pagegoal+\lineheight\relax % etex \fi % brrr \ifdim\ht\tsplitresult>\zeropoint \setbox\tsplitresult\vbox {\unvbox\tsplitresult \tsplitinbetween \unvcopy\tsplittail}% \dowithsplitofffloat{\tsplitbeforeresult\box\tsplitresult\tsplitafterresult}% \doifnotinsidesplitfloat\tsplitafter \endgraf \fi \ifinsidecolumns \doifnotinsidesplitfloat\goodbreak \else \doifnotinsidesplitfloat\page \fi \fi}} \protect \endinput --Apple-Mail-1--321167692 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On May 29, 2008, at 8:43 AM, Wolfgang Schuster wrote: > Hi Willi, > >> A somewhat similar question came from Henning Hraban Ramm some time >> ago. Wolfgang Schuster prepared a solution... >> I will send you an example-file and the necessary macro-file off- >> line. > > Can you send the solution also to the list, it's hard to remeber > things > after a long time and it will also help other users with the same > problem. > > I don't know what his problem is with the table but > \placetable[90]{caption}{my table code} should work. > >> Willi > > Greetings > 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ______________________________________________________________________ > _____________ --Apple-Mail-1--321167692 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --Apple-Mail-1--321167692--