Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7LIsnZx003498 for ; Fri, 21 Aug 2015 20:54:50 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx103) with ESMTPS (Nemesis) id 0MPJ3k-1ZORbn2O36-004QMN for ; Fri, 21 Aug 2015 20:54:43 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7LIqx4D028345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Aug 2015 20:53:00 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7LHYbUt005832; Fri, 21 Aug 2015 20:52:59 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12514069 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 21 Aug 2015 20:52:59 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7LIqxp8019135 for ; Fri, 21 Aug 2015 20:52:59 +0200 Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7LIqtXb028296 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 21 Aug 2015 20:52:58 +0200 Received: by pdob1 with SMTP id b1so29439889pdo.2 for ; Fri, 21 Aug 2015 11:52:55 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.70.54.165 with SMTP id k5mr13017238pdp.138.1440127157243; Thu, 20 Aug 2015 20:19:17 -0700 (PDT) Received: by 10.66.254.138 with HTTP; Thu, 20 Aug 2015 20:19:17 -0700 (PDT) Content-Type: text/plain; charset=UTF-8 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id t7LIqxp8019136 Message-ID: Date: Thu, 20 Aug 2015 23:19:17 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: "Joel C. Salomon" Subject: Help with Expl3-izing some code To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id t7LIqx4D028345 Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:nuqN8RSaoNY=:rgIJi3lbcRukd3w5fW+iiMD8HH ng/McPipqLmj+/3oipR6yqsJygtEvJa/jW85lqjQjeTZPFfq6Wj4pSzQP6OvWNfYjQ5P8ofeW t+aMMAKTJ4/9GM0/+wr5CUGalBA2k0zE6eKvRMwuhYpGNvvgqXgYW1DcsLdXMmH28GewChirU Zgib1fTOc0EVH08l5yQCYL5sNx/n7n7AzgakTbHvB6csY5rRko/G3sEOeWo0rmgEC3AvIpVMZ vAhSNau5UVlIy5/4akfHuHUQw5CaIdawLMXJ25Bjr4sG21bnAZEBJvTa1fHSS131oLUWRoIXM TTgSEW+HTYf69QYuH0gLWE3bKAlmXjzZyqS98jp0gnJjS7AX/XUHGGBwTMBPdlGF/VEWrfgaM wh456zVqPKeM8cUfjiUIPR2sA/1/tuNjHGIwL2zgkSY1WPbpi0Vy4uT0Lz0BkTszSvDueCQtM 8+5ymtqtAwgWHcEqDnRcm623luydqUXEIc6eyxTjbYlWhWcIa6ELNrYioLJKXQGg2h21q8GcN Z6IVtOMqONbhTIC0YaBsAME4AYpyE9L8Q7pFNBZwnywE+VJldPZLGIqAQioNzlZxtlhHe1RXV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XCvr80hRO1EtCII+WUxDKYGX2e8+7G3tZRzAtj+NYFcBz0kiCb oxQiEgoY41whkOSXL80PNuyFI1pg9Z8oN/YV9xxWhIy9bDGaJ70+Ut3VzoDiPO/GrOjp1gxKV RCjqrhHW6l1ULrC39ZD/1IRhba62WMrYvZdI+qU4ObpuGDKV0mPWkQPfqlxnVDkcDrfGzrO6k LjcoCT/oP541t6BMYV7XS5aE4KUjvUMveOsyIi6U/lrwivlLAim/zKKtE6QvV3tvbNAVhodWs ZEiE9UDxC/ofdk379MNSfHt8poNXNOxgftnVpLvXNEEbYtYDzqPC94NqDhS9yy2LBrRs9PEwu Pgk2HlE68UmHtvQ6pNKe25nu3HfNZaQpxj7D/lNXxOnyosgB0SR9YZHd1Hddpf8E5rjqd8+B7 95ZiA/EURMEWfqviyao55i9WLDR4DjUMmhqVBdD/Jb9kkl84M75B X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h1439878.stratoserver.net id t7LIsnZx003498 Status: R X-Status: X-Keywords: X-UID: 7823 Folks, The memoir class manual suggests some code for putting section headings in the margin, which I have adapted (using Expl3 mode for clarity) thus: \newcommand{\marginbox}[1] { \parbox[t][0pt] { \c_jcsres_marginwidth_dim } { \raggedleft \leavevmode \jcsres_section_style:n {#1} } } \newcommand{\marginhead}[1] { { \llap { \marginbox{#1} \kern \c_jcsres_marginspace_dim } } } \setbeforesecskip{ \c_jcsres_section_dim } \setsecindent{ 0em } \setaftersecskip{ 0em } \setsecheadstyle{ \marginhead } \setsecnumformat{} I’m trying to customize this code and I keep getting stuck in not understanding quite what’s going on. I’m hoping that translating the `\marginhead` and `\marginbox` functions to use Expl3 features will make matters explicit enough that I can tweak matters on my own. If I understand correctly, `\marginbox` creates a 0-height top-aligned box, the width of the margin (that’s the same dim variable I used in creating the page layout) with the correctly-styled heading text set ragged-left; and `\marginhead` places this box the appropirate distance to the left of the following body text. What is the cleanest way to do this with Expl3? Specifically, what are the Expl3 equivalents of `\parbox` and `\llap`, at least in the way this code uses them? (I understand that `\raggedleft` would be in a very different layer of the code [the galley?] and probably doesn’t have a useable Expl3 equivalent yet; and that using `\tex_kern:D` is no clearer than `\kern`, and that its Expl3ization will probably be in the fonts module. On the other hand, I see that l3trial/xfont/xfss.dtx includes a definition for `\mode_leave_vertical:` so perhaps I’ll copy its definition and use that.) —Joel C. Salomon