Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h2774747.stratoserver.net (8.15.2/8.15.2/Debian-3) with ESMTP id wAH7cCfo025580 for ; Sat, 17 Nov 2018 08:38:13 +0100 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx017 [212.227.15.9]) with ESMTPS (Nemesis) id 1MfZc2-1fqoPX0Nc8-00g25T for ; Sat, 17 Nov 2018 08:38:07 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AjJwAAxe9bfV5kzoFlghmBWXmFN4N?= =?us-ascii?q?7hHyLH4IND4JVhhAkbgGNT4F/hFSDViI4EgEDAQECAQECFAEBFjovQgEBBAk?= =?us-ascii?q?BhGwEAgEBICMKDCICAQEGAgoLDwImAgIDGwEEORmDHYFoARAIqAyBFwEXhTG?= =?us-ascii?q?CAQoZgQ6BP4ELinqCFoN1LoR+gwSCVwKBKgEBh3eVdzMhAQYBAQEcgTUGR4Q?= =?us-ascii?q?bg20FhxSJWIclmHJMNSCBVjMaI4FuFhqBH4M8AQ6NDz4BAoRLgXuIXAEB?= Received: from listserv.uni-heidelberg.de ([129.206.100.94]) by relay.uni-heidelberg.de with ESMTP; 17 Nov 2018 08:38:08 +0100 Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 6626F12783E; Sat, 17 Nov 2018 08:37:58 +0100 (CET) Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 31119798 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 17 Nov 2018 08:37:58 +0100 Delivered-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 3F0E312783E for ; Sat, 17 Nov 2018 08:37:58 +0100 (CET) Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Message-ID: <6087583906706202.WA.kellysmith12.21gmail.com@listserv.uni-heidelberg.de> Date: Sat, 17 Nov 2018 08:37:58 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Kelly Smith Subject: Re: Offer to Write an xskips Package To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-Spam-Flag: NO X-UI-Filterresults: notjunk:1;V01:K0:oKEjJgQAa9s=:kTOgGnDgNBliDEQRlF6nePuern Ji5W8V8jQY8fy/1cJ3dacnZlhRaHpiKYlJAdBIvzRrmHe90wNMQTmipdGm51YQLf+Bh73/Tui XsI67thWIG5LkzYDvAtbq7C1kYHWkjjTBIVAeUrcHwGETqicXsBsbFkhjyv077feFbDZYVDmM TLSejIiZkySK4R9bPs0gQLe/5iI4zH7WMbG5jU1b5oqljHvT0f5WBwaX+5JPp5TMhRzi59xbT dauVHpzfrek+xQ/y3HA88fJ0JXEuilKl9/qPe5/GTQaIDqGr7NiAKZmu4cCEb7pA/BBXQzenM SJGpld/soUjYW+B1TlrX67ku1K3gRXhYPodgl2/UiuUvCyzlX978lWApiO2VAma1ZZ9biKo42 yJ44aRDQi+AnrPlMSRAsJ2I7KUhBLpnqgUyQADPXWmM7q3cSf/zH2LePspA9OI0IUiPoLYTDa omxcsjt643PmDaWsWKK4sJweDKDBUTQ3ipC0+vTzNRg8OszGMf8BUqqdRXLiTRGdIPxd4H+kB y+v03ipYtjpqkUzC9Eafy8ucE1QvB20Ml31q6XbRLAjOhfkf9bL/QoaxX/RULeDkQjYgAiFiR skVb5BBX0Eug8QorFFRHd01XuBunlACgEN8xuC89eFljKv/YwuFNfztj2FaYRgOwIvzYctDPJ iBd/olZB+EpEVBSvNqZN9wEfuqDR7T4XEbgIcgFaL3VYCe1RUZWEa9BkOH6SceMO5Sh+iSDXq pfIthCzqGlH4nldyYCzA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tJ7T8EEaZdyJFNb10C6FlGCgNBOUW6OTl+x3Ku+zM0BMDWssjZnGu0LduAuqIaGIifQWh8a9 zI/wRyIsNWzz5Crc1aMwwo/dN5pVUxM2DBsiT9ZFO4pzzYVbA49mKlKm72VmpnOOvS4kG5AoR ZkCmRSalJ35XUmkBeHwIIC/egqKdqnsYfIim1XDlAG+eHs+DgITQ5iksTE/ipL7DFxes3KV2G LpsaEZALMw0sk6j680A42wT/s2gve0J2kz2RO1ykgM3o74xGB3n8xzhVZ+tSGCLA== X-UI-Loop:V01:EQlaGHApO3c=:pjKeequ74ADjN5zCM6O7yPOKMKDGEnB4tEX975Sz1lc= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:HnNMHwsHrA4=:zcFEk7l2Nq3+kikGNFXXOT jLNRxG0vUtBrQE+vMyBb4s/5K/dZJ7v7qyfj6DuPYYnt/SREjQ+Pika66AwAUf4HOv3AQN3Ga qQ/sx7jgLZa2PSfewAeIL+JWFjiv/ZgMgGtylhyTmjbxn1+OlDEmoHaZzTmoFMx+iUZJdqf9k y80rDZYK+xfKAII/MBFnnkd1bRoriJyvCCGGSX5WVa3zSlkkJgIv4gQwzZNw4XL54FhqHaOBr JSRPTq0ouOw0d2qexlxE19ywIhKVq1bS5j8ae7Paie0p7lzh5XQ/fv6OYHITBZYznxuDcHTcq XjXV/P1uQJQex/0WMJFzCbVRl2lKH34yz1OYXOnn7jHXRFQfyg6uSIShUFE0UdtG3jeH46q1q vw+m4KrSvW5DWh1rZIb+fJCOgMLSdLXDJtaa2/WGMrc3VDtYaPpRsRqc9AYteeLvpV1T7Bwh8 +ABrNwhdEic5HgwqBClymzLAf85wHF4= X-Scanned-By: MIMEDefang 2.78 on 81.169.212.23 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h2774747.stratoserver.net id wAH7cCfo025580 Status: R X-Status: X-Keywords: X-UID: 8111 Hello, Thank-you for the response, it gave me much to think about. > that's a good question what harmonizes with L3 design-level interface. xcoffins is listed as part of the design level, but it involves programming. Although, it isn’t any more complicated than the tools designers use to make graphics and fonts… > So what is the purpose for example of \VerticalSpace? would it have a > natural place to live and if so why? My thought was for spacing between document elements, but if the only part that the designer should be concerned with is the values of the spaces, and the programmer should worry about the commands that create spacing, then commands like \VerticalSpace are unnecessary. > I guess our ask here would be use cases for the commands you proposed to > get a feeling whether they should and if so in what form they should be > provided but not embark on making a copy of the expl3 code interfaces > 1-2-1 into CamelCase unless we all agree on seeing a good reason for it. Providing simple duplicates of expl3 doesn’t help with much… If anything, that just adds bulk to the L3 tools. I should have realized that. > There are of course boundary cases, eg > > a function for setting length parameters should naturally support > evaluations of its value argument (which right now \newlength doesn't > offer (unless you load calc. A comment here. I suggested that an argument processor to verify user input would be useful. Even if they are free of programmatic commands, I do think that such checks are a good idea for author and designer interfaces, given that errors can sometimes be tricky to discover in 2e. But it seems reasonable that programmers should be expected to check (and double check) their inputs, or face low-level errors at their own risk. > But already the distinction between skips and dimens (that exist on the > programming level but not on the 2e user level in the setters) is > something to ponder. An I would be interested to see examples why the > distinction os sensible on the designer level (I'm not convinced it is) > I mean, why shouldn't there be a single set of design-level setters. My concern for not having a distinction would be that a stretch or shrink expression could be passed to something that expects a fixed length. Then again, 2e’s \newlength uses skips internally, and there doesn’t seem to have been trouble caused by that. Of course, some machinery can be put in place to prevent such errors. It’s my understanding that in TeX, dimens are for the widths and heights of objects &c, while skips are for spaces. However, I suppose there’s nothing to stop one from creating a higher-level data type that say, works like a box but can stretch or shrink to accommodate surrounding content. (Like boxes in CSS?) If the plan is to define a high-level interface, then there’s no reason why the underlying primitives should be constrained to their traditional roles. > As for allocation, to what extend are they needed on the design level? > Aren't they only needed when you are actually asking for some programmed > code? That’s true. Designers shouldn’t have to worry about things like allocation and scope (especially given TeX’s explicit grouping). >> I have attached the raw .sty code which contains what I think are appropriate >> tools for the designer level. Of course, this would become a proper .dtx file >> with documentation and examples. > > So rather than documenting that suggestion, I would ask for convincing > examples for each of the proposed functions that are design tasks that > should live in a class file rather than programming tasks that should > live in package/modules that offer building blocks for titles building > blocks for headings etc etc. The interface provided by xcoffins is nice because it simplifies working with coffins by abstracting over the expl3, by doing convenient calculations, and by providing default values. It reduces the complexity involved. My proposed skips package, however, doesn’t provide such useful abstractions, so it wouldn’t have the same sort of utility. Since the designer interface is meant to be very declarative, the tools should eschew raw, low-level typesetting instructions. As such, I can’t say that the imperative interface I suggested fits those ideas. > I'm not saying none of them are, maybe some are the right choice for the > design level, but instead of embarking on providing stuff that we later > regret, let us first better understand the needs. So if you have the > time I would very much look forward in seeing how you intend to use each > and every of these functions. As I mentioned above, I was still thinking in terms of low-level spacing issues when I proposed the package. The commands would have uses that are more-or-less the same as we see with \hspace, \vspace, &c. Final adjustments to a document require some manual intervention by a designer, but defining the tools for doing that will probably be among the final adjustments to L3 itself. In short, I can’t really justify the package as I presented it. But I will continue to think about what is necessary at this level. —Kelly > ps while we are at it, uses of \parbox and friends (or coffins) would be > also very much of interest. where do you use them and how ... While working on the pagestyle module, I tried using coffins to typeset headers and footers. However, I discovered that the \baselineskip is set to strange values in the header and footer, so I would need to create a group and manually set it. Instead, using a \parbox provided the correct baselineskip without any manual intervention. I still use coffins to place the header/footer rules so I can easily place them exactly where I want, relative to the other content. I’ve included the function I currently use to typeset both headers and footers. (I’ve gone through a few iterations.) This has been tested, and I think the results are pretty good. Though, I realize it’s probably a poor implementation. % Values are received from pagestyle template variables. % #1 = above rule width % #2 = below rule width % #3 = left content % #4 = center content % #5 = right content \cs_new:Nn \__soranus_typeset_headfoot:NNNNN { % Put the body of the header/footer into a coffin. \SetHorizontalCoffin \l__soranus_tmpa_coffin { % The \textwidth is guaranteed to be the appropriate % width for headers/footers. I may, later, allow the % header/footer to extend over the marginpar, too. \hbox_to_wd:nn { \textwidth } { % \parbox makes alignment of the “cells” simple. % Each cell contains, at least, a \strut. \parbox [ t ] { 0.3\textwidth } { \raggedright \tl_use:N #3 \strut } \skip_horizontal:n { 0pt plus 1fill } \parbox [ t ] { 0.3\textwidth } { \centering \tl_use:N #4 \strut } \skip_horizontal:n { 0pt plus 1fill } \parbox [ t ] { 0.3\textwidth } { \raggedleft \tl_use:N #5 \strut } } } \dim_compare:nNnF { #1 } = { \c_zero_dim } { \SetHorizontalCoffin \l__soranus_tmpc_coffin { \rule { \textwidth } { #1 } } % The above rule needs to be raised slightly. \JoinCoffins \l__soranus_tmpa_coffin [ l, t ] \l__soranus_tmpc_coffin [ l, b ] ( 0pt, 3pt ) } \dim_compare:nNnF { #2 } = { \c_zero_dim } { \SetHorizontalCoffin \l__soranus_tmpc_coffin { \rule { \textwidth } { #2 } } % The below rule doesn’t need to be lowered as much. \JoinCoffins \l__soranus_tmpa_coffin [ l, b ] \l__soranus_tmpc_coffin [ l, t ] ( 0pt, -2pt ) } % Raise the header/footer slightly. \TypesetCoffin \l__soranus_tmpa_coffin ( 0pt, 2.5pt ) }