From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id sOM4Hx/3H2btUQAA62LTzQ:P1 (envelope-from ) for ; Wed, 17 Apr 2024 18:21:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sOM4Hx/3H2btUQAA62LTzQ (envelope-from ) for ; Wed, 17 Apr 2024 18:21:51 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="qJNgi4Q/"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713370911; 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=OvtQwwVWkJt8qcNSYYz/5o416aIqVvxPenO0gxx3eDI=; b=n5jRa6AqoI+2y2VIa4EvuiERusMOILjwNAdp+7nCeb3PEoqvlAxxNn/ii+ccWFszQ0M2i6 aYcwljRiYo2IIxK1C1eehrbk8l9qtUFa9ZgBWOsmwrYoHM1ZBGcPPTCue86Zf7Q/C70u9+ i4fjKI95YLyO92wpUq1Kcvm+u++82mUYIdyg6vdkaz+8cidKiz/GyWHUWkG+kxXALXndGm OtelmecwC7msWoFfTwlOyxteWL9vtZ17etyTxm3xp/7+4ZNZ/hzoT0Zr5cX7HIlQoEMfJn x5CZv/Hr664O6Btih/EVMR5zQ9BEs7Qln7Y8B8Oj0u70QP/404QCyXusF4vWXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713370911; a=rsa-sha256; cv=none; b=lS7ZTjwuiHTi0bfjFxITa0mdbBDTTmuIQQ8G8iZDfOhyYhwGMXy/TwVa6dX7a8Ee+9uOnm O6bOckmuG5fgqlnbMKikJT+hGBo1YTdY+hGyDQJPPfgbyGDmdKbTNxmRbE+UwEI9P2JjH4 tekvTd0bBOS91cb42MEh4zDsWfl9ASzSZLQMRiQ9rm9be2vDKoFkogm+RnkR+o013iz8zq iM7iuuHO3KR2OAea4TskXwloNNeOI2EMCAaE67L/nY0KRxrM11o5uGdwAped5YxvkcmcQK rw3F97nyJiYZDu+1Duk2vTulMSy9eRssS3SLNTnMiSm6k413FR7emBwZGQ0EkQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="qJNgi4Q/"; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 207C953E43 for ; Wed, 17 Apr 2024 18:21:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rx81o-0000So-Ai; Wed, 17 Apr 2024 12:20:56 -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 1rx81n-0000Sb-1m for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 12:20:55 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rx81k-0003cX-KI for emacs-orgmode@gnu.org; Wed, 17 Apr 2024 12:20:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3472F240101 for ; Wed, 17 Apr 2024 18:20:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713370849; bh=kkwhoo+2P6BQjCs5dRc1UkcW/PwWvaYn91GCkd0kxQM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=qJNgi4Q/PyNzqBtYuWBHl8PW5s/wg6uJ7FS6z5l7iAVdOQ2oJbaHnn+JoGkOGYQGr guyZDMGpx4jjtRbAhE75bfgQlVUQu+LQ3m/vIKlDrxthx32+V/xpNWyIsuMBWFQebO h9Q6C32vJt+V97NbobqIJQIEM4nQX/1IBD2+YSm8xxxItDH0jptInm/T5GuGsSvmbw ytRAmzVf2stw0O/MhdTval2eckoFAnwU+pXYEeRdkGKKtqI2kJlPF93XFf4jX+XOHW M6BxrKSMZcBx+5rBtfp2ehpDM+5XZWBYTvlzQjQQAwsToH1zEfxuHYFzAL3d9MB2FS /mMQctYqjbUzw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VKR3N17XBz9rxD; Wed, 17 Apr 2024 18:20:47 +0200 (CEST) From: Ihor Radchenko To: Alexander Gogl Cc: emacs-orgmode@gnu.org Subject: Re: [FR] Please add custom command variable to org-latex-footnote-reference In-Reply-To: References: <87sf4cbary.fsf@localhost> <87y1chwmut.fsf@localhost> <875xzig0jy.fsf@localhost> Date: Wed, 17 Apr 2024 16:21:26 +0000 Message-ID: <87o7a8arjt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.59 X-Spam-Score: -9.59 X-Migadu-Queue-Id: 207C953E43 X-Migadu-Scanner: mx13.migadu.com X-TUID: IErggE3jgitH Alexander Gogl writes: > I completed the patch (see attachment). Please let me know if I made any mistake in the patch or if I should send the patch to another E-Mail-Address. Thanks! We use Org mailing list (public) to send patches and discuss Org mode development. I added Org mailing list to CC in this email. You can simply use "Reply All" to send the next version of the patch. > Reason for patch > > Some LaTeX classes define their own footnote commands. For example, kaobook (https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf) has \footnotes and \sidenotes, whereby sidenotes (notes are put into the outter margin) are the dominant form of putting notes in kaobook. It would be great if you could make the footnote command in the footnote function customizable. My proposal is in the attachment. You can put this description in the commit message. Also, if you can, please add changelog entries, as described in https://orgmode.org/worg/org-contribute.html#commit-messages > Subject: [PATCH] added option to customize latex footnote command in export What about ox-latex: New option to customize LaTeX footnote command My version (1) clearly states which library the patch is changing; (2) Uses imperative tone as we usually do in commit messages. > +*** New option ~latex-default-footnote-command~ > + > +This new option allows you to define the LaTeX command the org-mode footnotes are converted to (for example ~\\sidenote{%s%s}~). We use "Org mode" to name Org mode. Also, we fill the text to default `fill-column' value of 70. > diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el > index 5c19e1fe7..b45d13ca2 100644 > --- a/lisp/ox-latex.el > +++ b/lisp/ox-latex.el > @@ -135,6 +135,9 @@ > (:latex-default-table-environment nil nil org-latex-default-table-environment) > (:latex-default-quote-environment nil nil org-latex-default-quote-environment) > (:latex-default-table-mode nil nil org-latex-default-table-mode) > + ;; TODO implement options variable May you explain the purpose of this TODO? > + (:latex-default-footnote-command "\\footnote{%s%s}" nil org-latex-default-footnote-command) "\\footnote{%s%s}" makes no sense in this context. The format of export options is described in the docstring of `org-export-options-alist': The key of the alist is the property name, and the value is a list like (KEYWORD OPTION DEFAULT BEHAVIOR) where: KEYWORD is a string representing a buffer keyword, or nil. OPTION is a string that could be found in an #+OPTIONS: line. DEFAULT is the default value for the property. BEHAVIOR determines how Org should handle multiple keywords for You placed "\\footnote{%s%s}" in KEYWORD slot, which is not right. KEYWORD slot is what defines how to set the value locally. For example, "AUTHOR" in (:author "AUTHOR" nil user-full-name parse) means that :author export option can be set as #+AUTHOR: value > +(defcustom org-latex-default-footnote-command "\\footnote{%s%s}" > + "Default command used to insert footnotes. > + Customize this command if the LaTeX class provides a different notation command like `\\sidenote{%s%s}' that you want to use." Please explain what is the meaning of each %s in the value in the docstring. Also, please re-fill the docstring to avoid long lines. > + :group 'org-export-latex > + :version "24.4" ;; FIXME enter correct version :version is not needed. It is obsolete keyword we no longer use in the new customizations. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at