From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SONSBNBPZGCU0wAAgWs5BA (envelope-from ) for ; Wed, 31 Mar 2021 12:32:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SFQLOs9PZGDDLgAAB5/wlQ (envelope-from ) for ; Wed, 31 Mar 2021 10:32:47 +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 57B0E28AEC for ; Wed, 31 Mar 2021 12:32:47 +0200 (CEST) Received: from localhost ([::1]:38220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRY9V-0004UI-1g for larch@yhetil.org; Wed, 31 Mar 2021 06:32:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRY95-0004ST-LB for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 06:32:19 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:38489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRY93-0008VL-LP for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 06:32:19 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E1D1.0000000060644FAF.00000856; Wed, 31 Mar 2021 03:32:14 -0700 Date: Wed, 31 Mar 2021 13:29:11 +0300 From: Jean Louis To: Org mailing list Subject: Re: How to expand macro in LaTeX export? How to use different options per export type? Message-ID: Mail-Followup-To: Org mailing list References: <87lfa3hc7h.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <87lfa3hc7h.fsf@ucl.ac.uk> User-Agent: Mutt/2.0.6 (2021-03-06) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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: , 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=1617186767; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Q/4cn0ecxhchwxvrUqxsNfvu4+GFIY1W8vnaC7hFk+E=; b=X8D/L/unjZB5fBE08Q10Ldb95KD33WtuA3sPwp1WQzobUQ8bVszstxQQxxK//lKRVgxRRv wgj6nNm2vK+Yk0o79oNOdWn3GU+ZGEvmFhmI1PSNwrDzyZwN0F0GQFd1Xj+9nl3GOHqDuG 4E2d7tUftBWc8eUVzwaM9vUHlzANxOnB8OWGlLBvJLrJAm1mcvHOsW97U7xzc9H34Bw5Dz DgUTorKEl5n1y5kmxvwUXB1K9JiMcMIh5DLyvZW+qF0Wi+yZh/viLIuqzkl1pZV2HJFC8E e+OLMdx0hZDO903Aw0ut7pt4CUJcOjlHsC/aqoj623an9k1Kh9lL1Otg1yrOKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617186767; a=rsa-sha256; cv=none; b=UCJ5k4hYj2wzfgiBrgaZhrT72kON066VXUSuYEC+hxi9DNcTpUFWd779PJAAAxcwlE+nPy epkL76ct/JJno+DIZIaEKXwZQThVbNriDSup4SAwSJCKgY4rZHG8OlIs9gD75GpwHgyM9M TG9QJbb4nwnmQWmzxSIwWnabVfyyhN2HlMZx+YIvnh65y8rgUKVCmOuz4epTH+9vOtjt9m RMDS5ua2QNwZFFORjUdYix7dZW8ogWxj9x/oYi4C1UEj/Xoo9xa1r4J8oCOS8j2CPF5PiZ F30RW2zMPIFJYVl/W2hBCorvR+Ehdj1cCbHQ6Bc0oEMC/L7sqB6zkoJUegf/Lw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -0.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 57B0E28AEC X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: qlRXy5M6zMSP * Eric S Fraga [2021-03-31 13:06]: > On Wednesday, 31 Mar 2021 at 12:40, Jean Louis wrote: > > But then the line with \def\version{ {{{version}}} } gets shown in > > HTML export, which is not what I want. How to resolve that? > > Can you surround the line with @@latex: ... @@? > > You might need to do @@latex:\def\version{@@ {{{version}}} > @@latex:}@@ I did not know this, it looks like a solution in sight. Thank you. By doing this: @@latex:\def\version{@@ {{{version}}} @@latex:}@@ Then {{{version}}} will get expanded in the document, right? As I have hidden then only tags surrounding {{{version}}}. > Also, a macro can itself use the @@ directive to provide alternate > versions for LaTeX and HTML, as in > > #+macro: blah @@html:some HTML code@@@@latex: some LaTeX code@@ I have tried this: #+OPTIONS: @@html:title:t toc:t@@ @@latex:title:nil toc:nil@@ todo:nil But it is not working in options. It would be good if it works in OPTIONS. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns