* [Fwd: problem with context]
@ 2008-05-28 14:34 Hans Hagen
2008-05-28 15:29 ` Willi Egger
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2008-05-28 14:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
--
-----------------------------------------------------------------
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
-----------------------------------------------------------------
[-- Attachment #2: problem with context.eml --]
[-- Type: message/rfc822, Size: 3070 bytes --]
From: Kerstin Labusga <labusga@giga-hamburg.de>
To: pragma@pi.net
Subject: problem with context
Date: Tue, 27 May 2008 12:32:16 +0200 (CEST)
Message-ID: <15233969.126471211884336957.OPEN-XCHANGE.WebMail.tomcat@mailhost.dueihh.de>
Dear collegues,
I have a problem with a table and I hope you can help me on. I would
like to rotate a table by 90 degree. I found the command \rotate[]{},
but it doesn't work with the table. Do you have another command that I
can try?
Thank you for helping me on.
Kerstin Labusga / Redaktion / Publications
GIGA German Institute of Global and Area Studies/
Leibniz-Institut für Globale und Regionale Studien
Neuer Jungfernstieg 21 / D-20354 Hamburg
Tel. 0049-(0)40-42825-583, Raum 315
E-mail: labusga@giga-hamburg.de
[-- Attachment #3: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: problem with context]
2008-05-28 14:34 [Fwd: problem with context] Hans Hagen
@ 2008-05-28 15:29 ` Willi Egger
2008-05-29 6:43 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Willi Egger @ 2008-05-28 15:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello,
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.
Willi
On May 28, 2008, at 4:34 PM, Hans Hagen wrote:
>
> --
>
> -----------------------------------------------------------------
> 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
> -----------------------------------------------------------------
>
> From: Kerstin Labusga <labusga@giga-hamburg.de>
> Date: May 27, 2008 12:32:16 PM GMT+02:00
> To: pragma@pi.net
> Subject: problem with context
>
>
> Dear collegues,
>
> I have a problem with a table and I hope you can help me on. I would
> like to rotate a table by 90 degree. I found the command \rotate[]{},
> but it doesn't work with the table. Do you have another command that I
> can try?
> Thank you for helping me on.
>
> Kerstin Labusga / Redaktion / Publications
> GIGA German Institute of Global and Area Studies/
> Leibniz-Institut für Globale und Regionale Studien
>
> Neuer Jungfernstieg 21 / D-20354 Hamburg
> Tel. 0049-(0)40-42825-583, Raum 315
> E-mail: labusga@giga-hamburg.de
>
>
>
>
>
> ______________________________________________________________________
> _____________
> 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
> ______________________________________________________________________
> _____________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: problem with context]
2008-05-28 15:29 ` Willi Egger
@ 2008-05-29 6:43 ` Wolfgang Schuster
2008-05-29 11:49 ` Willi Egger
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2008-05-29 6:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: problem with context]
2008-05-29 6:43 ` Wolfgang Schuster
@ 2008-05-29 11:49 ` Willi Egger
0 siblings, 0 replies; 4+ messages in thread
From: Willi Egger @ 2008-05-29 11:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 26 bytes --]
Hi,
Of course...
Wili
[-- Attachment #2: rotatedtable-notrotatedcaption.tex --]
[-- Type: application/octet-stream, Size: 1481 bytes --]
% Context file
% Filename: rotateedtable-notrotatedcaption.tex
% Willi Egger
% 03-06-2007
% Copyright (c) 2007 BOEDE. All rights reserved.
% Question on rotated and split table with caption not rotated with the table (Henning Hraban Ramm)
% Answered by Wolfgang Schuster
\setupoutput[pdftex]
\input rotatesplit
\enableregime[utf]
\startsetups caption:rotatedcaption
\setupcaptions
[location={middle,left},
command={\rotate[rotation=-90]},
width=max,
align=middle]
\stopsetups
\startsetups caption:normalcaption
\setupcaptions
[location=bottom,
command=,
width=fit,
align=]
\stopsetups
\def\rotatedcaption
{\ifnum\floatrotation=90
\setups{caption:rotatedcaption}
\else\ifnum\floatrotation=270
\setups{caption:rotatedcaption}
\else
\setups{caption:normalcaption}
\fi\fi}
%\setupfloats[before=\rotatedcaption]
\showframe
\starttext
\dorecurse{10}{\input knuth\relax}
\chardef\floatrotation=90
\rotatedcaption
\placetable
[90,split]
[tab:religionen]
{Götter}
{\bTABLE[width=5cm]
\dorecurse{100}{\bTR\bTD Text\eTD\eTR}
\bTR\bTD Ende nach 100 Zeilen \eTD\eTR
\eTABLE}
\chardef\floatrotation=0
\rotatedcaption
\placetable
[split]
[tab:religionen]
{Götter}
{\bTABLE[width=5cm]
\dorecurse{100}{\bTR\bTD Text\eTD\eTR}
\bTR\bTD Ende nach 100 Zeilen \eTD\eTR
\eTABLE}
\dorecurse{10}{\input knuth\relax}
\stoptext
[-- Attachment #3: rotatesplit.tex --]
[-- Type: application/octet-stream, Size: 5803 bytes --]
% 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
[-- Attachment #4: Type: text/plain, Size: 1096 bytes --]
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
> ______________________________________________________________________
> _____________
[-- Attachment #5: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-29 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-28 14:34 [Fwd: problem with context] Hans Hagen
2008-05-28 15:29 ` Willi Egger
2008-05-29 6:43 ` Wolfgang Schuster
2008-05-29 11:49 ` Willi Egger
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).