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 UOQTMBlEZGBwvgAAgWs5BA (envelope-from ) for ; Wed, 31 Mar 2021 11:42:49 +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 MMVEKhlEZGDtDQAAB5/wlQ (envelope-from ) for ; Wed, 31 Mar 2021 09:42:49 +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 D335D26C64 for ; Wed, 31 Mar 2021 11:42:48 +0200 (CEST) Received: from localhost ([::1]:45080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRXN7-0004OP-QX for larch@yhetil.org; Wed, 31 Mar 2021 05:42:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRXMi-0004O6-CH for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 05:42:20 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:58817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRXMg-0003rT-3b for emacs-orgmode@gnu.org; Wed, 31 Mar 2021 05:42: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 000000000001E0AB.00000000606443F7.00000259; Wed, 31 Mar 2021 02:42:14 -0700 Date: Wed, 31 Mar 2021 12:40:46 +0300 From: Jean Louis To: Org mailing list Subject: How to expand macro in LaTeX export? How to use different options per export type? Message-ID: Mail-Followup-To: Org mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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=1617183769; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C1ll3F5L22tG3htc6O4UG/OvqnJe28OJxtE/ndeqoNQ=; b=uB6kJS26lrxNW7pBOMWdVL0H9Dj5qCXqvO1ipe/cZCK/+3bwJaruRqNo4ci8Ac5+lpHehw pJWiSi8SbW3scGzq+0TjmFoa3o7a1PY1Yi0JknSr69/s3WRXOj1/ofUWbz9yz6NSk2g6Ks iA+XkZRmIKGkhSO5HIR6+ZQmD8g+jB/3bygRXI0C552lLlQu/c7QdKlqezKhGgWoRqTAQw 47J0TSmQm/xyWWK1GQ7qGNvF10LvJuR5VuqAlxA8+GxPdP67JhKw77gbZsFWD1sYaQWoz4 nvZTDOU1ciyYciW1WQHIzO3th+gMldgHfxuMgk+fB+o+76c+SK//O+XrKfTjog== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617183769; a=rsa-sha256; cv=none; b=haD2GPxSdf2QCgJ4Cj9PHpVaCiCh2UVOdLiE0BAflW2jnssxB+Q+Bu9uRuIsTiElRhoB0v EB/LbJBFn1B31DLEGcZz7JQWDFgNzpVy4ufJH6kEDPVIWfN2Mj2Yyvy+fGh+vARLbnBsbd CGlieaUE8tvPoTIv7WT+dM9OMGcHuoDsJHRzLLwIxtfalR425E5+AO0L8DT7T4lNMKSy0N TgTnuwpY8cY3tSuwSBxbPsbOsHnYOulFbrdE/TqKjJxhl2A9AsS3+auE7l3EfGkITWRHhZ mameuuhYiGmtTw/cKUxS8w8X1/QcZoSKVB/G8W7nWh10X23MtEYmWvpAjaRrKg== 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: D335D26C64 X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZFQn8mg/2r8S In this following peculiar setup, I wish to publish the macro value {{{version}}} inside of the LaTeX source code export. That makes the first page how I need it, as it displays logo and other matters. But I cannot use macro replacements in src blocks, right? That is why I have defined \def\version{ {{{version}}} } that it gets expanded in LaTeX source code, that works fine, and all is good. But then the line with \def\version{ {{{version}}} } gets shown in HTML export, which is not what I want. How to resolve that? Possible solution would be: - to somehow be able to expand macros in LaTeX section? Is that possible? - to somehow hide \def\version{ {{{version}}} }in HTML. But I do not know how. 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? #+TITLE: My title #+MACRO: version Time-stamp: #+AUTHOR: Jean Louis #+SETUPFILE: /home/admin/Programming/git/org-html-themes/setup/theme-readtheorg.setup #+OPTIONS: title:nil toc:nil todo:nil \def\version{ {{{version}}} } #+BEGIN_EXPORT latex \begin{titlepage} \begin{center} {\Huge My title in LaTeX \\ Project by Jean Louis} %{\Large Some other title, maybe} \vspace{0.5cm} {\large Revision: \version{} } \includegraphics[width=12cm]{/home/graphics/my-logo.jpg} \end{center} \end{titlepage} \tableofcontents #+END_EXPORT -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns