From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kNr1CDEy32VfxAAAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Feb 2024 14:16:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kNr1CDEy32VfxAAAqHPOHw (envelope-from ) for ; Wed, 28 Feb 2024 14:16:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TAUc+Yos; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709126192; 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: 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=ETG1pzHODuZM7n2R919ZMqjUicFs1AHlpVdGcyE3WeE=; b=q/PLKSrqqZPXUYvwo38DnQeD9Bbtizb8S9Gl62xd2ccXHZ8ZD4aj3CIBRuHcLtpR0mOK9E 70KF/R7GWmen5aKrfsUSntmAcCDREVT+1GbBVMB24CYlikB34ipR0R/r2BQfF2QKiZug2x QN5LVutBoQ87vs7w7Jta93yNXZRnfvN1rbDgQeYlREeTUIIAoaLfDqQtvmAY8A5QOAbbjW HsLJguXHPKQSWowjRIRktw+LcKCzrP5g66m0kwVosMuUOVelDhWQwyoIvneTBy0mbwybo3 Q9vz5g3sxk7CTEXh11wOM5UaVw19yb3IEcOKyvztF7DitQEQMu3PGLaKpIoc9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=TAUc+Yos; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709126192; a=rsa-sha256; cv=none; b=NtG9BuMs8Lu5+B5zU0cjXB7LkyD43tQHYs61X893/W5ab7OIUrXR4H7a9FPbY7F16ql5F9 VqEAy7f3GFq01SK/57Qsc1M20PXxoUnl2arcBXHuheEPx0ykOOKhWkoee+zGJhT7hG/Wry B4UOIUl/3nN0OowcPxIDxs66prR+78Y2/MGUg7D/BrD0SocHOA93baFvJWQ3ZYM1QO55/y ddaaiIp0gFzKRQwnIZlU09wSan4az9Q8R+sgB/ElvXavybw7Rn875CpE7UA76p6w4SBKOy Gi1v5AHT2rceLJnj3dQ2k3i32AtED2mJ5SCAL1oh+ji77WnI4E3UeCmOXnSnMQ== 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 D6F3E16309 for ; Wed, 28 Feb 2024 14:16:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfJmc-0001Kn-Mj; Wed, 28 Feb 2024 08:15:38 -0500 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 1rfJmM-0001CD-UY for emacs-orgmode@gnu.org; Wed, 28 Feb 2024 08:15:25 -0500 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 1rfJmK-000211-H1 for emacs-orgmode@gnu.org; Wed, 28 Feb 2024 08:15:22 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 916D7240104 for ; Wed, 28 Feb 2024 14:15:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709126115; bh=ETG1pzHODuZM7n2R919ZMqjUicFs1AHlpVdGcyE3WeE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=TAUc+YosJs4Gr0vey8OhapVqeyYOxY7Gj8BetqYCB955cl8bP8d1IhrAHpBvgKaWz RAsBCCB2yb/KYJe5zenMME2A0b0DLYglrLzSnCtcLEqqq1OIzKqHA1zEF+dftmFPsI y0oyD9r4PdNLaz3/dXsdsez/8yZ5dHzbNPHdl5Auu/8KiMDYAYh/DjLI6uGOruc5wZ LGyF/ZFjvtXw5PI1CrlW2zNVmYEgQ1u7P7qCP2+LC2plhnUSKSjJn/gj+TsebxaShJ G+yA4cQPqMsRxc2/AjBNumnCS4+CQpDLCQkP/jYKw2atkcivaNUdsmMb9ybVeICa3p mbFBm4x27AKNg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TlFFv0896z9rxS; Wed, 28 Feb 2024 14:15:14 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Max Nikulin Cc: orgmode Subject: Re: [proof of concept] inline language blocks In-Reply-To: (Max Nikulin's message of "Wed, 28 Feb 2024 17:29:34 +0700") References: <87msrudgcn.fsf@posteo.net> <8734tmmcnv.fsf@localhost> <87edd6ytiy.fsf@posteo.net> <87sf1mrpr6.fsf@localhost> <87a5nuyo4w.fsf@posteo.net> <87frxmrmjb.fsf@localhost> <875xyhzyzl.fsf@posteo.net> <87le7dihaj.fsf@posteo.net> <87h6i1ifp7.fsf@posteo.net> Date: Wed, 28 Feb 2024 13:15:12 +0000 Message-ID: <87wmqoohlr.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.68 X-Spam-Score: -9.68 X-Migadu-Queue-Id: D6F3E16309 X-Migadu-Scanner: mx13.migadu.com X-TUID: EO+2UjrMN5PA Max Nikulin writes: > Juan Manuel your ":fr{}" and similar objects is a domain-specific > language that is quite different from a generic element proposed by > Samuel. Do you think it makes sense to modify your inline special > block patch to allow creation of concise DSL? > > Juan Manuel Mac=C3=ADas. [testing patch] inline-special-block with full > implementation for LaTeX backend. Fri, 23 Feb 2024 23:50:52 +0000. > https://list.orgmode.org/87ttlyloyr.fsf@posteo.net > > I mean &fr{bonjour} defined using "#+options:" or some new keyword or > a special block. A definition of "fr" may be (using a bit different > names) > > :latex_element "foreignlanguage" :latex_prefix "french" > :html_element "span" :html_attr (:lang "fr") > > &fr{} is no heavier than :fr{}. The only drawback is necessity to > define elements for each language used in the document. I do not > think, even a dozen of declarations is a significant burden. Hi, Maxim, In the end I abandoned the concept of inline language block to the detriment of the more general concept of inline special block (as, rightly, proposed Ihor). I feel that at the beginning both concepts overlapped. The patch you mention deals exclusively with the inline special block concept, as well as the experimental branch that I hope to publish shortly. The syntax of my approach, summarized, would be: -basic form: &foo[optional attributes]{lorem ipsum dolor} =3D=3D> LaTeX \foo{lorem ipsum dolor} ; =3D=3D> HTML lo= rem ipsum dolor - anonymous variant: &_{lorem ipsum dolor} Common to all backends (so far I have only implemented LaTeX and HTML) are a series of universal attributes. At the moment I have thought about the following: :lang, :smallcaps and :color. For example: &foo[:lang el :color blue :smallcaps t]{contents} =3D=3D> LaTeX: {\scshape\color{blue}\foreignlanguage{greek}{\foo{contents}}} =3D=3D> HTML contents There is also the :html attribute and for LaTeX the :prelatex and :postlatex attributes. Groups of attributes can also be defined, as if they were styles, and combined with single attributes: #+options: inline-special-block-aliases:(("latin" :lang "la" :color blue :p= relatex "\\itshape " :html "style=3D\"font-style:italic;\"")) This is an example of Latin text: &_[@latin@]{lorem ipsum dolor sit amet}. This is an example of Latin text with small caps: &_[@latin@ :smallcaps t]{= lorem ipsum dolor sit amet}. =3D=3D> LaTeX: This is an example of Latin text: {\color{blue}\foreignlanguage{latin}{\its= hape lorem ipsum dolor sit amet}}. This is an example of Latin text with small caps: {\scshape{}\color{blue}\f= oreignlanguage{latin}{\itshape lorem ipsum dolor sit amet}} =3D=3D> HTML: This is an example of Latin text: lorem ipsum dolor sit amet. This is an example of Latin text with small caps: lorem ipsum dolor = sit amet.