From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EKq8H+zkaGCt/QAAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 23:58:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gLG5GezkaGCCbwAAbx9fmQ (envelope-from ) for ; Sat, 03 Apr 2021 21:58:04 +0000 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 3FA37A300 for ; Sat, 3 Apr 2021 23:58:02 +0200 (CEST) Received: from localhost ([::1]:36000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSoHI-0007xN-AH for larch@yhetil.org; Sat, 03 Apr 2021 17:58:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSoGw-0007xH-2f for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 17:57:39 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSoGu-0004yc-1h for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 17:57:37 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 757992400FB for ; Sat, 3 Apr 2021 23:57:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1617487049; bh=uTpmnQEMBJZBKgUUJLfmXEmFLnFoPZMiOhjesyCYDbM=; h=From:To:Cc:Subject:Date:From; b=PA4WwOI3ndZ+vDGIRCCyI8q7ggvX79tFUdsvp/WUz4R7zbMxQb11WqwG4HWIf2c50 wKcMaFIWBQjKu90JmF+ijN4IajXCiy17IsbecaDeUZojCUjvNEYw8yRxhmPwpvyoee uaTOj5mvjsKvQizxLV6ZhxcXlsHi7azY9R46HQWmCwEwfDwlw9gdEffZ7XSZ8MMBjT Y14XN5W0lTJhMfjO3n9BseOGODbVt4hgpW0vNelql8plX+5UQQ3gZJtpV/zx9xnQ4h K0O048ntnuWRCyCIh9fr1Czr1f6tWztSeQmfhZq/vya1uE7gJmp5E8l8xEcRTV7rfW wQN6XBZhA0ZBw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FCW486Qvbz6tmG; Sat, 3 Apr 2021 23:57:28 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Jean Louis Subject: Re: How to expand macro in LaTeX export? How to use different options per export type? References: Date: Sat, 03 Apr 2021 23:57:28 +0200 In-Reply-To: (Jean Louis's message of "Wed, 31 Mar 2021 12:40:46 +0300") Message-ID: <87wntjowtz.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617487084; 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=hvthdkt+yN5eYh/P+EFaxURNSbILlTyLDwZTJZnxC2c=; b=g0PjK+xFn3Iuyq3FZINIdfjWwdvkcWLAJbxWEG0C1JAW36ndCCC4i+hNY3I7E15qNi5XKx mdD7kbu1x7F+49x88j7TFKQO1J5/uyuLeolf+aYUEel5CUWVSOSTmFAdigUS0N1xSCA2Bx f0UJUc7/ms4s91IJDn0xGTkIPk8tHry5nkCmwYKDaqmw4u1tfLxihW+TKN/xPXwO8w38wZ i1XaRmNt31DtV7IzRHgSM5r6XsBvhjCI9FzeTYITNeHwjyFuzhFH101yNLsN8cu8IvOdPh GvHSBzvfYoCjFM7ZssEZ2DmMOme5RrBSVL1TsyiBUJGqk1SxSXXjDxBRzxmQtw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617487084; a=rsa-sha256; cv=none; b=kB8RV9XKOJbUshbK2+tAVreoFf5YcIWxSQ/qJwyrz91akyMsBai4A62O8t8TERdD5qR66c noQtKyQr7wmtOiqlfWScBx3b3emc488q5WCMv6NGa16xKRsjp8U8lYuxmr+jAbkHIMQYbw Wa7T2uz7r6aGbAZ5N8E1RDQUMqfQfjMTBcWerpT85U1bTlT1PFk6tX8+Xb1tyh6NTLCamH XoYLgQIeeZqOfoTL96PLwjjALukekurCwGtWB0uyCH4QPN/U9UUkM8luDu2ygE/fiwG9uY owQSK34j5kyBJFmNK04Nxzc93TLiWU+kQt9tHcQR/gxSUGduJ/FPi2XQl4UbPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PA4WwOI3; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PA4WwOI3; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3FA37A300 X-Spam-Score: -2.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6tUHvStchfVz Jean Louis writes: > Another issue related to this setup is that I would like: > > - for HTML export: title:t toc:t > > - for LaTeX PDF export: title:nil toc:nil > > Is there way to have options different for different exports? You can do it with a macro like this: #+MACRO: titletoc (eval (cond ((org-export-derived-backend-p org-export-current-backend 'latex) "#+OPTIONS: title:nil\n#+OPTIONS: toc:nil")((org-export-derived-backend-p org-export-current-backend 'html) "#+OPTIONS: title:t\n#+OPTIONS: toc:t"))) {{{titletoc}}} ... But maybe it would be better to use a block here: #+begin_src emacs-lisp :exports results :results raw (cond ((org-export-derived-backend-p org-export-current-backend 'latex) "#+OPTIONS: title:t\n#+OPTIONS: toc:t") ((org-export-derived-backend-p org-export-current-backend 'html) "#+OPTIONS: title:nil\n#+OPTIONS: toc:nil")) #+end_src Best regards, Juan Manuel