From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: is there a macro to have backend-specific behavior? Date: Thu, 01 Feb 2018 10:58:31 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehBdf-0007Z4-TO for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 04:58:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehBdc-0003y8-2G for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 04:58:40 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:47340) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehBdb-0003vk-Ou for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 04:58:36 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Is there a way to define a macro that has different behaviors depending on export backend? I have macros that use the @@latex:foo@@ syntax, but in that case I "foo" is supposed to be literal latex. My use case is this one: I have a link to a custom id, and I want to export it as [[#id]] in latex and [[file:file.org::#id]] for html *before* link resolution happens (so that the custom id in the latex export is substituted with the correct label). Is this possible? Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2017-12: 406.82, 2016-12: = 404.42 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEzBAEBCgAdFiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAlpy5MgACgkQBA0KO07S 5cfiSAf+NBJkACwkWzA6Fq7qCHpGNkPRbkN69LO3YtK+XO1muh2X9OL/JCNOmc9f 8T70AHxIfYyEGS6WIG8c0PCG+A7Jnn++JMO1PoBclrL96ZSuZWDf5U0oWovy/IHz dz2XLJ6+Ks+Ad51L2pdkWBhVGFK2R6ZKO9CvVWn0enQJLvLcZD2HqpslhvTyAP1J fEpp90Y7zyF7oqwzFwlHyH+tV29o5SudSXH6R/fra53+Sc6rk1SXNH0XbvbiQvJv Jn3ciBUcjuehw/nA1S8Ab6kCuYWztz5Zzt1E1UkO1xYT36v/Q1Y3hYw4TJMGElcc v3mWuBX+jg6MihYlBxNOno0h1smKMg== =ohkL -----END PGP SIGNATURE----- --=-=-=--