From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id F377D2FC63 for ; Thu, 19 Sep 2024 00:22:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 2835048515F for ; Thu, 19 Sep 2024 00:20:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=flump.de Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BWZLT4gAXlht for ; Thu, 19 Sep 2024 00:20:56 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A9FB248518B for ; Thu, 19 Sep 2024 00:20:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id B4875484F70 for ; Thu, 19 Sep 2024 00:19:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DfmgH5pVZcX1 for ; Thu, 19 Sep 2024 00:19:53 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=185.163.118.210; helo=flump.de; envelope-from=gerion.entrup@flump.de; receiver= Received: from flump.de (flump.de [185.163.118.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 4CCAD484F6F for ; Thu, 19 Sep 2024 00:19:52 +0200 (CEST) Received: from falbala.localnet (ip4d1692dd.dynamic.kabel-deutschland.de [77.22.146.221]) by flump.de (Postfix) with ESMTPSA id AEDD61737306; Thu, 19 Sep 2024 00:19:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=flump.de; s=mail; t=1726697992; bh=XvDfSykv1MqQjG62yPY3rmFiQ9IYdPaL52LkTJiR7lU=; h=From:To:Subject:Date:In-Reply-To:References; b=QPCIKgn7Vkp8p39k3plg83/B6EsbTLtbDuyD8VAbzh+feLR/9u3zeLTKKTgdC8rf9 S2gX+UY2jL87+VZ98hiDlpV3C5hpL8pO/Z7qA0ApusA2ggsIbbpesuSKdw6TFq9GLz MvKZaVS20ct/5qCRQ6qRyJJKJhcWm+jpWBlbiEMQ= From: Gerion Entrup To: mailing list for ConTeXt users , Wolfgang Schuster Date: Thu, 19 Sep 2024 00:19:49 +0200 Message-ID: <4649787.LvFx2qVVIh@falbala> In-Reply-To: References: <4712081.LvFx2qVVIh@falbala> <3702354.iIbC2pHGDl@falbala> MIME-Version: 1.0 Message-ID-Hash: QABEIUXFLUL22ECDKBJE6TKSMU43GMI2 X-Message-ID-Hash: QABEIUXFLUL22ECDKBJE6TKSMU43GMI2 X-MailFrom: gerion.entrup@flump.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Table and rotation: push together 45 degree rotated cells List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============1183076899658883996==" --===============1183076899658883996== Content-Type: multipart/signed; boundary="nextPart2394039.ElGaqSPkdT"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart2394039.ElGaqSPkdT Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Gerion Entrup Date: Thu, 19 Sep 2024 00:19:49 +0200 Message-ID: <4649787.LvFx2qVVIh@falbala> In-Reply-To: MIME-Version: 1.0 Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 18.09.2024 um 14:44: > > Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: > >> Hi, > >> > >> I want to typeset a table where some of the column headings are really= long, while in the columns itself consists only of numbers. > >> Therefore, my idea was to rotate the column headings but not 90 degree= s (I found some solutions for that) but 45 degree. > >> > >> It then would be beneficial to push together the rotated cells, so the= text of one cell actually starts above the previous cell. > >> Do you know, how to achieve that? > >> > >> Here is a minimal example: > >> ``` > >> \startsetups[table:rotated] > >> \setupTABLE[frame=3Doff] > >> \setupTABLE[row][first][bottomframe=3Don, style=3Dbf, align=3D{center= , low}] > >> \setupTABLE[row][2][align=3Dflushright] > >> \stopsetups > >> > >> \starttext > >> \define\tablerotate{\dontleavehmode\rotate[rotation=3D-45, location=3D= high]} > >> \bTABLE[setups=3Dtable:rotated] > >> \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotat= e{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \= eTD \eTR > >> \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \e= TD \bTD \digits{2} \eTD \eTR > >> \eTABLE > >> \stoptext > >> ``` > >> I would like to achieve that the text "Mexican redknee tarantula" is t= ypeset right and above of "Water buffalo" so that the single columns have a= width that is similar to the width of the single digit coming in the secon= d row. > >=20 > > To visualize this, I patched the PDF of the above example to the desire= d result. See the attachment. >=20 > You can use Metapost. Thanks for this solution. It, however, seems to fail with any other angle t= han 315=C2=B0 (I tested 305, 325 and 314). > \startuseMPgraphic{tableheader}{text,rotation} >=20 > label.lft("\strut\bf\MPvar{text}",origin) > rotated \MPvar{rotation} > shifted (\the\strutht,0); I guess, this one actually draws the text... > setbounds currentpicture to unitsquare > =20 > xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{= text}}); and this one calculates the faked width. Doesn't the sinus here calculate t= he height of the rotated text? Beside from using Metapost (since I currently do not understand it and woul= d only be able to copy paste your code), is there some kind of box construc= t which artificially reduces the width of the inner content? I would have expected something like \fakewidth[width=3D1cm, align=3Dflushr= ight]{\rotate[rotation=3D-45, location=3Dhigh]{A really long text, much lon= ger than 1cm}}. If I see it right, such a construct would also solve the problem, while les= s cleaner due to the fixed width. Gerion --nextPart2394039.ElGaqSPkdT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEM/tVN9WpYYHnPZHxloeAdSYJHeoFAmbrUgUACgkQloeAdSYJ HeqFZgv9E41zOUQdEMog8/nMpDzUAElqRs8yfcAu8LzUJKsrBPo3sojusQVkJyeE D5PXuSmg9SL9sZqJwQwJs4u1bKq+lBzSnj+9qbgw9H9otnikru5mx6uTsT5nn41a JTVEL6wp3CRBVpOrxnq4wzOidLoA7BSSxw40ucvtxdAMPOxqms5O4Zi9JauYW28/ XGcobr1YDp6kkSxWXhPiuUat+PZGCgC2BA9Ub4SxMsGDVIl69cu3AnWa+rPaIW5Y 0vQ4y6UIREENqUARnSp9+zZLZvb6n5seLdAP3k3iqnGEVk+LkLYWWUce9R79+j/u 98NJEeltW5INQcnTpZTdSRbfkse+UkNeayzywFNhdBQRn5wDSUfZhQeOG4DZkd2C 5+UqISfMmb2kokTIKXQv0PZJDITg37odHBMQer4yvP1N3owpPcbM+I/nQvGrU8Us DlsF41g3B19QnFUv8J1l/jtHsEK5ypJiVa5tXq1rKQ11wYSLPgtWBejK8kQ8Nj/B yECHnTHz =O0Uc -----END PGP SIGNATURE----- --nextPart2394039.ElGaqSPkdT-- --===============1183076899658883996== 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============1183076899658883996==--