From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WHtOGmVZ22RRdwEASxT56A (envelope-from ) for ; Tue, 15 Aug 2023 12:54:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qDk7GmVZ22ShIwEA9RJhRA (envelope-from ) for ; Tue, 15 Aug 2023 12:54:29 +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 EEFBC4DED9 for ; Tue, 15 Aug 2023 12:54:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=mailfence.com header.s=20210208-e7xh header.b=fnIqb4tU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mailfence.com (policy=quarantine); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692096869; 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:dkim-signature; bh=JUZucMhMAKMvMX66axr+Vs+cNDMcWVES3pusEXzo09M=; b=WGgbuCyYzrPNkanCoow/4P3hvlNlfw+xyK6qWVJbj3Ng3I4MQba725uqU4JehqopHINGw0 maKYeONlaqcoXDvrKmaI7qEhd+gD7nrJXMX5kpVJWMDr6sbga2YVP+dh4h2I3XLCnsryuP LDWQQuBnItMPU7IDifeZGI09XZ35+Tj6qhbq0O+pRuw/FsPg35TyfReiqrEr747hqBAkTH py7sl8an1aHAXxBXeMBbsqQdx9luglnatZAQHgbiFZxWsKx5MjwwEKF9UlIYbZ1cVPmG+n 1CDiVYtrbSKKff/Gq9ixCCKnRGE6NAHQSPcB9RcysRwcvBA5C70qlNJeT1mptw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=mailfence.com header.s=20210208-e7xh header.b=fnIqb4tU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mailfence.com (policy=quarantine); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692096869; a=rsa-sha256; cv=none; b=QkZURidRMmfhaMDLh0d9gPUW7i8q4fx6MFDOh7A+xcEkl8M/xrCj/vfQSTaJg/4u3JPxyY BD3HAewgNIOO27EpKJi6g7CW2edgEOWhpfSgdCwAn6li2k79ZQ9tKIL0Paw06/XQlxaM4s z8gefd1vnvS69+pyxu26mPpgMVORVXbkbPTmAjabAufakxTX5ZuT/DmyycDbe4KWsHWooG NEqEDD/GhjL9EVLREajZiQwJ8flSijG1zuLu+BwR+WSbkJsnZe2W9n3gnYcpd0dw9mvXg/ pWtBujGOTh5j6qqItbvQdtUnZDv4kUhRNuhi9+3sm1YyluMfAGcIDlbxZcz5KQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVrgL-0007P5-UK; Tue, 15 Aug 2023 06:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVrgF-0007Hk-1G for emacs-orgmode@gnu.org; Tue, 15 Aug 2023 06:53:43 -0400 Received: from wilbur.contactoffice.com ([212.3.242.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVrgB-0004NO-S3 for emacs-orgmode@gnu.org; Tue, 15 Aug 2023 06:53:42 -0400 Received: from fidget.co-bxl (fidget.co-bxl [10.2.0.33]) by wilbur.contactoffice.com (Postfix) with ESMTP id 67108113C for ; Tue, 15 Aug 2023 12:53:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1692096815; s=20210208-e7xh; d=mailfence.com; i=edgarlux@mailfence.com; h=Date:From:To:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1890; bh=JUZucMhMAKMvMX66axr+Vs+cNDMcWVES3pusEXzo09M=; b=fnIqb4tU0dWUQFQe3qYlW+4I7E9w6MTE4pat8OJB9VKnfJcK+GwjUXl8xOZ/lErR K8DL2jpBpZykblEg7rfM7lqRjoipF+WoqgrkclZfXEJ8Ujik6I2vHJTv58IqmDMuhvp CkVs4/wnGvwUGuR9pnha8PEuex2H7JfFSUKh5gvX2EoBZ0D482dzHTRowDAaSEjd3cT 3biAZm6nrBT5fnpKMSUaGdmP0B6X+HvlZR/GYh9etEwgz7I8MUAlJrStvQ4sHfGPym6 uOY+dgYk1xLBb1VFNGnQYO2YOiLrNxwCBgowItAK1kSKIT/0Id3xeAj2PnaTSeu0ckS tOIhzcYCow== Date: Tue, 15 Aug 2023 12:53:33 +0200 (CEST) From: Edgar Lux To: Emacs Orgmode Message-ID: <1568206205.356863.1692096813061@fidget.co-bxl> In-Reply-To: <530944580.355360.1692095755367@fidget.co-bxl> References: <530944580.355360.1692095755367@fidget.co-bxl> Subject: Re: How to preserve indentation of title inside a latex src block when exporting to LaTeX? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:195124330 Received-SPF: pass client-ip=212.3.242.68; envelope-from=edgarlux@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 6.00 X-Spam-Score: 6.00 X-Migadu-Queue-Id: EEFBC4DED9 X-Migadu-Spam: Yes X-Migadu-Scanner: mx2.migadu.com X-Spam: Yes X-TUID: 3dv+j5XFJCTU This didn't work (I tried) ;; Indent title ---- (defun my-latex-filter-indent-title (text backend info) "Ensure \"\\title\" is indented in LaTeX export." (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string ;; (rx (group (and (syntax escape) "title"))) ;; (rx (and " " (backref 1))) text))) "title" " title" text))) (make-local-variable 'org-export-filter-plain-text-functions) (add-to-list 'org-export-filter-plain-text-functions 'my-latex-filter-indent-title) ;; ---- indent title ends On Aug 15, 2023 at 12:35 PM, Edgar Lux wrote:Hello. How to preserve indentation of title inside a latex src block when exporting to LaTeX? For (annoying) reasons, I need a frontmatter block which is able to indent its contents. I am almost there, but the title line is not. I can edit this manually after export, but I would like to know if there is a way to do this... wait... there are filters. Is a filter the only solution? Thanks. #+options: toc:nil title:nil timestamp:nil #+begin_src emacs-lisp (org-babel-do-load-languages 'org-babel-load-languages '( (latex . t) )) #+end_src #+begin_frontmatter #+begin_src latex -i :exports results :eval yes :results replace \title{Determine in-situ matrix properties} \nothing{a} #+end_src #+end_frontmatter #+caption: Notice that title is not indented, but nothing is. #+results: : \begin{frontmatter} : \title{Determine in-situ matrix properties} : \nothing{a} : \end{frontmatter} #+begin_src emacs-lisp (concat (emacs-version) "\n" (org-version)) #+end_src #+RESULTS: : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) : of 2023-01-03 : 9.5.5 -- Sent with https://mailfence.com Secure and private email -- Sent with https://mailfence.com Secure and private email