From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sNURGOP5R2JAbwAAgWs5BA (envelope-from ) for ; Sat, 02 Apr 2022 09:23:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uKZ3FeP5R2Lk7QAA9RJhRA (envelope-from ) for ; Sat, 02 Apr 2022 09:23:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9DD703EE1 for ; Sat, 2 Apr 2022 09:23:14 +0200 (CEST) Received: from localhost ([::1]:55920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naY6K-0008IV-UC for larch@yhetil.org; Sat, 02 Apr 2022 03:23:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naY57-0008IL-AS for emacs-orgmode@gnu.org; Sat, 02 Apr 2022 03:21:57 -0400 Received: from mout02.posteo.de ([185.67.36.66]:57039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naY55-0007Gt-0E for emacs-orgmode@gnu.org; Sat, 02 Apr 2022 03:21:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id EA21424010B for ; Sat, 2 Apr 2022 09:21:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1648884110; bh=Gje1DzC32rN8ligeXZkyJWSX77hnfruSj1ec/SnUBlE=; h=From:To:Cc:Subject:Date:From; b=hfSvv9CZne56Fwjc9VG/FD/Z/5FTIo29vXs4L8I0eKNtUPqwaDq6/LCaBEgOyNDuY xNIbc2v6uDlTLPc4BIfOUa9Sr0C6G1pubWCmSJI6JjCgkaignPkxoqfQ3NwoP4PTxw qMQ7fZ3NXsO/JcBTVuW5bRh7MJO7pNI/9Z+UaJ4Z2ozxDsVHQVnFzCKhq1hn015u0p CSkZ+2zzF3coTLZM0k6yajy5Iw9jmbRkO8v4iaxxAt24lJ6VspUNwP/abgesgGJWsp USztNu8pYFBz7rSXRPp+Sr/qaWc30zBXMeW5nlxtkwT7XU3Zl96ZZIYitnjblT4E99 wRw8+BgKsuyKw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KVpPp1H2Sz9rxY; Sat, 2 Apr 2022 09:21:49 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Steve Downey Subject: Re: TOC and latex memoir class References: Date: Sat, 02 Apr 2022 07:21:49 +0000 In-Reply-To: (Steve Downey's message of "Fri, 1 Apr 2022 19:22:23 -0400") Message-ID: <87y20ogdbm.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648884195; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eRxUiHWAvl1654Y7jS6OnP7vEOI61xQiGetGm9sBvIY=; b=NWLfdEkHYthvR/2ASVGAYpOhp8to2y61ZxWnss/SK45oODyUvex/vRx94jz07RqJQfSAhe oHmSU2PUgQy6xyri5eqX26l5n55C+mcd2azkBwMNjUv5+jG4t5W0WBvg5QDF0Qg9tvv5+m 37CsAbN5ju99VN0s22XXl1YQ3J2rtSwhvCx99+WhkPnlFNUlidyYKC0Ok949gYsFZHqCXM +VdZjrB1p/OqhI8RwK3EqnIzpCwz/PJK3AnWejUhuiPrtyllg7U1iJ+nE9BU1YxhcaPwXz wNJJenIcqYRzxgH5EqEEXEhNzk/Fk0kFBlCfxUF5OyVGoZjwEK20Cz9+PLWi2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648884195; a=rsa-sha256; cv=none; b=gKLVOogO1YZN6fT2leLs6Yi0Mw13chYkyXiciLKMJBEfk35nihaKav19vVw0jt8cPOPL51 MX9jVpnSUdiyzjKj7EK7zmPytb7yQI4yI5qaHabW60qXYho4fDJCRVZgmib/+KJWsl8iBk Tnb/IpMObi6JDklklTpk66KF+sviXg8aClCjuamojaBJO/yFbj0D04gw/pY7zZ3I9eikAY 0/WtJ+DYoI+UEHy9bl4kd75IkuYsmRVRF1C9sg6qziay5LdbXeGOebMKFb6NvHRUaAobaV qTLV0cb8ZTFOx3hkw4itFNDpI8JCzyEx45CE+XKa0RRouhnBPSdueWMS3v0Tog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hfSvv9CZ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.18 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hfSvv9CZ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9DD703EE1 X-Spam-Score: -6.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2BgkKVJJLVDJ Hi Steve, Steve Downey writes: > In order to place the table of contents without a section name > "Contents" the memoir class uses \tableofcontents* rather than > \tableofcontents. > However, `org-latex-toc-command` is documented as: > "LaTeX command to set the table of contents, list of figures, etc. > This command only applies to the table of contents generated with > the toc:nil option, not to those generated with #+TOC keyword." > Which is confusing in two ways, first that toc:nil doesn't generate a > table of contents, and that it doesn't seem to provide any way of > getting the string to be used? > > As a workaround, I could use the latex command directly, but that > means not having it available in, for example, an html export. > > Is there a workaround I'm missing? One possible workaround would be to define a macro with a conditional: if exporting to LaTeX, returns the string 'toc:nil'; otherwise, returns 'toc:t'. And the LaTeX command can be added via a export snippet. Something like this: #+MACRO: mytoc (eval (if (eq org-export-current-backend 'latex) "#+OPTIONS: toc:nil" "#+OPTIONS: toc:t")) {{{mytoc}}} @@latex:\tableofcontents*@@ * Heading 1 lorem ipsum dolor * Heading 2 lorem ipsum dolor ------------ Best regards, Juan Manuel