From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iMaPOtZ8tmLtBgEAbAwnHQ (envelope-from ) for ; Sat, 25 Jun 2022 05:11:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GD2iOtZ8tmI6FgAA9RJhRA (envelope-from ) for ; Sat, 25 Jun 2022 05:11:18 +0200 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 3597B3F2DB for ; Sat, 25 Jun 2022 05:11:18 +0200 (CEST) Received: from localhost ([::1]:51864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4wCa-0002AG-6h for larch@yhetil.org; Fri, 24 Jun 2022 23:11:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4wBr-0002A4-Oc for emacs-orgmode@gnu.org; Fri, 24 Jun 2022 23:10:31 -0400 Received: from mout01.posteo.de ([185.67.36.65]:50211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4wBn-0001bs-AI for emacs-orgmode@gnu.org; Fri, 24 Jun 2022 23:10:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D84BB240026 for ; Sat, 25 Jun 2022 05:10:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1656126623; bh=LjIe4hyItbPdeIi45rfmbN2fK2Af8+6kjf6M+5Z36QU=; h=From:To:Subject:Date:From; b=DMhNGhPnSYdvqfm32ZlL5tEBN9IL+y8rcyugouliS2YtxRqATCLWMbJNcyTwg5Xop HYVO9gpHR2f3SfHa6IjV2MOrEvhOwltT2ZiZ2zBBShkxFjEUel7S6bWtslaW2xYcCs 8enLKWQPm5JH8xbXnR/LFpVOm2tOxIvODaiQj/aC5GSWrc5W3MHrghGvO6BcH99Xfv q0trxmRwJgkNcpfHOJxe5h2ifWvyQhx1OSb0ul6+2aruzk7IFo/k4trvUZe3Hm+Lmt PywrAlo71UupadPg9nhpuV9m/S7zzRBtXvYQnpCPW4OamogMPax3WO1GsqyQDGMohN zkNxdmT/7z5Yg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LVJrv0xS5z6tmT for ; Sat, 25 Jun 2022 05:10:22 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Org inside LaTeX (a poor man's approach with LuaTeX) Date: Sat, 25 Jun 2022 03:10:20 +0000 Message-ID: <874k09mo9v.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656126678; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=oVFlUiAe3nBubc0r4w1EFPR35GJVSglndzSNQRjq6aM=; b=ZSwzhHhaTZ98EHsHHltk5Ane4ad/E3MjrHeE/8KLE2T3Cje+If4MeFi2I8Nk9yYODPwItq EWUw1jt4igklvUO1shPXstU60l85WlD3irtHri8HfX87Kl5UY416SbLeZN/Vk1B1+pMFR0 viN5fZ7ZjcjsTg9PWHUY4Jcy7BQz3iVXBECwUHMdwwwvkHOUS3bh0KDHNXdZUmF/q7iwXH 79d2JR7jkk3vgnEKXWk02w3qDTxkIH2ziNkOdUe6CtqR24hgRU4QeT/AvAy4h9mFjOCOyo hzxvCJ8+/4GN/jMr5Vbwev2ha45sxtWUF4FivbpqHPuiauPF1a7+a1l6gnEshA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656126678; a=rsa-sha256; cv=none; b=BQgQnPcd0+iJTFHrVhNck8cufRdAba7pk6CU0ZcCXVCYVEqVOx1crDNSQ6/Cy6uQOjc4E8 tPPeaEojAzWjQqHkOh5hDRgsnNll16Ii/1xHDTy37XZx0nuNQYLBkrfFVE2RLXuWd/gYeX ihb9S/0Z3Yq++PDRGE6ebpFqX2pNRY0ALgR+6U3llelrGSpmm5npCFdZyO5Gg72LMkeEXj GZzM0U+izYAjbVhRil5MROTXsVG36Uy0EWULlnCiTjh0QiiNKnOkBe2LXDygwye8c3IFJx E8fvoa7P4zfqtep9au0jjKHVVGsSTVRq9AkRWTNhG/i/tvBxrPH0m9OY86QHjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DMhNGhPn; dmarc=pass (policy=none) header.from=posteo.net; 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: -4.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DMhNGhPn; dmarc=pass (policy=none) header.from=posteo.net; 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: 3597B3F2DB X-Spam-Score: -4.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: og5xt5Bgk8Yc --=-=-= Content-Type: text/plain Hi all, I know some old school LaTeX users who are interested in giving Org a try, but seem to have a hard time getting out of their LaTeX comfort zone. So I thought maybe it wouldn't be a bad idea to invite them to try some Org doses without leaving LaTeX. I got the idea from the LaTeX markdown package... With one drastic difference: the markdown package includes a complete LaTeX markdown parser. Mine is just a poor man hack that runs emacs --batch through Lua. For example, you can put things like this in a LaTeX document: \begin{luacode*} org = [[ * Section /Lorem ipsum dolor/ *Lorem ipsum dolor* #+caption: Lorem ipsum dolor #+ATTR_LaTeX: :booktabs t |-------------+-------------+-------------| | lorem | ipsum | dolor | |-------------+-------------+-------------| | lorem ipsum | lorem ipsum | lorem ipsum | | lorem ipsum | lorem ipsum | lorem ipsum | | lorem ipsum | lorem ipsum | lorem ipsum | | lorem ipsum | lorem ipsum | lorem ipsum | |-------------+-------------+-------------| | lorem ipsum | lorem ipsum | lorem ipsum | |-------------+-------------+-------------| ]] org_output() \end{luacode*} Unfortunately I've only gotten it to work this way explicitly. If I try to define a macro or environment to make it simpler, it returns errors everywhere. If anyone wants to try it, I am attaching to this email a 'test.tex' document that contains everything you need. You just have to compile it with lualatex. Best regards and happy weekend, Juan Manuel --=-=-= Content-Type: application/x-tex Content-Disposition: attachment; filename=test.tex Content-Transfer-Encoding: base64 XGRvY3VtZW50Y2xhc3NbMTFwdF17YXJ0aWNsZX0KXHVzZXBhY2thZ2V7bHVhY29kZX0KXHVzZXBh Y2thZ2V7Ym9va3RhYnN9Clx1c2VwYWNrYWdle2ZpbGVjb250ZW50c30KClxMdWFDb2RlRGVidWdP bgoKXGJlZ2lue2ZpbGVjb250ZW50cyp9e2x0eG9yZy5lbH0KKHJlcXVpcmUgJ29yZykKKGRlZnVu IG15LW9yZy0yLWx0eCAoc3RyKQogIChzdHJpbmctdHJpbSAob3JnLWV4cG9ydC1zdHJpbmctYXMg c3RyICdsYXRleCB0KSkpClxlbmR7ZmlsZWNvbnRlbnRzKn0KClxiZWdpbntmaWxlY29udGVudHMq fXtsdHhvcmcuc2h9CiMhL2Jpbi9iYXNoCkFSRz0iJDEiCmVtYWNzIC1iYXRjaCAtbCBsdHhvcmcu ZWwgLS1ldmFsICIocHJpbmMgKG15LW9yZy0yLWx0eCBcIiRBUkdcIikpIgpcZW5ke2ZpbGVjb250 ZW50cyp9CgpcYmVnaW57bHVhY29kZSp9Cm9yZyA9IFtbXV0KZnVuY3Rpb24gb3JnX291dHB1dCAo YXJnKQpsb2NhbCB4ID0gaW8ucG9wZW4oImNobW9kICt4IGx0eG9yZy5zaCAmJiAuL2x0eG9yZy5z aCAnIiAuLiBvcmcgLi4gIicgPiAvdG1wL3RlbXAudGV4IikKeDpjbG9zZSAoKQp5ID0gIlxcaW5w dXR7L3RtcC90ZW1wLnRleH0iCnRleC5wcmludCh5KQplbmQKXGVuZHtsdWFjb2RlKn0KClxiZWdp bntkb2N1bWVudH0KClxiZWdpbntsdWFjb2RlKn0KCm9yZyA9IFtbCgoqIFNlY3Rpb24KCi9Mb3Jl bSBpcHN1bSBkb2xvci8KCipMb3JlbSBpcHN1bSBkb2xvcioKCiMrY2FwdGlv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