From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kH/MAAlf2mGgcgEAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 05:05:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OHfVOQhf2mHSfAEA9RJhRA (envelope-from ) for ; Sun, 09 Jan 2022 05:05:28 +0100 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 A24DC220D8 for ; Sun, 9 Jan 2022 05:05:28 +0100 (CET) Received: from localhost ([::1]:36290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6PSR-0000Se-Hh for larch@yhetil.org; Sat, 08 Jan 2022 23:05:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6PRO-0000SI-S8 for emacs-orgmode@gnu.org; Sat, 08 Jan 2022 23:04:22 -0500 Received: from [2a00:1450:4864:20::436] (port=34365 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6PRN-0000DO-12 for emacs-orgmode@gnu.org; Sat, 08 Jan 2022 23:04:22 -0500 Received: by mail-wr1-x436.google.com with SMTP id h10so9616910wrb.1 for ; Sat, 08 Jan 2022 20:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OYzUUlXn6LFoI622R8LUmxiAe9m+P53R/qNgn9RWyYU=; b=YsrlISw+xmMM77VRFSx6IExBJShVxu4Et9kK5MFEX+EbYWU/TNAdWJ31KXcEZ2Bei4 e39KA7X6QyGw6siZLCks2y/o8my/ql7WoiUcyDdAnyY/DTeGLyBFuyHV7fGBTnVaWZQd ki8rvHQeRk1VE9mm2ReDlkElrM4QnawjP4ct888BPeeZB89QGeXyQBFAsfup77Fad86j WfrR9oK+G/cV/h47Cr2LVhcXnqacxotIHmSmxyYC1UzyEJKUrbe2+/Bj/qz2vFX01G5p qPREHJp49/3doqnzZTnDXLUzooC4wqZw+Zu3/ukzhhosh2jKGSsFatE37ujpk+LWP6+P /Ldw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OYzUUlXn6LFoI622R8LUmxiAe9m+P53R/qNgn9RWyYU=; b=gS5B4sKZNN1j245AsAZmIlaRvdduKuoQRX7P6r5925Rz62atr88R1guF3cJ+Z6aP8N DoVhY53FOSycoXpfeenZzwCzYbtJnzHHKYmh5NYqOyysIWf1ZR/rQKovXzJDa7BAA/0Y clWBW9lNUfyZrbEZOKTk+8PyP/b2htzbGHFjMPkj/V7CcrTlXkg2lasrN8HY1u74ympP QZnm7GfC4u9ob837xRMI6S2Ul6VPxxaJGVk64uutvcHRUJ8l6aDD68YYWgT3mvnlis1m 9SbntJQQJLCMdNsqkbUp9U8eXcN+mNmf8vnLzHcRRcEuSPrlUuvy9Ua/Ag09Qelas0if DcBw== X-Gm-Message-State: AOAM531posFCCgXq3+0ClZ2zbp1SUinEmwXCspBQlfXVVmvjpUXzrfo/ Cr1cpzp7SDaOIQwCgvBHurD/+TmkRWGQ7uT4vSo= X-Google-Smtp-Source: ABdhPJy56AltVi5iavkKM69oW33ne/UwI6dfyfHS3jsjFlE99GcaIK6f1QB/r/DmXl1Asy+tvc/1PEdhXQzFRtaHLQg= X-Received: by 2002:adf:e706:: with SMTP id c6mr11019447wrm.116.1641701058153; Sat, 08 Jan 2022 20:04:18 -0800 (PST) MIME-Version: 1.0 References: <87ee5kwwht.fsf@posteo.net> <877dbcwtf7.fsf@posteo.net> <561D83E2-47BF-4AC2-B2AD-24B08D614845@health.ucsd.edu> In-Reply-To: <561D83E2-47BF-4AC2-B2AD-24B08D614845@health.ucsd.edu> From: Kaushal Modi Date: Sat, 8 Jan 2022 23:03:42 -0500 Message-ID: Subject: Re: Way to mark contents of an Org special block as verbatim? To: "Berry, Charles" Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=kaushal.modi@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= , orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641701128; 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=OYzUUlXn6LFoI622R8LUmxiAe9m+P53R/qNgn9RWyYU=; b=MVIhEwghsQkVy0Z1/y8LF9W3Px57YGOZb3A1aIpIDkGrVZYPVLOTCuCPeZrB1u1IEviARg cED4rEeNwcy8FaLHzXGp//UwWl+55aPygOf4qsoZGv4K5iRTXEGBzNWS3LHBSYxifpJSPe LZWrtC8eN13j7cnOo41xcDBIXrZr6At2rZzuPn8zBTaiUzbYAWDuhfZRmk8xomyR3o5/rk rdBp7CPaPS8EMMjZYe+zHdvEn/8g0qjzc1EACz/B/2bRegOlM15cT1y36xIlEB4zkFwkx6 ZZ/WA+32aGZrBLhnfU1auKYRl7RTYKYqb0J2VrbXluzV89weiBUGljuqPBvE4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641701128; a=rsa-sha256; cv=none; b=PNPwGuUooOYiOIp2TTrqgdPXSSLF/lJNw6++Lvr4rTOptnsPgkulw+CjqD4voRzovo5SY4 0s+bxFZxN10QXtq7F0Gk1iywXggFiS/LQbYwlFkTYrjqRyo73Zy8GrjIMhm4d8MRP9v9Km b2dxvYMB04VycjrO/zH8iqCYcLPILiAUgb/Fnw5FSTfRGqM+aSaqLX1mG2RJjySgT0mdzD J+G5j5hzuyBDjnOZnR6LpBF7Lby5AuSY5FiaZ3KxXHsnW/4UH/FLvRTyHymk0m6ubTwOjt t0dWD3z1z/QUHJcHGODJPH/+0rxccUZsyWs/UuC9JOH22C3gmG2+0rmLffLEQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YsrlISw+; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.31 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YsrlISw+; dmarc=pass (policy=none) header.from=gmail.com; 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: A24DC220D8 X-Spam-Score: -3.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: uUSYIkFgDmld On Sat, Jan 8, 2022 at 10:01 PM Berry, Charles wrote: > > > A simple one here: > > #+begin_src emacs-lisp > ;; minimal backend with latex parent > (org-export-define-derived-backend 'newlatex 'latex > :translate-alist > '((special-block . org-newlatex-special-block))) > > ;; special block transcoder > (defun org-newlatex-special-block (special-block contents info) > "Newlatex special block transcoder." > (let > ((type (org-element-property :type special-block))) > (if (equal type "newlatex") > (format "{{}}\n%s{{}}\n" contents) I am already doing something like this, but at this point in the code, the `contents' already is the modified content i.e. Org entities replaced and _{..} converted to , etc. Note that ox-hugo exporter is extended from ox-md, which is extended from ox-html. My problem statement is that the contents I am receiving is already modified and I don't get to access the original/raw/verbatim content. Thanking the original example in this thread: #+begin_katex E = -J \sum_{i=1}^N s_i s_{i+1} #+end_katex - \sum will have converted to ∑ - _{i=1} will have converted to i=1 by the time I receive the contents in ox-hugo's org-hugo-special-block. [ May be I am doing something wrong in my exporter? ] Or may be it's due to the fact that my eventual base exporter is ox-html? > ;; not `newlatex` so default to latex transcoder > (org-export-with-backend 'latex special-block contents info)))) > #+end_src > > Eval the above, then use this as an example by copying the following > src block to an org buffer and entering > > M-; (org-export-to-buffer 'newlatex "*Org NEW LATEX Export*" nil nil nil t) RET > > #+begin_src org > > ,#+begin_newlatex > This is the new content > ,#+end_newlatex > > > ,#+attr_latex: :caption \MyCaption{HeadingA} > ,#+BEGIN_proof > dot-dot-dot > ,#+END_proof > > #+end_src > > I get an *Org NEW LATEX Export* buffer like this: > > #+begin_example > {{}} > This is the new content > {{}} > > > \begin{proof} > dot-dot-dot > \MyCaption{HeadingA} > \end{proof} > > #+end_example